On Feb 23, 2006, at 7:14 AM, Laurent CARON wrote:
Thomas F. O'Connell a écrit :
I've tried to set up NFS on two different networks, recently, and
have had a hard time getting nfs shares to mount automatically at
boot. In a recent example, both client and server are Debian
systems that use official packages for NFS.
For the client, I've got a Debian 3.1 system running 2.4.27-2-386
#1 with nfs-common 1.0.6-3.1 and portmap 5-9. For the server,
I've got a Debian 3.0 system running 2.4.27 with nfs-common
1.0-2woody3 and nfs- kernel-server 1.0-2woody3.
Here's the relevant line in /etc/fstab of the client:
nfs-server:/var/nfs-test /var/nfs-test nfs
noac,wsize=8192,rsize=8192 0 0
It's not that nfs won't mount at all; it just won't mount on boot.
I don't see any errors in the logs on the client other than the
warning about statd running as root recommending chowning /var/
lib/nfs/sm to a different user. As far as I can tell /etc/exports
is configured correctly on the server.
The workaround for the time being is to have an /etc/init.d/
rc.local file linked at /etc/rc2.d/S45rc.local that has the
single line:
mount /var/nfs-test
This works fine. I can otherwise run the same thing at any point
after boot, and that works fine, too. I do notice that at boot,
the server is not recording authentication from the client,
whereas it does if I mount manually or explicitly.
From what I've read (NFS-HOWTO, for instance), this should "just
work". Am I overlooking anything from a configuration standpoint
or any other potential sources of errors?
You probably have a dns resolution problem at boot time.
What about (for testing purposes) adding the following line to /etc/
crontab?
@reboot root mount -a
Interesting. Adding that to crontab doesn't work, but if I manually
run mount -a as root once the box has rebooted, it works fine. Also
interesting, with that crontab entry, I don't see an authentication
attempt at the server, but I do if I run it manually.
Also, shouldn't specifying the IP rather than hostname in /etc/fstab
alleviate the DNS issue? I tried that, and that didn't work either.
--
Thomas F. O'Connell
Database Architecture and Programming
Co-Founder
Sitening, LLC
http://www.sitening.com/
3004 B Poston Avenue
Nashville, TN 37203-1314
615-260-0005 (cell)
615-469-5150 (office)
615-469-5151 (fax)