[systemd-devel] dmraid devices considered dead
Ilya Basin
basinilya at gmail.com
Sat Dec 22 03:35:24 PST 2012
Hi list.
The root and the other mount points are all on one fake RAID0 disk.
The dmraid binary is called from initramfs.
Although the real root mounts quickly, other mount points cause
timeouts at boot time.
I think it's because the udev variable SYSTEMD_READY=0 is assigned to
the dmraid devices.
My questions are in the bottom of this letter.
I'm not familiar with udev, perhaps the info below is redundant.
I added the command:
udevadm monitor --udev --property > /run/udev-monitor.log 2>&1 &
to initramfs. Here's its output, filtered by one of the partitions:
UDEV [3.819854] add /devices/virtual/block/dm-3 (block)
ACTION=add
DEVNAME=/dev/dm-3
DEVPATH=/devices/virtual/block/dm-3
DEVTYPE=disk
DM_UDEV_DISABLE_DISK_RULES_FLAG=1
DM_UDEV_DISABLE_OTHER_RULES_FLAG=1
DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1
MAJOR=254
MINOR=3
SEQNUM=711
SUBSYSTEM=block
USEC_INITIALIZED=513
UDEV [4.330569] change /devices/virtual/block/dm-3 (block)
ACTION=change
DEVLINKS=/dev/disk/by-id/dm-name-isw_cbaaacigei_foobarp3 /dev/disk/by-id/dm-uuid-DMRAID-isw_cbaaacigei_foobarp3 /dev/disk/by-label/home /dev/disk/by-uuid/c83448ac-33f6-4f42-a05e-d0c35a62413f
DEVNAME=/dev/dm-3
DEVPATH=/devices/virtual/block/dm-3
DEVTYPE=disk
DM_COOKIE=4390912
DM_NAME=isw_cbaaacigei_foobarp3
DM_SUSPENDED=0
DM_UDEV_DISABLE_DM_RULES_FLAG=1
DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1
DM_UDEV_PRIMARY_SOURCE_FLAG=1
DM_UDEV_RULES_VSN=2
DM_UUID=DMRAID-isw_cbaaacigei_foobarp3
ID_FS_LABEL=home
ID_FS_LABEL_ENC=home
ID_FS_TYPE=ext3
ID_FS_USAGE=filesystem
ID_FS_UUID=c83448ac-33f6-4f42-a05e-d0c35a62413f
ID_FS_UUID_ENC=c83448ac-33f6-4f42-a05e-d0c35a62413f
ID_FS_VERSION=1.0
MAJOR=254
MINOR=3
SEQNUM=712
SUBSYSTEM=block
USEC_INITIALIZED=513
UDEV [7.275855] add /devices/virtual/block/dm-3 (block)
ACTION=add
DEVNAME=/dev/dm-3
DEVPATH=/devices/virtual/block/dm-3
DEVTYPE=disk
DM_UDEV_DISABLE_DISK_RULES_FLAG=1
DM_UDEV_DISABLE_OTHER_RULES_FLAG=1
DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG=1
MAJOR=254
MINOR=3
SEQNUM=1059
SUBSYSTEM=block
SYSTEMD_READY=0
TAGS=:systemd:
USEC_INITIALIZED=530
If I understand correctly, the "add" event is generated twice, which
is bad enough. And although in 10-dm.rules there are lines to prevent
the second "add" (grep DM_UDEV_PRIMARY_SOURCE_FLAG), they don't work,
because all the properties have vanished.
The rule thinks, it's a new device and the "add" event will be
followed by the "change" event, but it never happens.
It sets DM_UDEV_DISABLE_OTHER_RULES_FLAG=1 which causes
SYSTEMD_READY=0 in 99-systemd.rules
1) The main question is: why do the properties vanish?
2) How to make the systemd single-threaded to debug it?
3) How to execute a program on systemd events (unit
starting/started/failed) ? I want to execute this command:
cat /run/udev/data/b254\:3
to see at point it's erased.
More information about the systemd-devel
mailing list