Replace RAIDZ2 Disks

All your general support questions for OpenZFS on OS X.

Replace RAIDZ2 Disks

Postby Dismayed » Fri Nov 06, 2015 2:26 pm

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.
Dismayed
 
Posts: 42
Joined: Wed Oct 14, 2015 7:09 am
Location: Boston, MA

Re: Replace RAIDZ2 Disks

Postby Brendon » Fri Nov 06, 2015 3:24 pm

Brendon
 
Posts: 286
Joined: Thu Mar 06, 2014 12:51 pm

Re: Replace RAIDZ2 Disks

Postby Dismayed » Fri Nov 06, 2015 5:17 pm

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?
Dismayed
 
Posts: 42
Joined: Wed Oct 14, 2015 7:09 am
Location: Boston, MA

Re: Replace RAIDZ2 Disks

Postby rottegift » Sun Nov 08, 2015 7:37 am

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
rottegift
 
Posts: 26
Joined: Fri Apr 25, 2014 12:00 am

Re: Replace RAIDZ2 Disks

Postby Dismayed » Mon Nov 09, 2015 6:26 am

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.
Dismayed
 
Posts: 42
Joined: Wed Oct 14, 2015 7:09 am
Location: Boston, MA


Return to General Help

Who is online

Users browsing this forum: Google [Bot] and 25 guests