[systemd-devel] mount failed during system start but after "systemctl daemon-reload" everything works

Oliver oliver at business-security.de
Tue Apr 22 09:49:49 PDT 2014


Am 22.04.2014 07:04, schrieb Lennart Poettering:
> On Fri, 18.04.14 10:32, Oliver (oliver at business-security.de) wrote:
>
>> Hello.
>> Could anyone tell me a reason why a mount (regardless of via fstab
>> or "mountpoint.mount" unit file) during system boot leads to a
>> timeout because of device timeout and after i do a "systemctl
>> daemon-reload" the mount is successful?
>>
>> Detailed information:
>> My system is a Linuxfromscratch 7.5 (so no "real" distribution -
>> everything is self-compiled) and it runs as a paravirtualized Xen
>> DomU. Therefore the block devices are /dev/xvda1 and /dev/xvdb1.
>> The first is the root fs and mount and remount are okay. Then the
>> second block device should mount and it timed out with "Dependency
>> failed" and "dev-xvdb1.device/start timed out"
>> When I run "udevadm info /dev/xvdb1" everything seems to be okay,
>> but any try of mount this via systemd failes. When I mount manually
>> via "mount /dev/xvdb1 /mountpoint" it's fine. Then "systemctl status
>> mountpoint.mount" says "active".
>> Manually unmount is okay and after this a mount via systemd failes again.
>> If I do, and only if I do "systemctl daemon-reload" and then
>> "systemctl start mountpoint.mount" it works.
>>
>> I'm a beginner with a systemd based system and do not know much
>> about the internals. What could lead to this behaviour? Is it
>> possible that I do anything wrong?
>> Please help. I'm very frustrated. If you need more Input, please tell me.
> systemd's .device units rely on the "systemd" tag to be on the udev
> device, as well as DEVICE_READY=1 being absent of it. I have no idea how
> xen sets up block device nodes, but what is essential that this used to
> inform systemd when the devices are ready to be mounted.
>
> Lennart
>
This is the output of "udevadm info /dev/xvdb1":

P: /devices/vbd-51729/block/xvdb1
N: xvdb1
S: disk/by-uuid/d2b62043-e504-4005-b1f4-212e87360284
E: DEVLINKS=/dev/disk/by-uuid/d2b62043-e504-4005-b1f4-212e87360284
E: DEVNAME=/dev/xvdb1
E: DEVPATH=/devices/vbd-51729/block/xvdb1
E: DEVTYPE=disk
E: ID_FS_TYPE=ext4
E: ID_FS_USAGE=filesystem
E: ID_FS_UUID=d2b62043-e504-4005-b1f4-212e87360284
E: ID_FS_UUID_ENC=d2b62043-e504-4005-b1f4-212e87360284
E: ID_FS_VERSION=1.0
E: MAJOR=202
E: MINOR=17
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=70616

Doesn't this mean, that the device is ready for a mount?

Here one can see the difference before and after "systemctl daemon-reload":

domU [ ~ ]# systemctl status dev-xvdb1.device
* dev-xvdb1.device
    Loaded: loaded
    Active: inactive (dead)
domU [ ~ ]# systemctl status dev-hvc0.device
* dev-hvc0.device
    Loaded: loaded
    Active: inactive (dead)
domU [ ~ ]# systemctl daemon-reload
domU [ ~ ]# systemctl status dev-xvdb1.device
* dev-xvdb1.device - /dev/xvdb1
    Follow: unit currently follows state of 
sys-devices-vbd\x2d51729-block-xvdb1.device
    Loaded: loaded
    Active: active (plugged)
    Device: /sys/devices/vbd-51729/block/xvdb1
domU [ ~ ]# systemctl status dev-hvc0.device
* dev-hvc0.device - /dev/hvc0
    Follow: unit currently follows state of 
sys-devices-virtual-tty-hvc0.device
    Loaded: loaded
    Active: active (plugged)
    Device: /sys/devices/virtual/tty/hvc0

I added the device /dev/hvc0 (console inside Xen domU) because it's the 
same behaviour.
What's going on at "systemctl daemon-reload"? I thought it only looks 
for new updates in "/etc/systemd/system" "/var/run/systemd/system" and 
"[/usr]/lib/systemd/system".
What I realized was, that it updates files in /var/run/systemd/generator/
But everything there is the same.

Any ideas?

Best regard
Oliver



More information about the systemd-devel mailing list