[systemd-devel] 'udevadm settle' brakes lvm on top of imsm raid

Tom Gundersen teg at jklm.no
Thu May 28 07:52:40 PDT 2015


On Thu, May 28, 2015 at 10:10 AM, Oleg Samarin <osamarin68 at gmail.com> wrote:
> Hi!
>
> I have an imsm raid-1 device /dev/md126 assembled of /dev/sda and /dev/sdb.
> I have a lvm group on top of /dev/md126p2 with some logical volumes. All
> this work fine with Fedora 21.
>
> I'm trying to fresh install Fedora 22 in some of lvm logical volume. I boot
> with Fedora USB live media and run "Install to hard disk". But anaconda does
> not see any existing lvm volumes so I can not choose them as a destination.
>
> I've created a bug https://bugzilla.redhat.com/show_bug.cgi?id=1178181 on
> this issue.
>
> After some discovering I found that the reason of this issue is that
> anaconda brakes lvm:
>
> before launching anaconda pvdisplay reports there are two physical volumes
> /dev/md126p2 and /dev/sdc2 (/dev/sdc is an SSD that does not belong any raid
> and contains a separate lvm volume group)
>
> after launching anaconda pvdisplay reports another two physical volumes
> /dev/sdb2 and /dev/sdc2, that is wrong, because /dev/sdb is a part of
> /dev/md126 raid.
>
> journalctl shows:
>
> May 28 02:44:08 localhost systemd[1]: Stopping LVM2 PV scan on device
> 259:1...
> May 28 02:44:08 localhost systemd[1]: Stopped LVM2 PV scan on device 259:1.
> May 28 02:44:08 localhost audit[1]: <audit-1131> pid=1 uid=0 auid=4294967295
> ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=lvm2-pvscan at 259:1
> comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=?
> res=success'
> May 28 02:44:09 localhost kernel:  sde:
> May 28 02:44:09 localhost kernel:  sda: sda1 sda2
> May 28 02:44:09 localhost systemd[1]: Starting LVM2 PV scan on device 8:2...
> May 28 02:44:09 localhost kernel:  sdb: sdb1 sdb2
>
> Seems lvm stops using /dev/md126p2 and starts using /dev/sdb2 at this moment
>
> I can see in anaconda program.log that it ran 'udevadm settle' at this
> moment:
>
> 02:44:07,141 INFO program: ...done [9] (exit code: 0)
> 02:44:09,290 INFO program: Running... udevadm settle --timeout=300
> 02:44:09,305 DEBUG program: Return code: 0
> 02:44:09,306 INFO program: Running... udevadm settle --timeout=300
> 02:44:09,315 DEBUG program: Return code: 0
>
> So 'udevadm settle' breaks lvm from using '/dev/md126p2'. Futher lvm rescans
> force it to use /dev/sdb2 instead.
>
> The attached storage.log contains a trace of udev events of this. All other
> logs are available
> in https://bugzilla.redhat.com/show_bug.cgi?id=1178181
>
> What is wrong? How to force lvm to use /dev/md126p2 instead of /dev/sdb2
> after starting anaconda?

This seems unlikely to be udevadm settle's fault. All it does is wait
for udev to process events, you may think of it as "sleep 5" or
something like that. It can obviously affect the timing of things, but
as Lennart said the underlying problem is surely elsewhere...

Cheers,

Tom


More information about the systemd-devel mailing list