LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-25-2007, 11:30 PM   #1
rsp
LQ Newbie
 
Registered: Jul 2007
Posts: 4

Rep: Reputation: 0
nfs client does not mount server-shares automatically on boot


Hi,

I am new to Debian; using etch.

I have installed nfs on server and client in a small home-network. NFS is functional manually but does not mount the shares automatically from /etc/fstab.

I have modified /etc/init.d/mountall.sh to mount nfs by changing the 'nonfs' to 'nfs' in the starting lines shown below:

'mount_all_local() {
mount -a -t nonfs,nfs4,smbfs,cifs,ncp,ncpfs,coda,ocfs2,gfs \
-O no_netdev
}'

While booting, the error ('failed' shown in red) is as under:

"Mounting local filesystems."
"mount on nfs Server 192.168.1.7 failed. The Server is down"
"failed"

But the server is very much up.

Extract from my /etc/fstab is as below:

192.168.1.7:/home/rsp /mnt/rsp nfs soft,nfsvers=2 0 0
192.168.1.7:/home/shp /mnt/shp nfs soft,nfsvers=2 0 0

After loging-in as a user I can mount nfs by just running command 'sudo mount -a' on the terminal.

I suspect that the script 'mountall.sh' is executed before the network is up. And there is no link for starting this script in any of the '/etc/rc?.d' directories. So I cannot make out at what stage this script is executed. But it is executed during boot, for sure. I say this because after reversing the changes, there is no error but the nfs shares are not mounted automatically.

What more is needed here?

Any suggestions please?

Regards,

RSP

Last edited by rsp; 07-25-2007 at 11:36 PM.
 
Old 07-27-2007, 11:15 AM   #2
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
/etc/init.d/mountall.sh is called from /etc/rcS.d/S35mountall.sh. As the files in rcS.d I believe fire off before networking is setup in rc3.d (I believe... correct me if I am wrong), it is not surprising that NFS mounts fail at this time.

You may have to do a link in /etc/rc3.d to fire off mountall.sh again once networking has finished setting up.
 
Old 07-29-2007, 07:26 AM   #3
rsp
LQ Newbie
 
Registered: Jul 2007
Posts: 4

Original Poster
Rep: Reputation: 0
nfs client does not mount server-shares automatically on boot

Thanks for your response and putting me wise on /etc/rcS.d.

What was useful in solving this problem, was the following extract from /etc/rcS.d/README:

"The following sequence points are defined at this time:

* After the S40 scripts have executed, all local file systems are mounted
and networking is available. All device drivers have been initialized."

So I made the link in /etc/rcS.d/S35mountall.sh as 'S80mountall.sh'. That has solved the problem.

Now there is no need to make any more links to '/etc/init.d/mountall.sh' in any other run-level.

Thanks and Regards,

rsp

Last edited by rsp; 07-29-2007 at 07:28 AM.
 
  


Reply

Tags
at, automatically, boot, mount, nfs, shares



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
how to mount a nfs mount from linux client to AIX nfs server dennyqian AIX 13 04-11-2016 11:30 PM
NFS server - client cannot mount remote file system mikemrh9 Linux - Networking 6 10-12-2006 11:05 PM
automatically mount NFS shares turbo_acura Linux - Networking 1 10-28-2004 05:33 PM
NFS client loses shares tomanthony Linux - Networking 0 09-16-2004 11:33 AM
Automatically mount file shares? odious1 Linux - Newbie 1 07-03-2003 01:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:26 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
Open Source Consulting | Domain Registration