Page 1 of 1

Replace RAIDZ2 Disks

PostPosted: Fri Nov 06, 2015 2:26 pm
by Dismayed
I've moved up from the Absolute Beginners section. I've succeeded in building a RAIDZ2 pool using Release 1.4.5 with 4 disks in my 2010 Mac Pro running El Capitan. I even created a couple of datasets, loaded a bit of data, and ran a scrub. So far everything works well.

But now I want to replace the 1 TB drives with larger drives. I want to remove one drive at a time and replace it with a larger drive in the same drive bay. I know that I'll need to resilver before repeating the process. But what I'm not sure of is the commands to use.

If this fails I can replace the data from one of several backups.

Thanks.

Re: Replace RAIDZ2 Disks

PostPosted: Fri Nov 06, 2015 3:24 pm
by Brendon

Re: Replace RAIDZ2 Disks

PostPosted: Fri Nov 06, 2015 5:17 pm
by Dismayed
Thanks, Brendon. So I should shut down my Mac, remove a drive, and restart? That will create a degraded pool. Do I need the 'Destroy' command if I'm using a new drive and not reusing a drive as in the example?

Re: Replace RAIDZ2 Disks

PostPosted: Sun Nov 08, 2015 7:37 am
by rottegift
You can do it that way: replace a drive (physically and then you have to issue zpool replace) and let it resilver, replace another drive, and let it resilver, and when all the drives are done, you run zpool online -e device.

However, it's likely to be much faster to build a brand new pool with all four bigger disks, and use zfs send/recv to copy the data from the old disks. (One read from old pool, one write to new pool, compared with one read+one write on the old pool for each disk replaced).

For example:

zfs snapshot -r oldpool@to-newpool
zfs send -nv -R oldpool@to-newpool | zfs recv -nv -u -F newpool

Re: Replace RAIDZ2 Disks

PostPosted: Mon Nov 09, 2015 6:26 am
by Dismayed
Thanks, rottegift. That would be faster, but I don't have a spare 4 bay enclosure, so I had to replace the disks one at a time. the resilver was very fast, though, because I'd only added a bit of test data to the pool. And now I feel certain that I can handle a drive failure.