How to replace a HDD in a raidz2 in 8.0.1 RC2

Status
Not open for further replies.

b0redom

Dabbler
Joined
Sep 2, 2011
Messages
40
Ok, before anyone starts, I know the rules are:

1 - Determine which hdd you will replace (let's say ada7) in a raidz1 (let's call it tank1)
2 - Id the physical disk
3 - Shut down the system
4 - Pull ada7 out of the system and replace it with a new disk in the same port
5 - Power-on the system (tank1 will be in a degrade state and /dev/ada7 unavailable)
6 - Issue a zpool replace tank1 ada7
7 - Let resilvering finish
8 - Issue a zpool detach tank1 /dev/ada7/old
9 - Issue a zpool export tank1
10 - Re-install FreeNAS from scratch - YES - you heard me right, from scratch.
11 - Do *NOT* restore your existing configuration. It will contain the info from the old hdd and will screw-up during boot time. You *must* re-input all the variables / configurations by hand.
12 - Do and Autoimport from the GUI to import tank1

I've got to step 6, but when I do:

zpool status I get:

[root@freenas] ~# zpool status -v storage
pool: storage
state: DEGRADED
status: One or more devices could not be opened. Sufficient replicas exist for
the pool to continue functioning in a degraded state.
action: Attach the missing device and online it using 'zpool online'.
see: http://www.sun.com/msg/ZFS-8000-2Q
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
storage DEGRADED 0 0 0
raidz2 DEGRADED 0 0 0
gptid/8b40e925-e858-11e0-af74-d485646aaff3 ONLINE 0 0 0
gptid/8be2a51c-e858-11e0-af74-d485646aaff3 ONLINE 0 0 0
gptid/8c93a531-e858-11e0-af74-d485646aaff3 ONLINE 0 0 0
16836198783249058229 UNAVAIL 0 0 0 was /dev/gptid/8d5002a8-e858-11e0-af74-d485646aaff3
gptid/8defece2-e858-11e0-af74-d485646aaff3 ONLINE 0 0 0

errors: No known data errors
[root@freenas] ~#

Now I happen to know the faulty disk was ada3, so do I just do a:

zpool replace storage ada3

Where have these gptids suddenly come from?

Cheers....

b0redom
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I can't explain the gptids, but everything looks like you're on track. You need to do step 8:

zpool detach tank /dev/gptid/8d5002a8-e858-11e0-af74-d485646aaff3

Then do steps 9 & 12. Those instructions were written around beta-3.
 

b0redom

Dabbler
Joined
Sep 2, 2011
Messages
40
Hmmm. I did 1-8, then a zpool scrub.

I then tried a zpool export and got:

cannot unmount '/mnt/storage': Device busy

But a reboot seems to bring it back.

Trying an upgrade to 8.0.1 and will report back with my findings.

b0redom
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hmmm. I did 1-8, then a zpool scrub

Just for future reference, when you replace a disk it 'resilvers' the disks, but resilvering and scrubbing involve the same process so you don't need to do the scrub.

cannot unmount '/mnt/storage': Device busy

If you were logged in at the console and were anywhere in the /mnt/storage folder, you'll get this error. Also if some other process is using a file in there you'll have the same problem. Try just cd'ing to / before doing the export. 8.01 does a slightly better job at some parts of replacing a disk, but still doesn't have it completely right.
 

shewless

Dabbler
Joined
Oct 10, 2011
Messages
24
Sorry this doesn't help solve the problem.. I'm just wondering.. you _really_ have to install FreeNAS from scratch if you lose a disk? That seems... well... bad.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
you _really_ have to install FreeNAS from scratch if you lose a disk? That seems... well... bad.
No, that's an extreme situation. Sometimes the database just doesn't want to forget certain settings, even a factory reset doesn't clear it. There was a ticket for that, but I think it's been resolved. Still though, I helped someone recently that had 2 pools, one with 4 disks, and another with 3. They deleted the first pool because they wanted to recreate it, but the database still thought the disks were part of a pool and wouldn't allow them to re-use the disks to create a new pool. The only option was to either 'factory reset', or in this case I helped them clean out those entries in the database so they didn't have to recreate all of their settings by hand. Restoring from saved settings would have restored the problem also. I think this was an 8.01 RC release. The settings database still needs some fine tuning.
 
Status
Not open for further replies.
Top