LVM detecting failed disks

Alexander Hartner thahartner at gmail.com
Thu Nov 10 07:11:36 UTC 2022


We had a number of failed disks on a project which resulted in the affected
system entering a zombie state, where the disk was no longer accessible and
the host non responsive.

While investigating the issue we simulated  disk failure by detaching the
disk on virtualbox. Using this methodology we evaluated several different
combinations

MDADM RAID + LVM + XFS
LVM + ZFS
ZFS
LVM + EXT4
EXT4

We also tried to set the following kernel / disk options to trigger a panic
and automatically reboot the system

XFS:
sysctl -w fs.xfs.panic_mask=256
sysctl -w kernel.panic_on_io_nmi=1
sysctl -w kernel.panic=3
<Disk disconnect>

EXT4:
tune2fs -e panic /dev/mapper/ubuntu--vg-ubuntu--lv (or)
tune2fs -e panic /dev/sda2
sysctl -w kernel.panic=3
<Disk disconnect>


*Findings*
The results of our testing were that when using EXT4 we were able to
trigger a panic and reboot on some of the cases. However with XFS the above
options didn't work.

Also as soon as we added LVM to the setup, any errors were lost and the
system just continued attempting to access the disk and failed.

Is there an option in LVM to pass any hardware error detected on the
underlying disks to the file system and trigger a panic / reboot ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20221110/1a39cee5/attachment.html>


More information about the ubuntu-users mailing list