Page 1 of 1

help with failed harddrive replacement in zfs

Posted: 31 Jan 2014 20:23
by supercazzola
last evening, I found an email from my NAS4free system that my zfs pool was degraded.

It listed the drive, so I powered down the system and removed the drive.
Installed a new identical drive, and
saw this:
  • pool: mediapool
    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://illumos.org/msg/ZFS-8000-2Q
    scan: resilvered 7.21G in 0h4m with 0 errors on Thu Jan 30 06:52:43 2014
    config:

    NAME STATE READ WRITE CKSUM
    mediapool DEGRADED 0 0 0
    raidz2-0 DEGRADED 0 0 0
    ada0.nop ONLINE 0 0 0
    ada1.nop ONLINE 0 0 0
    ada2.nop ONLINE 0 0 0
    12183209071186990595 UNAVAIL 0 0 0 was /dev/ada3.nop
    ada4.nop ONLINE 0 0 0
    ada5.nop ONLINE 0 0 0

    errors: No known data errors
Under disk management, I saw some errors so I cleared config and imported disks.

Now, my new drive, ada3, is listed as "unknown or unformatted", and when I go to the disk - format menu, it is not listed there as available to format.

I read there were some bugs related to this http://sourceforge.net/p/nas4free/bugs/69/#aa1d (at least it seems similar), but the person used chrome tools to edit the dropdown list to add /dev/ada3 to the list to mark for formatting. I do not know how to do this.

Can anyone please direct me how to get /dev/ad3 formatted / recognized so I can replace it in the zfs pool?

if I try
  • zpool replace mediapool ada3
I get
  • cannot replace ada3 with ada3: no such device in pool
thank you in advance for your help.

Re: help with failed harddrive replacement in zfs

Posted: 31 Jan 2014 20:59
by supercazzola
old config was:

Code: Select all

	
/dev/ada0 S/N: W1F2A9KX 
/dev/ada1 S/N: W1F1NP0V
/dev/ada2 S/N: W1F1NPPQ
/dev/ada3 S/N: W1F1NQH0
/dev/ada4 S/N: W1F1PPMM 
/dev/ada5 S/N: WIFIK778
and ada5 was the drive I removed.

now the setup shows

Code: Select all

	
/dev/ada0 S/N: W1F2A9KX 
/dev/ada1 S/N: W1F1NP0V
/dev/ada2 S/N: W1F1NPPQ
/dev/ada3 S/N: Z1F41BHX
/dev/ada4 S/N: W1F1NQH0
/dev/ada5 S/N: W1F1PPMM 


So it seems that somehow, my ada5 was moved into position ada3.
I'm still not sure what to do to fix my problem

Re: help with failed harddrive replacement in zfs

Posted: 31 Jan 2014 21:06
by supercazzola
I somehow managed to remember I had a similar issue one time before, and I checked the history of the zfspool.
It seems by running the commands

Code: Select all

zpool offline mediapool ada3.nop
zpool import -d /dev -f -a
zpool replace mediapool ada3.nop
I may have kicked off the resilvering.

I'll report back if successful. But this still leaves me confused why the new drive wasn't showing up under format.