LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   NFS doesn't mount after reboot on RHEL 5.8 box/NFSv3. (https://www.linuxquestions.org/questions/red-hat-31/nfs-doesnt-mount-after-reboot-on-rhel-5-8-box-nfsv3-931995/)

barataaway 02-29-2012 02:36 PM

NFS doesn't mount after reboot on RHEL 5.8 box/NFSv3.
 
Hello linuxers!

I got a little problem on having a NFS automatically mounted after reboot. RHEL 5.8 box/NFSv3/NAS volume.

The fs simply doesn't mount after reboot. However, when the box comes up, if I input a "mount -a" the volume get mounted without problems.

It seems (at least to me) that the configuration is alright. Please, take a look:


- NFS Service

Code:

[root@mybox ~]# chkconfig --list nfs
nfs            0:no  1:no  2:yes  3:yes  4:yes  5:yes  6:no 
[root@mybox ~]# chkconfig --list netfs
netfs          0:no  1:no  2:yes  3:yes  4:yes  5:yes  6:no 
[root@mybox ~]#

- NFS version

Code:

[root@mybox ~]# nfsstat
Server rpc stats:
calls      badcalls  badclnt    badauth    xdrcall
0          0          0          0          0

Client rpc stats:
calls      retrans    authrefrsh
1560927    0          0

Client nfs v3:
null        getattr      setattr      lookup      access      readlink
0        0% 967758  61% 77227    4% 216627  13% 152323    9% 15        0%
read        write        create      mkdir        symlink      mknod
21988    1% 22142    1% 18114    1% 8        0% 0        0% 0        0%
remove      rmdir        rename      link        readdir      readdirplus
81        0% 0        0% 18114    1% 0        0% 2210      0% 64310    4%
fsstat      fsinfo      pathconf    commit
7        0% 2        0% 0        0% 0        0%

[root@mybox ~]#


- /etc/fstab (I can't put my real ip here, sorry)

Code:

[root@mybox ~]# grep nfs /etc/fstab
200.X.X.240:/vol/vol_web2 /web      nfs    intr,soft,rw    0 0
[root@mybox ~]#

- Service sequence of initialization (nfs svces is initializing after network svc)

Code:

[root@mybox ~]# ls -l /etc/rc3.d/ | egrep -i "netfs|nfs|netw"
lrwxrwxrwx 1 root root 24 Dez 16 18:27 K02NetworkManager -> ../init.d/NetworkManager
lrwxrwxrwx 1 root root 17 Fev  8 11:24 S10network -> ../init.d/network
lrwxrwxrwx 1 root root 17 Dez 16 18:27 S14nfslock -> ../init.d/nfslock
lrwxrwxrwx 1 root root 15 Fev 24 18:02 S25netfs -> ../init.d/netfs
lrwxrwxrwx 1 root root 13 Fev 24 18:02 S60nfs -> ../init.d/nfs
[root@mybox ~]#

- /etc/hosts has NAS' ip

Code:

[root@mybox ~]# grep nas /etc/hosts
200.X.X.240 nas01
[root@mybox ~]#


- There is a route to the NAS ip (and it works)

Code:

[root@mybox ~]# netstat -rnv | grep 200
200.X.X.240 10.X.X.33    255.255.255.255 UGH      0 0          0 eth3
[root@mybox ~]#


- Persistent route

Code:

[root@mybox ~]# cat /etc/sysconfig/network-scripts/route-eth3
ADDRESS0=200.X.X.240
NETMASK0=255.255.255.255
GATEWAY0=10.X.X.33
[root@mybox ~]#




At this time, as a workaround, i've added "mount -a" to /etc/rc.local, and, at least, the nfs is mounting after reboot. However, it takes about 3~4 min to mount (checked with "uptime").




below are more info from dmesg:



Code:

[root@mybox ~]# dmesg | grep -i nfs
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
[root@mybox ~]# dmesg | grep -i netfs
[root@mybox ~]# dmesg | grep -i error
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PMI0._GHL] (Node ffff81023003d8b0), AE_SUPPORT
ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PMI0._PMC] (Node ffff81023003d8f0), AE_SUPPORT
[root@mybox ~]# dmesg | grep -i mount
Mount-cache hash table entries: 256
EXT3-fs: mounted filesystem with ordered data mode.
EXT3-fs: mounted filesystem with ordered data mode.
EXT3-fs: mounted filesystem with ordered data mode.
EXT3-fs: mounted filesystem with ordered data mode.
EXT3-fs: mounted filesystem with ordered data mode.
EXT3-fs: mounted filesystem with ordered data mode.
EXT3-fs: mounted filesystem with ordered data mode.
EXT3-fs: mounted filesystem with ordered data mode.
[root@mybox ~]#


and /var/log/messages:

Code:

[root@mybox ~]# grep -i nfs /var/log/messages
Feb 28 17:56:55 mybox kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Feb 28 17:56:55 mybox kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Feb 28 17:56:55 mybox kernel: NFSD: starting 90-second grace period
Feb 28 18:02:53 mybox kernel: nfsd: last server has exited
Feb 28 18:02:53 mybox kernel: nfsd: unexporting all filesystems
Feb 28 18:06:37 mybox kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Feb 28 18:06:37 mybox kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Feb 28 18:06:37 mybox kernel: NFSD: starting 90-second grace period
Feb 29 10:33:03 mybox kernel: nfsd: last server has exited
Feb 29 10:33:03 mybox kernel: nfsd: unexporting all filesystems
Feb 29 10:33:03 mybox kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Feb 29 10:33:03 mybox kernel: NFSD: starting 90-second grace period
Feb 29 14:21:43 mybox kernel: nfsd: last server has exited
Feb 29 14:21:43 mybox kernel: nfsd: unexporting all filesystems
Feb 29 14:25:28 mybox kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Feb 29 14:25:28 mybox kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Feb 29 14:25:28 mybox kernel: NFSD: starting 90-second grace period
[root@mybox ~]#



Any hints?

Thank you very much

T3RM1NVT0R 02-29-2012 02:49 PM

@ Reply
 
Hi barataaway,

Welcome to LQ!!!

Questions for you:

1. Any changes made to the system?
2. Any update that you have installed recently?

Can you share nfs configuration file and /etc/exports?

barataaway 03-02-2012 08:58 AM

Hi T3RM1NVT0R! Thank you very much.

Yes, I updated it from RHEL5.7 to 5.8 but, to be honest, I don't know if the mounting was working before (I only tried it after updating).


What NFS configuration file you need?

The NAS volume configuration is:

/vol/vol_web2 -sec=sys,rw,root=10.YY.YY.39

(pointing to host's ip)

Thank you.

T3RM1NVT0R 03-02-2012 01:43 PM

@ Reply
 
I am looking for /etc/nfsmount.conf

barataaway 03-03-2012 07:39 PM

This file does not exist... It should?

T3RM1NVT0R 03-03-2012 09:03 PM

@ Reply
 
1 Attachment(s)
I have checked on my RHEL5 system and it was not there but it is there on my RHEL6 system. From the dmesg that you have pasted it appears that it is trying to negotiate over NFSv4 first and when it doesn't work it switches to NFSv3.

Attached is the edited nfsmount.conf file. Rename it from .txt to .conf, copy it under /etc and then reboot to see if your nfs share mount automatically after reboot or not. Don't forget to remark (#) out mount -a /etc/rc.local :-)

gauravgoel1989 03-24-2015 01:37 AM

Check if netfs service is running or not.

T3RM1NVT0R 03-24-2015 02:03 AM

You are replying to a thread which is almost 3 years old. Why???


All times are GMT -5. The time now is 05:38 PM.