Making sure NFS shares are up before proceeding with boot
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Making sure NFS shares are up before proceeding with boot
I have a number of little slave (HTTP) servers, all of whom use NFS shares for everything so that I don't have to synchronize their little hard drives. Many things upon which Apache (and so on) depends are on those shares.
I'd like to make sure that systemd will start the NFS-client daemon, and wait for it to initialize, before proceeding with additional steps such as mounting the shares or starting Apache.
I know that systemd has a good dependencies-system (yay!!), including the ability to wait for things, but I've never really fiddled with it too much. Any pointers?
Have you considered a different approach where you change any startup scripts for service that require the NFS shares to check that they are available before starting the service and do this on a script by script basis rather than a dependencies basis.
If you have the checks on a service by service level then when you start/restart a service your checks can run and ensure the NFS share is there rather than looking at a previous "well it started on boot" style dependency "flag".
What I am looking for is the ability to make sure that systemd will not attempt to start certain services (Apache, DNSMasq, etc.) until "after" the NFS service has been fully started. This should do nicely.
Ahh... "inittabs and crontabs." No, I don't miss them at all . . .
Last edited by sundialsvcs; 12-16-2016 at 12:16 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.