How to mount NFS shares on clients when server starts?
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.
How to mount NFS shares on clients when server starts?
My home network consists of a file server with a RAID5 array of disks and various 'client' computers. Various parts of this RAID array are shared using NFS. The NFS server and clients all work fine for all shares.
This computer consumes a lot of power so is only on when needed and the problem I'm struggling with is how to inform the clients that are running when the server starts so they can mount the NFS shares they're interested in?
At the moment that the server runs a series of scripts on each client using a command like 'ssh someuser@client -X /home/someuser/bin/mountscript.sh' but this only works if someuser can ssh to client from server without a password (or permission is stored in .ssh/known_hosts), requires a fair bit of work when I add a new client, and is prone to break when I fiddle with things.
Is there a more elegant system, maybe one that would allow the file server to broadcast a 'I'm here' message to all clients, or the entire network, on startup, and similarly an 'I'm going away' message when it shuts down again? Any suggestions?
Last edited by HellesAngel; 05-02-2010 at 11:44 AM.
Reason: Corrected ssh command line
chekc automount to do this. It doesn't mount when the server comes up, but when the user accesses that location, which is generally even better. It'll also unmount with inactivity too, which is probably also catching you out sometimes too.
Many thanks for the how-to link. I tried using Yast to configure autofs, which led to a deviation into LDAP which ended in frustration, as is often the case. Having given up with Yast I followed the simple instructions in the how-to and who'd have thought it could be that simple...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.