Hi All,
I wanted to share my experience last night which was odd and so I wanted to make what I did indexable for future!
So, the first part is unrelated, I was reflashing my Mellanox CX3-Pro 40GbE card (4099) and needed to reboot.
When it came back up, half of my ZFS pools were missing and the other half broken. WTF?
When I did
Then I did zdb -dep with -G to get more debug, it was a saying the devices didn't exist.
But the fdisk -l showed the partitions existed!?!
Then ls -la /dev/disk/by-id/ showed that the partitions weren't showing up in the device tree?!
After some searching, I found it could have been related to udev function in systemd.
Then I did partprobe and it recreated the symlinks in the dev tree for the missing partitions. Partprobe alone didn't seem to recover things, but using udevadm before it definitely helped.
If anyone knows what the root cause of this is, I'd appreciate it! Because next time the server reboots I don't want to do this again.
I wanted to share my experience last night which was odd and so I wanted to make what I did indexable for future!
So, the first part is unrelated, I was reflashing my Mellanox CX3-Pro 40GbE card (4099) and needed to reboot.
When it came back up, half of my ZFS pools were missing and the other half broken. WTF?
When I did
it said that some of the devices were UNAVAILzpool import -d /dev/sda1
pool: bigone
id: 18208768974987298556
state: UNAVAIL
status: One or more devices contains corrupted data.
action: The pool cannot be imported due to damaged devices or data.
see: Message ID: ZFS-8000-5E — OpenZFS documentation
config:
bigone UNAVAIL insufficient replicas
raidz2-0 UNAVAIL insufficient replicas
sda ONLINE
ata-ST4000VN006-3CW104_ZW60BY21 ONLINE
ata-ST4000VN008-2DR166_ZDHAHMJG UNAVAIL
ata-ST4000VN008-2DR166_ZGY97GD3 UNAVAIL
ata-ST4000VN006-3CW104_ZW60896Z ONLINE
ata-ST4000VN006-3CW104_ZW6088TR ONLINE
ata-ST4000VN008-2DR166_ZDHAH42Q UNAVAIL
ata-ST4000VN008-2DR166_ZDHAX86T UNAVAIL
id: 18208768974987298556
state: UNAVAIL
status: One or more devices contains corrupted data.
action: The pool cannot be imported due to damaged devices or data.
see: Message ID: ZFS-8000-5E — OpenZFS documentation
config:
bigone UNAVAIL insufficient replicas
raidz2-0 UNAVAIL insufficient replicas
sda ONLINE
ata-ST4000VN006-3CW104_ZW60BY21 ONLINE
ata-ST4000VN008-2DR166_ZDHAHMJG UNAVAIL
ata-ST4000VN008-2DR166_ZGY97GD3 UNAVAIL
ata-ST4000VN006-3CW104_ZW60896Z ONLINE
ata-ST4000VN006-3CW104_ZW6088TR ONLINE
ata-ST4000VN008-2DR166_ZDHAH42Q UNAVAIL
ata-ST4000VN008-2DR166_ZDHAX86T UNAVAIL
root@vmhost1:/usr/sbin# zdb -dep /dev/sdb1 -G bigone
zdb: can't open 'bigone': No such file or directory
ZFS_DBGMSG(zdb) START:
spa.c:6098:spa_import(): spa_import: importing bigone
spa_misc.c:418:spa_load_note(): spa_load(bigone, config trusted): LOADING
spa_misc.c:418:spa_load_note(): spa_load(bigone, config untrusted): vdev tree has 1 missing top-level vdevs.
spa_misc.c:418:spa_load_note(): spa_load(bigone, config untrusted): current settings allow for maximum 0 missing top-level vdevs at this stage.
spa_misc.c:403:spa_load_failed(): spa_load(bigone, config untrusted): FAILED: unable to open vdev tree [error=2]
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 0: root, guid: 18208768974987298556, path: N/A, can't open
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 0: raidz, guid: 1389112146403432605, path: N/A, can't open
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 0: disk, guid: 6576567205135368536, path: /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDHAX6MF-part1, can't open
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 1: disk, guid: 11223351249977905860, path: /dev/sdb1, healthy
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 2: disk, guid: 18406418524549592766, path: /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDHAHMJG-part1, can't open
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 3: disk, guid: 12249813091560993336, path: /dev/disk/by-id/ata-ST4000VN008-2DR166_ZGY97GD3-part1, can't open
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 4: disk, guid: 16845159498843104203, path: /dev/disk/by-id/ata-ST4000VN006-3CW104_ZW60896Z-part1, healthy
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 5: disk, guid: 3727851619167910069, path: /dev/disk/by-id/ata-ST4000VN006-3CW104_ZW6088TR-part1, healthy
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 6: disk, guid: 14363383109377104818, path: /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDHAH42Q-part1, can't open
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 7: disk, guid: 6356202158419617414, path: /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDHAX86T-part1, can't open
spa_misc.c:418:spa_load_note(): spa_load(bigone, config untrusted): UNLOADING
ZFS_DBGMSG(zdb) END
zdb: can't open 'bigone': No such file or directory
ZFS_DBGMSG(zdb) START:
spa.c:6098:spa_import(): spa_import: importing bigone
spa_misc.c:418:spa_load_note(): spa_load(bigone, config trusted): LOADING
spa_misc.c:418:spa_load_note(): spa_load(bigone, config untrusted): vdev tree has 1 missing top-level vdevs.
spa_misc.c:418:spa_load_note(): spa_load(bigone, config untrusted): current settings allow for maximum 0 missing top-level vdevs at this stage.
spa_misc.c:403:spa_load_failed(): spa_load(bigone, config untrusted): FAILED: unable to open vdev tree [error=2]
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 0: root, guid: 18208768974987298556, path: N/A, can't open
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 0: raidz, guid: 1389112146403432605, path: N/A, can't open
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 0: disk, guid: 6576567205135368536, path: /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDHAX6MF-part1, can't open
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 1: disk, guid: 11223351249977905860, path: /dev/sdb1, healthy
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 2: disk, guid: 18406418524549592766, path: /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDHAHMJG-part1, can't open
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 3: disk, guid: 12249813091560993336, path: /dev/disk/by-id/ata-ST4000VN008-2DR166_ZGY97GD3-part1, can't open
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 4: disk, guid: 16845159498843104203, path: /dev/disk/by-id/ata-ST4000VN006-3CW104_ZW60896Z-part1, healthy
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 5: disk, guid: 3727851619167910069, path: /dev/disk/by-id/ata-ST4000VN006-3CW104_ZW6088TR-part1, healthy
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 6: disk, guid: 14363383109377104818, path: /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDHAH42Q-part1, can't open
vdev.c:212:vdev_dbgmsg_print_tree(): vdev 7: disk, guid: 6356202158419617414, path: /dev/disk/by-id/ata-ST4000VN008-2DR166_ZDHAX86T-part1, can't open
spa_misc.c:418:spa_load_note(): spa_load(bigone, config untrusted): UNLOADING
ZFS_DBGMSG(zdb) END
Then ls -la /dev/disk/by-id/ showed that the partitions weren't showing up in the device tree?!
After some searching, I found it could have been related to udev function in systemd.
I believe this posts a message to udev which wakes things up? (someone confirm to me?)udevadm test --action=add /sys/class/block/sd*
Then I did partprobe and it recreated the symlinks in the dev tree for the missing partitions. Partprobe alone didn't seem to recover things, but using udevadm before it definitely helped.
pool: bigone
state: ONLINE
scan: scrub in progress since Mon May 8 01:24:08 2023
250G scanned at 9.98G/s, 2.14M issued at 87.8K/s, 6.13T total
0B repaired, 0.00% done, no estimated completion time
config:
NAME STATE READ WRITE CKSUM
bigone ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
ata-ST4000VN008-2DR166_ZDHAX6MF ONLINE 0 0 0
ata-ST4000VN006-3CW104_ZW60BY21 ONLINE 0 0 0
ata-ST4000VN008-2DR166_ZDHAHMJG ONLINE 0 0 0
ata-ST4000VN008-2DR166_ZGY97GD3 ONLINE 0 0 0
ata-ST4000VN006-3CW104_ZW60896Z ONLINE 0 0 0
ata-ST4000VN006-3CW104_ZW6088TR ONLINE 0 0 0
ata-ST4000VN008-2DR166_ZDHAH42Q ONLINE 0 0 0
ata-ST4000VN008-2DR166_ZDHAX86T ONLINE 0 0 0
errors: No known data errors
state: ONLINE
scan: scrub in progress since Mon May 8 01:24:08 2023
250G scanned at 9.98G/s, 2.14M issued at 87.8K/s, 6.13T total
0B repaired, 0.00% done, no estimated completion time
config:
NAME STATE READ WRITE CKSUM
bigone ONLINE 0 0 0
raidz2-0 ONLINE 0 0 0
ata-ST4000VN008-2DR166_ZDHAX6MF ONLINE 0 0 0
ata-ST4000VN006-3CW104_ZW60BY21 ONLINE 0 0 0
ata-ST4000VN008-2DR166_ZDHAHMJG ONLINE 0 0 0
ata-ST4000VN008-2DR166_ZGY97GD3 ONLINE 0 0 0
ata-ST4000VN006-3CW104_ZW60896Z ONLINE 0 0 0
ata-ST4000VN006-3CW104_ZW6088TR ONLINE 0 0 0
ata-ST4000VN008-2DR166_ZDHAH42Q ONLINE 0 0 0
ata-ST4000VN008-2DR166_ZDHAX86T ONLINE 0 0 0
errors: No known data errors
If anyone knows what the root cause of this is, I'd appreciate it! Because next time the server reboots I don't want to do this again.