Actually, you can replace them all at once, as long as you don't unplug
the old ones first.  Let's say you have a raidz2 setup like this:

mypool
        raidz2
                a
                b
                c
                d

and you say this:

# zpool replace mypool a A
# zpool replace mypool b B
# zpool replace mypool c C
# zpool replace mypool d D

Your pool configuration will then become:

mypool
        raidz2
                replacing
                        a
                        A
                replacing
                        b
                        B
                replacing
                        c
                        C
                replacing
                        d
                        D

The original drives (a, b, c, d) will remain in the pool until the
new drives (A, B, C, D) have all the data, at which point the old
drives will be detached and the final pool configuration will be:

mypool
        raidz2
                A
                B
                C
                D

This assumes, of course, that you have enough slots to plug them all in.
If you're slot-limited -- i.e. you can't add a new drive without pulling
and old one -- then Eric is right, and in fact I'd go further: in that
case, replace only one at a time so you maintain the ability to survive
a disk failing while you're going all this.

Jeff

On Sat, Oct 11, 2008 at 06:37:17PM -0700, Erik Trimble wrote:
> Jeff Bonwick wrote:
> >One suggestion: replace as many disks as you intend to at the same time,
> >so that ZFS only has to do one resilver operation.  It's faster that way.
> >
> >Jeff
> >  
> Just to be more clear on this: 
> 
> Assuming you have data you care about on the current raidz2 zpool, you 
> should replace UP TO [2] drives at once.  That way, you minimize 
> re-silver times, while keeping all your data intact.  If you replace 
> more than 2 at ones, you'll destroy the array's redundancy, and have to 
> restore the data from backup.  If you replace one at a time, you'll have 
> to wait for each to resilver before replacing anymore.
> 
> If you don't care about the data, then, just destroy the zpool, replace 
> the drives, and recreate the zpool from scratch. It's faster and easier 
> than waiting for the resilvers.
> 
> 
> -- 
> Erik Trimble
> Java System Support
> Mailstop:  usca22-123
> Phone:  x17195
> Santa Clara, CA
> 
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to