Replace drive in RAIDz2 w/o losing redundancy

Status
Not open for further replies.

joerawr

Dabbler
Joined
Sep 14, 2014
Messages
20
I've got a 3TB x 6 disk RaidZ2. I've added a 7th 3TB drive and I want to use it to replace one of the six in the RaidZ2 (I'm slowly replacing a few hot running Seagate Constellations with Reds and Greens).

Let's say ADA4 is the disk I want to replace, and ADA0 is the new disk. ADA4 hasn't failed. Is there a way to tell the system that ADA0 is going to replace ADA4, so mirror all content to it and keep it in sync until 'replaced', without losing the 2 disk redundancy? That makes sense I hope. I've tried googling this, and maybe I'm getting my terminology wrong, but I've had no luck in finding if this is or isn't possible (or reasonable).

I think the standard way of approaching this is to stop all writes to the system (turning off services, etc) and then choose "replace" in the gui for ADA4, selecting ADA0 as the replacement. That sure sounds like I have dropped to just one disk of redundancy during the rebuilding process and seems unsafe/unwise. If ADA0, the new drive, decides to fail midway through the resilver, can I add ADA4 back in without resilvering?

 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I've got a 3TB x 6 disk RaidZ2. I've added a 7th 3TB drive and I want to use it to replace one of the six in the RaidZ2 (I'm slowly replacing a few hot running Seagate Constellations with Reds and Greens).

Let's say ADA4 is the disk I want to replace, and ADA0 is the new disk. ADA4 hasn't failed. Is there a way to tell the system that ADA0 is going to replace ADA4, so mirror all content to it and keep it in sync until 'replaced', without losing the 2 disk redundancy? That makes sense I hope. I've tried googling this, and maybe I'm getting my terminology wrong, but I've had no luck in finding if this is or isn't possible (or reasonable).

I think the standard way of approaching this is to stop all writes to the system (turning off services, etc) and then choose "replace" in the gui for ADA4, selecting ADA0 as the replacement. That sure sounds like I have dropped to just one disk of redundancy during the rebuilding process and seems unsafe/unwise. If ADA0, the new drive, decides to fail midway through the resilver, can I add ADA4 back in without resilvering?

No, that doesn't work, unfortunately. You have to remove one and then resilver. It would be a nice feature, though. If the new drive fails, the old one will have to be resilvered (the pool has changed, as these operations can only be done while it's mounted). Maybe (big maybe) ZFS will realize it can resilver only the differences, but don't count on it.

Just be sure to thoroughly test the drive before adding it to the pool and you should be fine even with reduced redundancy.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
You know you will have to Destroy the ADA0 drive (prep it for being used again), Remove the ADA4 drive, and Replace the ADA4 drive with the ADA0 drive.

As for redundancy, remember that in a RAIDZ2, you can loose 2 drives and your data is still safe.

One thing that bothered me was you stated you added a 7th 3TB drive. I hope you didn't add that (extend) to the RAIDZ2 pool because if you did, you're in trouble. Don't do anything until you have backed up all your data.
 

joerawr

Dabbler
Joined
Sep 14, 2014
Messages
20
Thanks guys. Figured as much. 7th drive is not part of the pool, or any pool for that matter. It's not even zfs formatted yet. I added a "hot swap" trayless bay to my case for doing snapshot / replications backups of different data sets to single disks (I'm not going hot swap, however. I'll remove and shutdown before pulling the disk). But using that 7th slot seemed like a brilliant way to swap out a non failed disk (for growing, etc). Oh well. I'm going to run a few large data set replications to the new drive to make sure it's not junk, then do the usual disk replace method.
 
Status
Not open for further replies.
Top