LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to mount NFS shares on clients when server starts? (http://www.linuxquestions.org/questions/linux-server-73/how-to-mount-nfs-shares-on-clients-when-server-starts-805479/)

HellesAngel 05-02-2010 12:23 PM

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?

acid_kewpie 05-03-2010 04: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 06:51 AM

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

rajivdp 05-03-2010 10:43 AM

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

See the sub heading 5.Configuring the NFS Client

http://www.linuxhomenetworking.com/w...onfiguring_NIS

Regards
Rajiv

HellesAngel 05-03-2010 03: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 11:02 PM.