LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 05-02-2010, 12:23 PM   #1
HellesAngel
Member
 
Registered: Jun 2007
Posts: 84

Rep: Reputation: 15
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 12:44 PM. Reason: Corrected ssh command line
 
Old 05-03-2010, 04:51 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
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.
 
Old 05-03-2010, 06:51 AM   #3
HellesAngel
Member
 
Registered: Jun 2007
Posts: 84

Original Poster
Rep: Reputation: 15
Many thanks for the suggestion, that sounds like the answer to the maiden's prayer.
 
Old 05-03-2010, 10:43 AM   #4
rajivdp
Member
 
Registered: Oct 2008
Posts: 34

Rep: Reputation: 17
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
 
Old 05-03-2010, 03:55 PM   #5
HellesAngel
Member
 
Registered: Jun 2007
Posts: 84

Original Poster
Rep: Reputation: 15
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
Just following the instructions
 
  


Reply

Tags
boot, mount, nfs, server, share


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cant able to mount nfs share in clients rskarthik Linux - Newbie 1 06-19-2008 05:53 PM
nfs client does not mount server-shares automatically on boot rsp Debian 2 07-29-2007 08:26 AM
Mount foreign NFS shares gypsy_rabbi Linux - Laptop and Netbook 1 04-07-2005 01:45 PM
automatically mount NFS shares turbo_acura Linux - Networking 1 10-28-2004 06:33 PM
How do you mount NFS shares? Thaidog Linux - Newbie 1 04-04-2004 10:48 PM


All times are GMT -5. The time now is 02:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration