I got an 3 years old computer with 4GB RAM Dualcore/Intel, and 4 hotswapable SATA HDD's (500GB each, 2+2 in LINUX RAID-1 configuration - so i have 2 500GB mirrored volumes). Each volume is full of data in approx in 60-70% - total 600-700GB data.

Now, for some reason, I want move the whole system into Freebsd 9.0 with ZFS.

I have another 1TB drive, so I want end with a zpool with 5 drives, (root on ZFS too) - but need preserve data from the linux-volumes. So, the plan:

  • install freebsd without zfs into the new 1TB hdd (base install) - or make ext3 partition on the new drive - but I'm not sure about the mountig it later into fbsd.
  • boot the current linux, mount the 1TB freebsd hdd (or ext3), and copy all data from the linux into new 1TB HDD
  • disconnect the drive (for sure)
  • install an new freebsd into 4x 500GB HDDs in some RAID configuration (see the qst bellow)
  • boot the new freebsd from ZFS
  • connect the 1TB drive
  • mount the 1TB HDD and copy all data into the new freebsd ZFS
  • make zfs snapshot
  • and finally want add the 1TB drive into the zpool with zpool add command - i hope this is possible and correct step.

Is this plan OK?

Sure it would be much better simple backup all data, install freebsd into 5 drives, and restore - unfortunately, the external backup drive will come in a next week only and i don't want wait.

  • Any things about I need care?
  • and finally, what is the "best practice" configuring 4 drive ZPOOL and after adding another (bigger) drive into the pool?

Thanx in advace for helpful comments.

Ps: I was read some other serverfault questions, like Recommendations on ZFS on FreeBSD as a NAS box? , but maybe some points I'm missing...

1 Answer 1


I'll start with a caveat: ZFS is still experimental even in FreeBSD 9.0, so if you lose all of your data, you are not allowed to complain or cry. In other words, make sure you have a working and tested backup scheme in place at all times.

First: you are going from Linux to FreeBSD, so you are going to want to use tar to backup your data from the old system. Just mount your new HDD at /mnt and tar everything up. Second caveat related to first: you are putting all your eggs in one basket. This is bad. You should have two separate locations that you are moving your data to while you install the new OS. I would recommend buying a cheap external USB drive, or borrow one from a friend. tar your data onto the new internal drive that has been formatted to MSDOS, verify the tar file, then untar it onto the external drive. Compare the data on the external drive to the original data using find, xargs, md5sum, and diff like this:

find olddirectory | xargs md5sum > olddata
find newdirectory | xargs md5sum > newdata
diff olddata newdata

You want to keep one of these md5sum files for checking things later, so put it on a pen drive or pastebin.com or something. I know that was a long process, but I have to at least tell you the correct things to do. When you ignore them and things go south, you have been warned.

Next delete all the data on the external drive, and copy the tar file to the external drive. Now md5sum the two tar files and make sure that they match.

Now, install FreeBSD 9.0 with ZFS root and a raidz pool on the four drives. untar your data onto the new system and check it against the md5sum file you saved from earlier.

Now, add the fifth disk using zpool add. Make sure you read zpool(8) from beginning to end and understand everything before you begin. If you have Virtualbox, you may even want to run a small simulation before you do this for real. You don't need to make the virtual drives in vbox as big as the ones you are going to use. FreeBSD 9.0 takes about 4.5G, so make a vbox instance with 4 HDDs of 5G each. Install FreeBSD 9.0 onto them in a ZFS root configuration. Then go into the vbox config and add a fifth disk that is 10GB. Add this new disk to the ZFS pool.

If you work out everything you need to do in vbox, you will be prepared for what you will see when you're doing it for real. Also, vbox allows you to take snapshots of the instance so if you make a mistake, just stop the instance and go back to the snapshot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .