Page 1 of 1

Cannot Replace Failing Disk

Posted: 04 Feb 2015 13:59
by budgynana
I have a 6 disk RAID-Z2 and 1 of my drives is failing so I'm trying to replace it. I'm trying to follow the documentation and offline the drive but cannot as it says my ada2.nop is missing/not present. Skipping this, I've gone to replace the drive and issued the command:

Code: Select all

zpool replace poolname ada2
But it won't do anything. I've tried the same command with ada2.nop but no dice either. I'm not at home at the moment so I can't give the exact errors I've received but basically the nop device, or lack of, seems to be getting in the way.

I'm using a mix of 4K and non 4K drives and when I built the array I enabled advanced formatting, which created .nop devices. I exported the pool and used gnop destroy to remove these. Now this seems to be coming back and preventing me proceeding as it is looking for the nop devices. How do I get around this?

Re: Cannot Replace Failing Disk

Posted: 04 Feb 2015 14:02
by b0ssman

Re: Cannot Replace Failing Disk

Posted: 04 Feb 2015 20:26
by budgynana
That's the guide I tried to follow. Weird thing is it's now working. Still couldn't get the GUI to replace the disk but command line is working this time, resilvering right at this moment.

Re: Cannot Replace Failing Disk

Posted: 04 Feb 2015 20:33
by raulfg3
remenber to sync detected & current in: Disks|ZFS|Configuration

PD: Button Sync at the botton page.

http://wiki.nas4free.org/doku.php?id=do ... n_detected

Re: Cannot Replace Failing Disk

Posted: 04 Feb 2015 23:25
by ChriZathens
I am not 100% sure, but IIRC, if you shut down the system, replace the bad drive with a new one, and then turn on, only then

Code: Select all

zpool replace poolname adax 
works. At least in my experience taking first the drive offline leads to the need of using clear config and import disks and then

Code: Select all

zpool replace poolname 5232342453356624 adax 

Not sure if it happens to everyone, but that's what I've experienced twice so far..
Perhaps the wiki needs a review at this point, or maybe simply I am doing something wrong. ..

Re: Cannot Replace Failing Disk

Posted: 03 Jun 2015 21:48
by Ian
I tried to follow the wiki, but something does not seem to be right.

I got a dropped disk, so I shutdown and replaced the disk in the same slot and with the same cable connected to the same sata port.

What I got was:
but got

Code: Select all

nas4free:~# zpool status
  pool: tank
 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 236K in 0h0m with 0 errors on Mon Jun  1 21:03:53 2015
config:

	NAME                     STATE     READ WRITE CKSUM
	tank                     DEGRADED     0     0     0
	  raidz2-0               DEGRADED     0     0     0
	    ada5p2               ONLINE       0     0     0
	    ada0p2               ONLINE       0     0     0
	    ada4p2               ONLINE       0     0     0
	    3012169731482246756  UNAVAIL      0     0     0  was /dev/ada1p2
	    ada2p2               ONLINE       0     0     0
	    ada3p2               ONLINE       0     0     0
The wiki says I should replace the disk with the command

Code: Select all

zpool replace <poolname> <device>
.
and provides the example:

Code: Select all

zpool replace pool0 ada2
On my system I tried the following:

Code: Select all

zpool replace tank ada1p2
But got back:

Code: Select all

cannot open 'ada1p2': no such GEOM provider. 
must be a full path or shorthand device name
The wiki also proves an example:

Code: Select all

zpool replace tank 8771208834592470066 ada1p1
Again on my system:

Code: Select all

zpool replace tank 3012169731482246756 ada1p2
but I got back:

Code: Select all

cannot open 'ada1p2': no such GEOM provider
must be a full path or shorthand device name
In fact I tried all kind of combinations:

"zpool replace tank ada1" => "cannot replace ada1 with ada1: no such device in pool"
"zpool replace tank /dev/ada1p2" => "cannot open '/dev/ada1p2': No such file or directory"
"zpool replace tank /dev/ada1" => "cannot replace /dev/ada1 with /dev/ada1: no such device in pool"
"zpool replace tank 30121697317482246756" => "cannot open '30121697317482246756': no such GEOM provider. must be a full path or shorthand device name"
"zpool replace tank 3012169731482246756 ada1p2" => "cannot open 'ada1p2': no such GEOM provider. must be a full path or shorthand device name"
"zpool replace tank 3012169731482246756 /dev/ada1p2 => "cannot open '/dev/ada1p2': No such file or directory"

Until I hit on:

Code: Select all

zpool replace tank 3012169731482246756 /dev/ada1
Bingo ...

Maybe it was just my machine, but what are the rules for the name of the BAD disk that should be used ?

Thanks
Ian

Re: Cannot Replace Failing Disk

Posted: 05 Jun 2015 06:25
by b0ssman
ada1p2 means ada1 device partition 2.
if you have not created partition 2 you can not use it.
therefore only ada1 exists.