Replacing disks in a ZFS pool

Wes Morgan morganw at
Thu Jan 7 03:18:25 UTC 2010

On Wed, 6 Jan 2010, Steve Bertrand wrote:

> Hi everyone,
> I've got a 7.2 system with four 500GB drives, originally built thusly:
> # zpool history
> History for 'storage':
> 2008-07-11.23:15:40 zpool create storage raidz ad4 ad5 ad6 ad7
> I just bought four 1.5TB drives, in which I want to use to replace the
> 500GBs.
> Also, I've been loosely following some of the GPT threads, and I like
> the idea of using this type of label instead of the disk names themselves.

I personally haven't run into any bad problems using the full device, but
I suppose it could be a problem. (Side note - geom should learn how to
parse zfs labels so it could create something like /dev/zfs/<uuid> for
device nodes instead of using other trickery)

> How should I proceed? I'm assuming something like this:
> - add the new 1.5TB drives into the existing, running system
> - GPT label them
> - use 'zpool replace' to replace one drive at a time, allowing the pool
> to rebuild after each drive is replaced
> - once all four drives are complete, shut down the system, remove the
> four original drives, and connect the four new ones where the old ones were

If you have enough ports to bring all eight drives online at once, I would
recommend using 'zfs send' rather than the replacement. That way you'll
get something like a "burn-in" on your new drives, and I believe it will
probably be faster than the replacement process. Even on an active system,
you can use a couple of incremental snapshots and reduce the downtime to a
bare minimum.

> My understanding is, is that once the new labels are in place, I don't
> have to worry about the fact that the device name has been changed (eg
> ad8 to ad4), the system doesn't care anymore about that. Is this correct?
> Any other advice/tips that those experienced can share with me?
> Steve
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list