Replace Failing Mirrored Drive?

Status
Not open for further replies.

spg900ny

Dabbler
Joined
Feb 10, 2012
Messages
28
So I'm not sure I did this right. Stupid me, I didn't follow the latest directions. I'm using 9.10.2-U2 (e1497f2).

I have two 4TB drives in a mirror: ada5 and ada3, where ada5 is starting to have unreadable sectors.

I plugged in a new drive which showed up as ada6, then went to the failing drive (ada5) and clicked "replace." The GUI allowed me to select the new drive (ada6) as a replacement. So I selected it. I thought this was what I was supposed to do, because other instructions I recalled reading before I installed the new drive said if the replace command was available on the failing drive, to use that.

Then I had three drives in the mirror all listed as online: ada3, ada5, and new drive ada6. Nothing else seemed to be happening.

So I decided to take failing drive ada5 offline. Then ada5 changed to that funky string of numbers, and it was offline, and the mirror started to resilver. I clicked on the funky string and selected replace, and it was going to let me re-select ada5 as the replacement, and I figured no, that can't be right. Since I suspected the resilvering couldn't happen on an offline drive, I felt it was safe to detach it.

So now I have ada3 and ada6 in the mirror and ada5 is nowhere to be found, which I assume is good? the ZDISK, mirror, and two drives (ada3 and ada6) are online, and the resilvering is continuing. Looks like it's going to take a very long time.

After it's done, I should be OK to shut down the box and remove ada5? Can I then move the new drive over to ada5 (it's a faster port) and FreeNAS will just detect it's over there when I restart?

Thanks for any reassurance....
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Can I then move the new drive over to ada5 (it's a faster port) and FreeNAS will just detect it's over there when I restart?
Yes.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Everything looks fine to me.

Sent from my Nexus 5X using Tapatalk
 

spg900ny

Dabbler
Joined
Feb 10, 2012
Messages
28
Thanks guys. Appreciate it. The mirror is online and healthy with the new drive and working old drive. It finished resilvering this morning. When I get home, I'll shut down & just yank the old drive and put the new drive in its place. Was a bit worried that I seemed to do this out of order, but everything seems OK. Pretty amazing stuff. Been using FreeNAS since Windows Home Server changed in 2011 and have loved it. Now that I have a server with a free SATA port, this was super easy. :)
 

Vito Reiter

Wise in the Ways of Science
Joined
Jan 18, 2017
Messages
232
Thanks guys. Appreciate it. The mirror is online and healthy with the new drive and working old drive. It finished resilvering this morning. When I get home, I'll shut down & just yank the old drive and put the new drive in its place. Was a bit worried that I seemed to do this out of order, but everything seems OK. Pretty amazing stuff. Been using FreeNAS since Windows Home Server changed in 2011 and have loved it. Now that I have a server with a free SATA port, this was super easy. :)

Oh yeah ZFS is some cool stuff man, keep in mind that you can offline the drive and pull it out and replace it prior to resilvering. Having a hot-spare already in for efficiency is good but if you ever run out of SATA ports, you can just replace the drive and then resilver.
 

spg900ny

Dabbler
Joined
Feb 10, 2012
Messages
28
Oh yeah ZFS is some cool stuff man, keep in mind that you can offline the drive and pull it out and replace it prior to resilvering. Having a hot-spare already in for efficiency is good but if you ever run out of SATA ports, you can just replace the drive and then resilver.

Thanks, Vito. I didn't know that! How does that work as far as the GUI goes? Do I do anything in the GUI before shutting down and yanking the drive?
 

Vito Reiter

Wise in the Ways of Science
Joined
Jan 18, 2017
Messages
232
Thanks, Vito. I didn't know that! How does that work as far as the GUI goes? Do I do anything in the GUI before shutting down and yanking the drive?

If you go into view disks > Identify the disk that is failing 'ada3' for example. Click ada3, at the bottom left you'll see an 'Offline' button, click it. After that, the disk which used to be labeled with a serial number is now a string of integers that ZFS uses to know what data was on it prior. Click that new string of numbers and click 'Replace' on the bottom, it will prompt you to choose a drive (At this point you can take out the old drive and swap the new) and choose the new drive. If it's in the same slot it will also be called 'ada3' if it's in a new slot it'll have a different name.

Now, you can even yank out the drive without Offlining it -While unrecommended, it's just the way ZFS works-. Offlining the disk first will make sure you don't lose any running IO's in the process.
 

spg900ny

Dabbler
Joined
Feb 10, 2012
Messages
28
What happens if you have to shutdown to remove the drive?
 

Vito Reiter

Wise in the Ways of Science
Joined
Jan 18, 2017
Messages
232
What happens if you have to shutdown to remove the drive?

Other than the fact that your NAS will be off during the period of switching the drives, nothing. If your volume has enough drives available (In your case half the mirror) it will still load the volume and when viewing disks you'll see that string of numbers I spoke of. From there just go about hitting the replace button. It is good practice however, to do that "Offline disk" function prior to shutting it down, just so ZFS knows that it doesn't need to look for that disk at the moment.
 
Status
Not open for further replies.
Top