Description of problem: systemd does not mount directories specified by RequiresMountsFor when the service is started. Version-Release number of selected component (if applicable): systemd-208-16.fc20.x86_64 How reproducible: Every time Steps to Reproduce: 1. Create /etc/systemd/system/libvirtd.service with this content: .include /usr/lib/systemd/system/libvirtd.service [Unit] RequiresMountsFor=/var/lib/libvirt /var/lib/libvirt/images/ram 2. Add these 2 entries to /etc/fstab: /dev/hermesVG/libvirt /var/lib/libvirt xfs noauto,relatime 0 2 none /var/lib/libvirt/images/ram tmpfs noauto,noatime,nosuid,nodev,mode=0711,rootcontext=system_u:object_r:virt_image_t:s0 0 0 3. Run systemctl daemon-reload 4. Run systemctl start libvirtd Actual results: The directories aren't mounted. Expected results: The directories should be mounted Additional info: In case it's relevant I'm using libvirt-daemon-1.2.3-2.fc20.x86_64.
This is probably because of the 'noauto'. The semantics of noauto are basically that it will not be mounted automatically... This is a bit of a corner case. You might want to replace 'RequiresMountsFor=...' with 'Requires=var-lib-libvirt.mount var-lib-libvirt-images-ram.mount'.
That worked. Thank you for the workaround. Nevertheless the issue remains. Perhaps the behavior for noauto should be changed a bit or the systemd.unit(5) man page should mention this corner case.
I added a note to systemd.unit(5) in http://cgit.freedesktop.org/systemd/systemd/commit/?id=5d2abc0.
systemd-208-18.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/systemd-208-18.fc20
Package systemd-208-18.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-208-18.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-7512/systemd-208-18.fc20 then log in and leave karma (feedback).
Package systemd-208-19.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing systemd-208-19.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-7512/systemd-208-19.fc20 then log in and leave karma (feedback).
The change to documentation will be reverted upstream. It seems the intended behaviour was to have RequiresMountsFor pull in units which have noauto set, and the actual code has been doing that since a long while. https://lists.freedesktop.org/archives/systemd-devel/2017-January/038192.html