![](https://seccdn.libravatar.org/avatar/9435667f7160374bc34a8600b686aecd.jpg?s=120&d=mm&r=g)
В Wed, 19 Mar 2014 11:50:57 +0100 Per Jessen <per@computer.org> пишет:
Related to my question "How do I make systemd wait for iscsi to start before attempting to mount iscsi-based filesystems?", I've been looking at the systemd startup order. What exactly does "systemctl --order" show - the status quo or what will happen on the next start-up?
I'm asking because I've added
Requires=remote-fs.target
to
/usr/lib/systemd/system/apache2.service
After a "systemctl --daemon-reload", the start-up sequence did not change as expected.
Requires is orthogonal to startup order. foo.service Requires bar.service means systemd will attempt to start bar.service when requested to start foo.service. It does *not* mean foo.service will be started after bar.service. Use After/Before to influence relative startup order. Requires is almost always wrong (it is too strong dependency). On 13.1 you can use "systemctl list-dependencies --after|--before foo" to see, after/before which units foo will be started. This also works recursively. E.g. ntpd.service ├─network-remotefs.service ├─system.slice ├─systemd-journald.socket ├─basic.target │ ├─systemd-ask-password-plymouth.path ... ├─network.target │ ├─NetworkManager-wait-online.service │ ├─NetworkManager.service │ └─wpa_supplicant.service ├─nss-lookup.target │ └─network.target │ ├─NetworkManager-wait-online.service ... Not sure if this was already present in 12.3
I could be way wrong, but I'm not sure systemd considers iscsi filesystems to be remote? According to "systemctl --order" it will attempt to mount them before iscsi is started :-o
Well, how should systemd know it is iSCSI in the first place? When /etc/fstab is processed, nothing is yet started and device does not exist so it is not even possible to probe it. That's why you were advised to use _netdev to inform systemd about it. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org