You are not logged in.
Hi there. This is probably a very basic question, but haven't found a clear categorical answer yet. Basically, I would like to know how I can make sure that a systemd service starts ONLY after all filesystems in /etc/fstab have been mounted.
I know that in a systemd service you can specify an After=XXXX rule to make sure the service is only started after XXXX starts. Well, I want to do that, except that my XXXX is a particular mount in /etc/fstab.
Also, is there a way of preventing the service from starting if for example a filesystem failed to mount?
Thanks a lot in advance!
Last edited by AMaudio (2013-11-21 18:11:38)
Offline
You can't always expect to find clear, categorical answers. I suggest you run systemctl list-units . I'm sure you'll find something useful there.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
From man systemd.mount :
Mount units may be configured via unit files...
That means units can be dependent on mount units the same way as on other units.
Offline
Thanks. This answers my questions. I didn't realise that for every mount on /etc/fstab a .mount unit gets created. (Still learing the ways of archlinux). Thanks guys!!
Offline
Fyi, you're talking about the ways of systemd here, not the ways of Arch. :-)
Offline