-   Linux - Server (
-   -   How to mount NFS shares on clients when server starts? (

HellesAngel 05-02-2010 11:23 AM

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/' 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?

acid_kewpie 05-03-2010 03:51 AM

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.

HellesAngel 05-03-2010 05:51 AM

Many thanks for the suggestion, that sounds like the answer to the maiden's prayer.

rajivdp 05-03-2010 09:43 AM

For automounting NFS share in the NFS client, follow the below link.

See the sub heading 5.Configuring the NFS Client


HellesAngel 05-03-2010 02:55 PM

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...

Yast :cry:
Just following the instructions :cool:

All times are GMT -5. The time now is 03:41 AM.