LVM LUKS Volume on External USB HDD Buffer I/O Error After Suspend
Symptoms
- External USB HDD with LUKS in LVM cannot be mounted after suspend
- Mounting or unlocking through any Gnome GUI results in a GNOME Error “Error unlocking device”
- Unlocking the LUKS volume gives an error:
# cryptsetup open /dev/extvg/extlv ext-hdd
Device /dev/extvg/extlv is not a valid LUKS device.
journalctl -k -b
shows errors after mount attempt:
buffer_io_error: 78 callbacks suppressed
Buffer I/O error on dev dm-3, logical block 0, async page read
Buffer I/O error on dev dm-3, logical block 1, async page read
Buffer I/O error on dev dm-3, logical block 2, async page read
Buffer I/O error on dev dm-3, logical block 3, async page read
Buffer I/O error on dev dm-3, logical block 4, async page read
Buffer I/O error on dev dm-3, logical block 5, async page read
Buffer I/O error on dev dm-3, logical block 6, async page read
Buffer I/O error on dev dm-3, logical block 7, async page read
Buffer I/O error on dev dm-3, logical block 0, async page read
Buffer I/O error on dev dm-3, logical block 1, async page read
Cause
Unknown
Solution
Recreating the /dev/mapper
symlinks seems to help.
- Lookup the dm-ID (
dm-3
here)
# ls -la /dev/mapper/
total 0
drwxr-xr-x 2 root root 160 18. Jan 19:26 .
drwxr-xr-x 24 root root 4600 18. Jan 19:28 ..
...
crw------- 1 root root 10, 236 17. Jan 22:49 control
lrwxrwxrwx 1 root root 7 18. Jan 19:06 extvg-extlv -> ../dm-3
- Remove the LVM volume via
dmsetup
# dmsetup remove /dev/dm-3
- Check the attributes in the LVM logical volumes scanner (
lvs
): Thea
(active) attribute is missing!
# lvs
LV VG Attr LSize
...
other-lv arch-vg -wi-ao---- 220.97g
extlv extvg -wi------- <7.28t
- Set the volume group to active to create the
/dev/mapper
symlinks
vgchange -a y extvg
- Mount your drive as usual