After an embarrassing session trying to replace a disk in my ZFS pool, I have a bunch of entries representing disks that are no longer present in the system:
NAME STATE READ WRITE CKSUM
data DEGRADED 0 0 0
mirror-0 DEGRADED 141K 0 0
replacing-0 UNAVAIL 0 0 0 insufficient replicas
15005414211141553750 UNAVAIL 0 0 0 was /dev/sdb2
3582694243925899896 UNAVAIL 0 0 0 was /dev/disk/by-path/pci-0000:00:1f.2-ata-3-part1
sda ONLINE 0 0 141K
mirror-1 ONLINE 0 0 0
sdc ONLINE 0 0 0
sdd ONLINE 0 0 0
How can I get rid of the disks listed as replacing-0
? Once this is cleared I should be able to correctly add the new disk to the system and run the replace
command to resilver.
A zpool replace
fails:
user@server:~$ sudo zpool replace data 3582694243925899896 /dev/disk/by-id/ata-ST16000NM001G-2KK103_ZL2KGLN4
cannot replace 3582694243925899896 with /dev/disk/by-id/ata-ST16000NM001G-2KK103_ZL2KGLN4: /dev/disk/by-id/ata-ST16000NM001G-2KK103_ZL2KGLN4 is busy, or device removal is in progress
A zpool detach
also fails:
user@server:~$ sudo zpool detach data 3582694243925899896
cannot detach 3582694243925899896: no valid replicas