Hi,

I have an /etc/fstab that contains the following line:

  /disk1.img /disk1 ext4 loop 0 2

where /disk1.img is a regular file containing an ext4 filesystem.  Systemd fails
to mount /disk1 if I run "systemctl start disk1.mount":

> Aug 07 23:53:24 machine systemd[1]: Job disk1.img.device/start timed out.
> Aug 07 23:53:24 machine systemd[1]: Job disk1.mount/start failed with result 
> 'dependency'.
> Aug 07 23:53:24 machine systemd[1]: Job systemd-f...@disk1.img.service/start 
> failed with result 'dependency'.
> Aug 07 23:53:24 machine systemd[1]: Job disk1.img.device/start failed with 
> result 'timeout'.

I.e. it fails because it creates a device unit "disk1.img.device", but since
/disk1.img is not a sysfs/udev device, this unit never reaches the "plugged"
state and times out.  Mounting the filesystem using "mount /disk1" does work.

A similar problem occurs if /etc/crypttab contains a loop filesystem, i.e.
systemd creates a device unit that times out.

Is this a bug/limitation in systemd or is there some other way to handle loop
mounts with systemd?  If the former, would it make sense for device units to
recognise regular files and go to the "plugged" state immediately?  (It would
need to wait for the mount point containing the file to appear, though.)

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to