[systemd-devel] bind mounts are not delayed until the underlying fs gets mounted
Frank Steiner
fsteiner-mail1 at bio.ifi.lmu.de
Fri Jan 29 06:55:22 PST 2016
Hi,
this problem occurs in SLES 12 with systemd-210-70.30.1 which might be
to old to handle this situation correctly. So my question is if the
following situation should work in systemd or for some reason would not
(so that I can plan how to get around this).
We have two entries in /etc/fstab:
/dev/mapper/raid2--iscsi-backup--export /export2 xfs defaults,_netdev 0 0
/export2/rpm /nfsv4/rpm-export none bind,private,_netdev 0 0
I.e., we mount an iscsi device and then export part of it with nfs4,
so we need the bind-mount. But while both entries are correctly delayed
due to the _netdev, they both start to mount in parallel and the bind
mount is faster than the iscsi, of course.
...
[ OK ] Reached target Remote File Systems (Pre).
[ OK ] Reached target Network is Online.
Starting Login and scanning of iSCSI devices...
Mounting /nfsv4/rpm-export...
[ OK ] Mounted /nfsv4/rpm-export.
[ OK ] Started Login and scanning of iSCSI devices.
...
[ OK ] Found device /dev/mapper/raid2--iscsi-backup--export.
[ OK ] Started Activation of LVM2 logical volumes.
Mounting /export2...
[ OK ] Mounted /export2.
...
In http://www.freedesktop.org/software/systemd/man/systemd.mount.html
I found the information "If a mount unit is beneath another mount unit
in the file system hierarchy, both a requirement dependency and an
ordering dependency between both units are created automatically."
This sounds like it should work in the scenario as /export2/rpm is
clearly beneath /export2. But there are no matching depencendies
in the the /run/systemd/generator/*.mount files. So is it safe to
assume the error only occurs due to the old systemd version?
In the current release, should this work automatically by adding
dependencies in the generated mount files or would I have to
add "x-systemd.requires-mounts-for" (which my systemd doesn't know
about...) explicitely in fstab?
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
More information about the systemd-devel
mailing list