linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] udev/10-dm.rules.in: unexpectedly skipping device?
@ 2020-04-17  7:42 Michael Stapelberg
  2020-04-17 12:57 ` Peter Rajnoha
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Stapelberg @ 2020-04-17  7:42 UTC (permalink / raw)
  To: linux-lvm; +Cc: prajnoha

Hey,

I’m starting to use LVM (+LUKS) on a computer of mine, but ran into
trouble getting it to work.

The issue I’m running into is that systemd boot hangs until the
default unit timeout elapses. This is because the cryptroot device is
not found, which in turn is because udev doesn’t create the symlinks
(e.g. in /dev/disk/by-uuid). udevadm info shows:

# udevadm info -p /sys/block/dm-0
P: /devices/virtual/block/dm-0
N: dm-0
L: 0
E: DEVPATH=/devices/virtual/block/dm-0
E: DEVNAME=/dev/dm-0
E: DEVTYPE=disk
E: MAJOR=254
E: MINOR=0
E: SUBSYSTEM=block
E: USEC_INITIALIZED=6522555
E: DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1
E: DM_UDEV_DISABLE_DISK_RULES_FLAG=1
E: DM_UDEV_DISABLE_OTHER_RULES_FLAG=1
E: SYSTEMD_READY=0
E: TAGS=:systemd:

I pinpointed this result to udev rule
https://sourceware.org/git/?p=lvm2.git;a=blob;f=udev/10-dm.rules.in;hb=ecae76c713bd4fa6c9d8f2a2c990625e4f38b504#l87,
i.e.:
ENV{DM_UDEV_RULES_VSN}!="1", ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}!="1",
GOTO="dm_disable"

I assume I’m running into this rule because I’m using a custom initrd
which does not run systemd nor udev. Instead, my initrd is directly
calling vgchange -ay and vgmknodes.

I understand that this is not a common setup, but booting without
systemd/udev in the initrd should be supported, no?

I’m not sure where DM_UDEV_PRIMARY_SOURCE_FLAG is supposed to be set,
or why it isn’t set in my scenario. Do you have any ideas regarding
what I could check?

Thanks in advance,
Best regards,
Michael

PS: As a workaround, I’m just commenting out that rule. Does that have
any negative consequences?

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

end of thread, other threads:[~2020-04-18 17:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17  7:42 [linux-lvm] udev/10-dm.rules.in: unexpectedly skipping device? Michael Stapelberg
2020-04-17 12:57 ` Peter Rajnoha
2020-04-18 17:46   ` Michael Stapelberg

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).