Comment 16 for bug 1834250

Revision history for this message
Andreas (ab-com) wrote :

You can prevent lvm2 from scanning the card reader by using the global filter. Instead of using drive letters for the filter, like 'sde' which is liable to change, use the id of the device(s).

E.g.:
# ls -l /dev/disk/by-id/ | grep sd[e-h]

lrwxrwxrwx 1 root root 9 Apr 13 11:06 usb-Generic_USB_CF_Reader_058F312D81B-0:1 -> ../../sdf
lrwxrwxrwx 1 root root 9 Apr 13 11:06 usb-Generic_USB_MS_Reader_058F312D81B-0:3 -> ../../sdh
lrwxrwxrwx 1 root root 9 Apr 13 11:06 usb-Generic_USB_SD_Reader_058F312D81B-0:0 -> ../../sde
lrwxrwxrwx 1 root root 9 Apr 13 11:06 usb-Generic_USB_SM_Reader_058F312D81B-0:2 -> ../../sdg

Since all card reader slot device ids contain the unique 'Reader_058F312D81B', you can use the following global filter in lvm.conf.

"r|/dev/disk/by-id/.*Reader_058F312D81B.*" # filter out card reader slots

Good luck!