udev rule bug: LUKS on LVM doesn't expose labels

Patrick Plenefisch <[email protected]> Fri, 22 Mar 2024 14:18:24 -0400
Newsgroups dev.linux.lists.lvm-devel
Message-ID <CAOCpoWfYjOVNJNt+cnOVXDHiDq2wRogTqBijcUoa7chqOLRa5Q@mail.gmail.com>
Hi,

I noticed that my LUKS-on-LVM setup wasn't generating
/dev/disk/by-label symlinks. After some poking around, I realized that
the udev rule doesn't include crypto devices:

udev/13-dm-disk.rules.in:40

ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*",
SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"

In contrast, the uuid rule does support crypto devices:

udev/13-dm-disk.rules.in:39

ENV{ID_FS_USAGE}=="filesystem|other|crypto",
ENV{ID_FS_UUID_ENC}=="?*",
SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"

Adding "|crypto" to the label rule and everything seems to work fine
on my end. Is there some other behavior I'm missing here, or is this a
bug in the udev rules?

Patrick