Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have quite a few spare old 500GB WD Black disks that I'm going to be using for the root file system of a FreeBSD NAS at home. These disks have been in continuous use for 5 years within a rack server at work, so I don't consider them very reliable. Since I have lots of spare 3.5" bays while starting out with the NAS, I was thinking of having a 3 way ZFS mirror as my root file system using these old disks.

My goal is to buy a pair 2.5" disks for the file system once I'm not that strapped on cash. My question is then that if I buy different disks, is there an easy way to set up the ZFS file system, so that I can just add the new 2.5" disks to the pool, let it resilver, and just remove the old 3.5" WD Black disks? This would save me from having to reinstall the OS.

The point here is that the new 2.5" disks might have any size, but be large enough to contain all the data on the OS partition.

share|improve this question

I haven't tried it, but you should be able to simply:

  1. Make sure the pool has autoreplace=no and autoexpand=no (probably not strictly needed, but good for sanity)
  2. Physically install the new disks
  3. detach one of the mirror disks from the vdev, if needed (depends on how ZFS feels about a n-way mirror where n>3)
  4. attach the new disks to the mirror vdev, if needed then one at a time
  5. Allow the pool to resilver onto the new drive
  6. Rinse and repeat as needed until all new disks have been populated with data
  7. detach any remaining old disks from the mirror vdev
  8. Physically uninstall the old disks
  9. Expand the pool to use the full capacity of the new drives, for example using zpool online -e
  10. If needed and desired, reset the autoreplace and autoexpand properties on the pool

Alternatively, instead of steps 3-5 above, you can simply zpool replace one disk at a time.

share|improve this answer

You must log in to answer this question.

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