I had a ZFS pool with 2 disks mirrored on Ubuntu 20.04.5. After a reboot, my pool has disappeared.
# zpool list
no pools available
It seems like I could just import it back.
# zpool import
pool: tank
id: 3813754442158920310
state: ONLINE
status: Some supported features are not enabled on the pool.
action: The pool can be imported using its name or numeric identifier, though
some features will not be available without an explicit 'zpool upgrade'.
config:
tank ONLINE
mirror-0 ONLINE
ata-WDC_WD50EZRZ-00GZ5B1_WD-WXB1HB4UTEJ3 ONLINE
ata-WDC_WD50EZRZ-00RWYB1_WD-WX81D65504PX ONLINE
But no luck, even though all of my devices appear to be ONLINE
.
# zpool import -f tank
cannot import 'tank': one or more devices is currently unavailable
zdb
reveals that disk ata-WDC_WD50EZRZ-00RWYB1_WD-WX81D65504PX
is faulted. It has faulted: 1
in the output below even though it appears to be ONLINE
in the output above.
# zdb
tank:
version: 5000
name: 'tank'
state: 0
txg: 33505997
pool_guid: 3813754442158920310
errata: 0
hostname: 'media'
com.delphix:has_per_vdev_zaps
vdev_children: 1
vdev_tree:
type: 'root'
id: 0
guid: 3813754442158920310
create_txg: 4
children[0]:
type: 'mirror'
id: 0
guid: 7547051995269212733
metaslab_array: 34
metaslab_shift: 35
ashift: 12
asize: 5000966701056
is_log: 0
create_txg: 4
com.delphix:vdev_zap_top: 212
children[0]:
type: 'disk'
id: 0
guid: 15850656511874441417
path: '/dev/disk/by-id/ata-WDC_WD50EZRZ-00GZ5B1_WD-WXB1HB4UTEJ3-part1'
whole_disk: 1
DTL: 240
create_txg: 4
com.delphix:vdev_zap_leaf: 213
children[1]:
type: 'disk'
id: 1
guid: 4587653728557222757
path: '/dev/disk/by-id/ata-WDC_WD50EZRZ-00RWYB1_WD-WX81D65504PX-part1'
whole_disk: 1
DTL: 239
create_txg: 4
com.delphix:vdev_zap_leaf: 214
faulted: 1
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
Based on this answer, I tried to import the pool using the partition of the good disk.
# zpool import -d /dev/disk/by-id/ata-WDC_WD50EZRZ-00GZ5B1_WD-WXB1HB4UTEJ3-part1
cannot open '/dev/sda1': Not a directory
-d
can be a dir or device and I'm not sure why zpool
reports that /dev/sda1
isn't a dir. All of my disks appear to be present.
# ll /dev/disk/by-id/ata*
lrwxrwxrwx 1 root root 9 Jan 14 22:26 /dev/disk/by-id/ata-KINGSTON_SV300S37A60G_50026B723703A5C2 -> ../../sdc
lrwxrwxrwx 1 root root 10 Jan 14 22:26 /dev/disk/by-id/ata-KINGSTON_SV300S37A60G_50026B723703A5C2-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Jan 14 22:26 /dev/disk/by-id/ata-KINGSTON_SV300S37A60G_50026B723703A5C2-part2 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Jan 14 22:26 /dev/disk/by-id/ata-KINGSTON_SV300S37A60G_50026B723703A5C2-part5 -> ../../sdc5
lrwxrwxrwx 1 root root 9 Jan 14 22:26 /dev/disk/by-id/ata-WDC_WD50EZRZ-00GZ5B1_WD-WXB1HB4UTEJ3 -> ../../sda
lrwxrwxrwx 1 root root 10 Jan 14 22:26 /dev/disk/by-id/ata-WDC_WD50EZRZ-00GZ5B1_WD-WXB1HB4UTEJ3-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jan 14 22:26 /dev/disk/by-id/ata-WDC_WD50EZRZ-00GZ5B1_WD-WXB1HB4UTEJ3-part9 -> ../../sda9
lrwxrwxrwx 1 root root 9 Jan 14 22:26 /dev/disk/by-id/ata-WDC_WD50EZRZ-00RWYB1_WD-WX81D65504PX -> ../../sdb
lrwxrwxrwx 1 root root 10 Jan 14 22:26 /dev/disk/by-id/ata-WDC_WD50EZRZ-00RWYB1_WD-WX81D65504PX-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Jan 14 22:26 /dev/disk/by-id/ata-WDC_WD50EZRZ-00RWYB1_WD-WX81D65504PX-part9 -> ../../sdb9
# ll /dev/sd*
brw-rw---- 1 root disk 8, 0 Jan 14 22:26 /dev/sda
brw-rw---- 1 root disk 8, 1 Jan 14 22:26 /dev/sda1
brw-rw---- 1 root disk 8, 9 Jan 14 22:26 /dev/sda9
brw-rw---- 1 root disk 8, 16 Jan 14 22:26 /dev/sdb
brw-rw---- 1 root disk 8, 17 Jan 14 22:26 /dev/sdb1
brw-rw---- 1 root disk 8, 25 Jan 14 22:26 /dev/sdb9
brw-rw---- 1 root disk 8, 32 Jan 14 22:26 /dev/sdc
brw-rw---- 1 root disk 8, 33 Jan 14 22:26 /dev/sdc1
brw-rw---- 1 root disk 8, 34 Jan 14 22:26 /dev/sdc2
brw-rw---- 1 root disk 8, 37 Jan 14 22:26 /dev/sdc5
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
...
sda 8:0 0 4.6T 0 disk
├─sda1 8:1 0 4.6T 0 part
└─sda9 8:9 0 8M 0 part
sdb 8:16 0 4.6T 0 disk
├─sdb1 8:17 0 4.6T 0 part
└─sdb9 8:25 0 8M 0 part
sdc 8:32 0 55.9G 0 disk
├─sdc1 8:33 0 48G 0 part /
├─sdc2 8:34 0 1K 0 part
└─sdc5 8:37 0 8G 0 part [SWAP]
AFAICT, I have one good disk so recovering from this situation should be doable. I have a replacement disk ready to go but I think I need recover the pool first before attempting a replacement.
Does anyone understand what could be wrong here or give me a kick in the right direction?