[Bug 1185394] Re: systemd-udev fails when processing many logical volumes on boot
Martin Pitt
martin.pitt at ubuntu.com
Mon Jun 3 10:39:39 UTC 2013
Stefan and I debugged and discussed that. The new udev has a reduced
number of parallel workers now (performance optimization, see Harald
Hoyer's measurements), which potentially leads to more serialization for
a huge number of events (as we get in initramfs by calling udevadm
trigger). This is one of the relevant changes between 175 and 202, as
Stefan pointed out in comment 7.
Our 0024-avoid-exit-deadlock-for-dm_cookie.patch only keeps those
workers running which process an uevent with DM_COOKIE. But that doesn't
catch the majority of the LVM related events (only the kernel-generated
change events on LVs after the virtual->physical mapping has been set
up). All the add events, as well as the change events for the other
block devices would still go to nirvana (i. e. the time between shutting
down udev in initramfs and bringing it back up in the real system).
We tried to trigger a change event for the missing LVs, but that does
not work as "vgchange -a y" already has all the /dev/dm-* set up, sees
no change, and thus does not cause a proper change event for the LV to
be generated. Hence the symlinks aren't created by our
/etc/init/udevtrigger.conf job. What does work is to "dmsetup remove"
the affected LVs and then call vgchange to re-add them, but finding the
affected LVs and doing that for all of them would duplicate a lot of the
work which is already happening in initramfs anyway, and thus be rather
expensive. It seems much more efficient to me to just do that detection
once, and just wait in initramfs until all LVs are complete.
http://people.canonical.com/~pitti/tmp/systemd/ (202-0ubuntu11pitti2)
does that approach now: It "udevadm settle"s in udev's initramfs-bottom
script IF lvm2 is installed (we could also check for /sys/block/dm-*,
but that's racy; we rather err on the side of doing an unnecessary
settle), and disables 0024-avoid-exit-deadlock-for-dm_cookie.patch as
the settle achieves the same goal in a more complete way.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1185394
Title:
systemd-udev fails when processing many logical volumes on boot
Status in “systemd” package in Ubuntu:
In Progress
Bug description:
With recent systemd/udev updates in Saucy I see problems when /dev
gets moved to the real root. It seems to be related to running
vgscan/vgchange through watershed by systemd-udevd. The symptoms
include a crash of one systemd-udevd process and several messages
about systemd-udevd (or childs of it) not finding files in /dev.
Setup:
sda: contains the root fs (no separate /boot) and a swap partition
sdb: contains vg1 with /home
sdc and sdd: contain vg2 with 31 LVs, one of them mounted to /home/isos
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1185394/+subscriptions
More information about the foundations-bugs
mailing list