Bug#782793: systemd: ext4 filesystem on lvm on raid causes boot to enter emergency shell

Michael Biebl biebl at debian.org
Thu Apr 23 09:29:12 BST 2015


Am 23.04.2015 um 09:21 schrieb Rick Thomas:
> 
> On Apr 22, 2015, at 8:17 AM, Michael Biebl <biebl at debian.org> wrote:
> 
>> Am 22.04.2015 um 12:10 schrieb Rick Thomas:
>>> This works.  Interestingly, without the sleep loop the vgchange
>>> fails.
>>>
>>> Now, you say that a VM with two virtual disks configured as RAID1
>>> with a logical volume works fresh out of the box.  This makes me
>>> wonder if it’s some kind of a timing problem…  It takes a few seconds
>>> for the freshly rebooted system to find the USB-Flash sticks and
>>> assemble them.  So  some time-out is triggered in the systemd stuff
>>> on my setup, while your setup has no such physical constraints —
>>> everything is available immediately.
>>
>> So you're running vgchange in a loop, which suggests that the
>> lvm2-activation.service and lvm2-activation-early.service unitsas
>> shipped by lvm2 are not sufficient. Those are supposed to run vgchange.
>>
>> I notice, that the /etc/init.d/lvm2 init script has
>> Should-Start: mdadm-raid
>> but the systemd unit files have no such ordering.
>>
>> I wonder, if that makes a difference.
>>
>> Could you copy /lib/systemd/system/lvm2-activation.service to
>> /etc/systemd/system and add a line
>> After=mdadm-raid.service
>> to the [Unit] section.
> 
> 
> Odd… That didn’t work.  I was almost sure you had it nailed!  /-:

That was just a wild guess. Typically, the mdadm RAIDs should be
assembled via udev rules and not the SysV init script.

> It’s worth noting that there is no file named “mdadm-raid.service” anywhere that I could find in /etc/systemd/ or /lib/systemd/.
> Also, the files /lib/systemd/system/mdadm-waitidle.service  and /lib/systemd/system/mdadm.service are both symlinks to /dev/null.
> 
> Does that tell you anything?
> 
> Attached is the output of journalctl for that boot…
> 
> The potentially interesting parts (with time-stamps as pointers to the context in which they occur in the full journal) are:

Can you boot with systemd.log_level=debug on the kernel command line and
attach the journal output of this boot, so we have more information out
the timing, i.e. when certain services are started

There might be a race somewhere, i.e. lvm2-activation(-early).service
being run *before* mdadm has assembled the RAID.

You could test this theory, be artifically delaying those two services.
Copy them to /etc/systemd/system, and add a ExecStartPre=/bin/sleep 30
to the [Service] section of those two units.

Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20150423/ce3be553/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list