[systemd-devel] Antw: [EXT] Re: btrfs raid not ready but systemd tries to mount it anyway

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Mon Oct 19 05:59:09 UTC 2020


>>> Lennart Poettering <lennart at poettering.net> schrieb am 16.10.2020 um 17:51
in
Nachricht <20201016155115.GB319022 at gardel-login>:
> On Fr, 16.10.20 17:45, Lennart Poettering (lennart at poettering.net) wrote:
> 
>> > 2. Debugging with "rd.udev.debug systemd.log_level=debug":
>> > The same 10 HDD BTRFS volume with 4 drives connected to the motherboard
>> > and 6 drives connected to the HBA *fails* to mount automatically at boot
>> > time. The log for this with "rd.udev.debug systemd.log_level=debug" set
>> > in grub is here:
>> >
>> > 
>
https://drive.google.com/file/d/1jVHjAQ8CY9vABtM2giPTB6XeZCclm7R-/view?usp=sh

> aring
>>
>> Ths btrfs udev rule file appears to be missing in the initrd. The
>> block devices with the btrfs file systems on them will thus be marked
>> ready in systemd instantly instead of being delayed until all other
>> devices of the same btrfs fs have shown up in udev too.
>>
>> Fix your initrd.
> 
> So my educated guess is that this is a dracut bug: it excludes the
> btrfs udev rule file from the initrd unless the root fs is btrfs.

...which should be OK IMHO: Once root is mounted you should have anything you
need

> 
> But this doesn't work, because the absence of that file means that all
> btrfs file systems will be marked as ready instantly as they appear,
> which then blows up later if during later boot btrfs file systems that
> are backed by multiple devices shall be mounted.

IMHO that's a bug in systemd.

> 
> It's basically a race: if yor block devices appear in the initrd
> already, then you lost, because all such devices will be instantly be
> marked "ready to be mounted" because the udev rule file is missing
> there. However, if the block devices take longer to appear, and are
> thus first seen after the initrd→host transition, then all will be
> good, as the udev rules file for it exists there, and the devices are
> not marked ready until all necessary devices have shown up in udev.
> 
> Fix is: dracut should just include the file unconditionally. It's
> tiny.
> 
> If it really really insist to not include it on systems where btrfs isn't
> used, then it should scan the host for any btrfs use at all. it's not
> sufficient to determine whether the rootfs is btrfs or not.
> 
> Anyway, please report to dracut.
> 
> Lennart
> 
> --
> Lennart Poettering, Berlin
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org 
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel 





More information about the systemd-devel mailing list