lvm-devel.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* udev rule bug: LUKS on LVM doesn't expose labels
@ 2024-03-22 18:18 Patrick Plenefisch
  2024-03-25  9:33 ` Peter Rajnoha
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Plenefisch @ 2024-03-22 18:18 UTC (permalink / raw)
  To: lvm-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: udev rule bug: LUKS on LVM doesn't expose labels
  2024-03-22 18:18 udev rule bug: LUKS on LVM doesn't expose labels Patrick Plenefisch
@ 2024-03-25  9:33 ` Peter Rajnoha
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Rajnoha @ 2024-03-25  9:33 UTC (permalink / raw)
  To: Patrick Plenefisch, lvm-devel

On 3/22/24 19:18, Patrick Plenefisch wrote:
> 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?

Yes, indeed, it's missing. Thank you for reporting that!

Fixed here: https://gitlab.com/lvmteam/lvm2/-/commit/f09a9927207f81b33b9eee8ac5660d90e695dad1

-- 
Peter


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-25  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-22 18:18 udev rule bug: LUKS on LVM doesn't expose labels Patrick Plenefisch
2024-03-25  9:33 ` Peter Rajnoha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).