We see sequences like:
UEVENT[1176966403.907336] add@/block/dasda
UDEV [1176966403.920359] add@/block/dasda
UEVENT[1176966403.964379] add@/block/dasda/dasda1
UEVENT[1176966403.964438] add@/block/dasda/dasda2
UEVENT[1176966403.964483] online@/block/dasda
UEVENT[1176966403.964519] online@/block/dasda/dasda1
UEVENT[1176966403.964555] online@/block/dasda/dasda2
UDEV [1176966403.967413] add@/block/dasda/dasda1
UDEV [1176966403.968719] add@/block/dasda/dasda2
UDEV [1176966403.974750] online@/block/dasda/dasda1
UDEV [1176966403.982241] online@/block/dasda/dasda2
UDEV [1176966403.999847] online@/block/dasda
where the event for the disk (last event) should come before the
events for the partitons. We skipped events for dependency reasons,
but the dependency check for later events did not see the skipped
events.
Some broken usb-storage devices implement multiple
luns with all the same SCSI identifiers. Append the
target:lun to get unique names in /dev/disk/by-id/.
Symlinks can have priorities now, the priority is assigned to the device
and specified with OPTIONS="link_priority=100". Devices with higher
priorities overwrite the symlinks of devices with lower priorities.
If the device, that currently owns the link goes away, the symlink
will be removed, and recreated, pointing to the next device with the
highest actual priority.
This should solve the issue, that inserting an USB-stick may overwrite the
/dev/disk/by-id/-link of another disk, and removes the entire link after the
USB-stick is disconnected. If no priorities are specified, the new link will
overwrite the current one, and if the device goes away, it will restore
the old link. It should be possible to assign lower priorities to removable
devices, if needed.
In multipath setups, we see several devices, which all connect to the same
volume, and therefore all try to create the same metadata-links. The
different path-devices are combined into one device-mapper device, which also
contains the same metadata. It should be possible, to assign multipath-table
device-mapper devices a higher priority, so path-devices that appear and
disappear, will not overwrite or delete the device-mapper device links.
It occurs, when root-partition has no /dev/console, meaning that kernel
could not open it, and such udevd is started without open filedescriptors
0 1 2. In that case udevd openes its sockets (netlink and control). They
get fds between 0 and 2. Later duping /dev/null to 0 1 2 closes the sockets
and replaces them with /dev/null.
The error condition can also be reproduced by starting udevd with this
command-line:
udevd --daemon <&- >&- 2>&-