Redhat nfs client hangs after 5 minutes


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Redhat nfs client hangs after 5 minutes
# 1  
Old 08-28-2009
Redhat nfs client hangs after 5 minutes

New at NFS.
3 machines at hand

1 RedHat nfs Client which is connected to a spectrometer (chemistry Instrument):
Code:
[root@BH083108 ~]# uname -a
Linux BH083108 2.6.9-78.0.17.ELsmp #1 SMP Thu Mar 5 04:52:17 EST 2009 i686 i686 i386 GNU/Linux
[root@BH083108 ~]# cat /proc/version 
Linux version 2.6.9-78.0.17.ELsmp (mockbuild@hs20-bc1-5.build.redhat.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)) #1 SMP Thu Mar 5 04:52:17 EST 2009
(dated kernel and OS version  on RedHat box is a requirement for the sepectrometer software)
/etc/fstab/
fs:/home /server                 nfs     rw,suid,proto=tcp               0 0
/dev/scd0               /media/cdrecorder       auto    pamconsole,exec,noauto,managed 
0 0


1 freebsd nfs client
Code:
mount_nfs -b machine_name:/home /mnt
( No issues with this nfs client at all)


1 freebsd nfs server:
Code:
FreeBSD machine_name 7.2-RELEASE FreeBSD 7.2-RELEASE #1: Wed Aug 19 14:20:21 EDT 2009     sysadm@machine_name:/usr/obj/usr/src/sys/KERNEL_FILE  amd64
/etc/exports
/home -alldirs <ip of freebsd nfs client> <ip of redhat nfs client>

From a fresh boot on nfs redhat client and freebsd nfs server, the freshly mounted redhat desktop hangs when there isn't any activity on the redhat box for roughly 5 minutes or so. Hangs on df -h or when cd to the /server mount point. /var/log/messages on the redhat client report:
Aug 27 17:37:12 localhost kernel: nfs_statfs: statfs error = 512
Aug 27 17:37:27 localhost kernel: RPC: error 512 connecting to server machine_name

there is also this error:
Code:
Aug 27 17:37:28 localhost kdesktop_lock:

Code:
redhat:
[root@BH083108 ~]# umount -f /mnt
umount2: Device or resource busy
umount: /mnt: device is busy
umount2: Device or resource busy
umount: /mnt: device is busy

DNS is good, nothing seems wrong there.

There is a auto mount setup for the cdROM

Could this be a kernel issue on the client redhat box?

Like I said works great util its not used for about 5 minutes.
Code:
[root@BH083108 /]# ps aux | grep rpc
rpcuser   3796  0.0  0.0  1688  712 ?        Ss   Aug27   0:00 rpc.statd
root      3827  0.0  0.0  5604  416 ?        Ss   Aug27   0:00 rpc.idmapd
root      4056  0.0  0.0  2540  328 ?        S    Aug27   0:00 rpc.bootparamd
root      4089  0.0  0.0  4384  232 ?        Ss   Aug27   0:00 rpc.rquotad
root      4098  0.0  0.0     0    0 ?        S    Aug27   0:00 [rpciod]
root      4106  0.0  0.0  2636  288 ?        Ss   Aug27   0:00 rpc.mountd
rpc      11678  0.0  0.0  3012  400 ?        Ss   Aug27   0:00 portmap
root     16763  0.0  0.0  3864  640 pts/4    S+   09:56   0:00 grep rpc

[root@BH083108 /]# ps aux | grep nfs
root      4093  0.0  0.0     0    0 ?        S    Aug27   0:00 [nfsd]
root      4094  0.0  0.0     0    0 ?        S    Aug27   0:00 [nfsd]
root      4095  0.0  0.0     0    0 ?        S    Aug27   0:00 [nfsd]
root      4096  0.0  0.0     0    0 ?        S    Aug27   0:00 [nfsd]
root      4099  0.0  0.0     0    0 ?        S    Aug27   0:00 [nfsd]
root      4100  0.0  0.0     0    0 ?        S    Aug27   0:00 [nfsd]
root      4101  0.0  0.0     0    0 ?        S    Aug27   0:00 [nfsd]
root      4102  0.0  0.0     0    0 ?        S    Aug27   0:00 [nfsd]

root 16765 0.0 0.0 5424 636 pts/4 S+ 09:56 0:00 grep nfs


The other client works fine all the time.

Nothing in /var/log/messages on the nfs server
# 2  
Old 08-29-2009
Humm, the default timeout for autofs on Redhat is 300 secs, i.e. 5 minutes. On the Redhat system, check the value of TIMEOUT in /etc/sysconfig/autofs. If it is 300 change it to say 600 and see if this doubles the time between hangs. Obviously, restart the NFS services after making this change.

I suspect autofs/automoumter is having a problem with fs:/home.
# 3  
Old 09-01-2009
Hi There. Thanks for the reply. There doesn't seem to be a TIMEOUT value.

Code:
[root@BH083108 sysconfig]# vi /etc/sysconfig/autofs
autofs           autofs_2009-9-1  
[root@BH083108 sysconfig]# vi /etc/sysconfig/autofs
# Define custom options in /etc/sysconfig/autofs
# Use LOCALOPTIONS for defining variables, e.g. OSREL
# Use DAEMONOPTIONS to define the unmount timeout
# Define UNDERSCORETODOT as 1 to convert
#     auto_home to auto.home and auto_mnt to auto.mnt
# Mount options, e.g. rsize=8192, should go in auto.master or
#     the auto_* map entry for a specific mount point
#
LOCALOPTIONS=""
DAEMONOPTIONS="--timeout=60"
LDAPAUTOMASTER=""
#  UNDERSCORETODOT changes auto_home to auto.home and auto_mnt to auto.mnt
UNDERSCORETODOT=1
DISABLE_DIRECT=1
# Only source one master map if set to 1.  This would mimic Sun behaviour.
# The default is 0 to maintain backwards compatibility.
ONE_AUTO_MASTER=0
# List of directories to be ghosted, separated by white space.
GHOSTDIRS=""
# Base DN to use when searching for the master map
BASEDN=
# The ldap module was updated to only try the first schema that works
# (instead of trying all 3 autofs schemas for each lookup).  It is
# possible, though unlikely, that this could cause problems.  If you update
# the automounter and find that your ldap schemas doesn't work as it did
# previously, try setting this option to 1.  Please also report the problem,
# as it is likely that your schema is incompatible with autofs v5.
OLD_LDAP_LOOKUP=0

Would the default still be 300 secs at that point.

Thanks
# 4  
Old 09-01-2009
the time out option is there. It's even commented on.

try to modify this
DAEMONOPTIONS="--timeout=60"

also may want to manually mount fs:/home and see if you still see error?

Are you using autofs? b/c I see you have line in /etc/fstab on rhel box. May want to stop autofs with service command and what does chkconfig --list autofs show? what about /etc/auto.home and auto.master?
# 5  
Old 09-03-2009
Well. I increased DAEMONOPTIONS="--timeout=60" to be set to 600000

Code:
prior to mounting:
[root@BH083108 ~]# mount
/dev/sda2 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda4 on /opt type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)

[root@BH083108 ~]# mount -t nfs -o rw,intr,tcp con:/home /server

after conducting the mount:

Code:
[root@BH083108 ~]# mount
/dev/sda2 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda4 on /opt type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
con:/home on /server type nfs (rw,intr,tcp,addr=***.***.***.***)

INCREASED THE TIMOUT OPTION TO: 600000
Code:
[root@BH083108 ~]# less /etc/sysconfig/autofs
# Define custom options in /etc/sysconfig/autofs
# Use LOCALOPTIONS for defining variables, e.g. OSREL
# Use DAEMONOPTIONS to define the unmount timeout
# Define UNDERSCORETODOT as 1 to convert 
#     auto_home to auto.home and auto_mnt to auto.mnt
# Mount options, e.g. rsize=8192, should go in auto.master or
#     the auto_* map entry for a specific mount point
#
LOCALOPTIONS=""
DAEMONOPTIONS="--timeout=600000"
LDAPAUTOMASTER=""
#  UNDERSCORETODOT changes auto_home to auto.home and auto_mnt to auto.mnt
UNDERSCORETODOT=1
DISABLE_DIRECT=1
# Only source one master map if set to 1.  This would mimic Sun behaviour.
# The default is 0 to maintain backwards compatibility.
ONE_AUTO_MASTER=0
# List of directories to be ghosted, separated by white space.
GHOSTDIRS=""
# Base DN to use when searching for the master map
BASEDN=
# The ldap module was updated to only try the first schema that works
# (instead of trying all 3 autofs schemas for each lookup).  It is
# possible, though unlikely, that this could cause problems.  If you update
# the automounter and find that your ldap schemas doesn't work as it did
# previously, try setting this option to 1.  Please also report the problem,
# as it is likely that your schema is incompatible with autofs v5.
OLD_LDAP_LOOKUP=0

IT STILL HANGS IN ABOUT 5 MINUTES. VERY FRUSTRATING - Perhaps this is a kernel issue?
404 Not Found
states it is and I have the same version 2.6.9-78.0.17.ELsmp
it hangs on df -h, ls -al, cding to the nfs mount.

Code:
/var/log/messages/on redhat client 
Sep  3 09:18:20 localhost kernel: RPC: error 512 connecting to server hostname
Sep  3 09:19:12 localhost last message repeated 3 times
Sep  3 09:19:28 localhost last message repeated 6 times
Sep  3 09:19:28 localhost kernel: nfs_statfs: statfs error = 512[COLOR="#738fbf"]


Well. Specifying udp as the network protocol during the initial mount seems to have solve my problem. I am having a hard time understanding why. When creating the initial mount WITHOUT specifying tcp or udp the issue occurs. This makes me believe that the tcp is the default option when nothing is specified.
WORKS:
Code:
mount -t nfs -o rw,intr,udp con:/home /server

DOES NOT WORK
Code:
mount -t nfs -o rw,intr con:/home /server
mount -t nfs -o rw,intr,tcp con:/home /server

I would like to use tcp, but I don't really know what the issue is.

Last edited by hpg4815; 09-03-2009 at 10:42 AM..
# 6  
Old 09-04-2009
might try specifying ver=3 as well to use NFS version 3 to see if that helps?

also, I don't see that your using autofs? so editing the /etc/sysconfig/autofs timeout wouldn't help.
# 7  
Old 09-04-2009
I specify the nfs version during the mounting process? I.E. mount -t nfs=3 etc. etc.
Is this what you mean. Is redhat using version 2 of nfs by default? How do I verify the version running? Thanks.

A i mistaken? I thought it was using autofs for the cdrom?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mount NFS Share On NFS Client via bash script.

I need a help of good people with effective bash script to mount nfs shared, By the way I did the searches, since i haven't found that someone wrote a script like this in the past, I'm sure it will serve more people. The scenario as follow: An NFS Client with Daily CRON , running bash script... (4 Replies)
Discussion started by: Brian.t
4 Replies

2. Red Hat

NFS client

Dear All , I have a NFS Server A and NFS client B. I have mounted the respective volume in NFS client. Now I wanted to make this volume as a NFS Server to another machine . Is this possible in Linux. Rgds Jegan R (3 Replies)
Discussion started by: jegaraman
3 Replies

3. AIX

AIX NFS Server and NFS Client

Hi 2 ALL, try to run NFS Server in AIX 7.1 : 1. Step by step on NFS Server node mkdir /tmp/test chgrp staff /tmp/test chmod 775 /tmp/test-- create export directory (fs) mknfsexp -d /tmp/test -t ro exportfs -va show mount -e :/# exportfs -av exports: 1831-187 re-exported /tmp/test... (4 Replies)
Discussion started by: penchev
4 Replies

4. HP-UX

Create NFS Client

I have found numerous articles on creating share on HPUX 11.1 (data source prepared for export) but I did not find from client's perspective what to do? I have a shared dir (all NFS ready full permissions) that I would like to access from a HP server what I need to do on this HPUX to be able to... (5 Replies)
Discussion started by: rsheikh01
5 Replies

5. AIX

NIM client installation hangs at 0608

Hi All, I am facing very strange problem. I have created NIM server with 6.1 TL4SP3. I am having SPOT and MKsysb of the same version. I am able to install the client using this spot and mksysb. Now I got the requirement of installing the 5.3 ML11SP3 client. So using the mksysb of 5.3 ML11SP3, I... (3 Replies)
Discussion started by: falgun6666
3 Replies

6. Solaris

Solaris 9 as a nfs client -- centos as a nfs server.

Hello, I have a centos as nfs server, its name is centos_A. After I finish the setup of the nfs server, the other linux can access this nfs server immediately via /net/centos_A/* But, My solaris 9 can not access /net/centos_A/* immediately. I have to leave /net/centos_A, and wait for about... (1 Reply)
Discussion started by: bruceharbin
1 Replies

7. AIX

DUAL VIOS & Client LPAR hangs at 25b3

I have a DUAL VIO ( IBM Virtual I/O ) setup on p 570. Two Vio server ( VIOS ) and many LPAR clients. VIO ( latest version + service pack + applied the fix ) and AIX 6.1 ML2 When both VIOs are running, and if I turn on a Client LPAR, the LPAR hangs at LED 25b3 for more than 1 hour then it... (2 Replies)
Discussion started by: filosophizer
2 Replies

8. UNIX for Advanced & Expert Users

NFS mount hangs

Last week I've installed Windows Services For UNIX on a Windows 2003 Server test machine (s2003), and exported a folder through NFS. The share is named "storage", and is used as a temporary place for very large export/dump files. Unfortunately, this is the only machine where I have access to a big,... (10 Replies)
Discussion started by: robotronic
10 Replies

9. AIX

new password not available on nis client for up to 10 minutes after yppush passwd

Hi, We are currently in the process to move the user authentication for our AIX clients to a Windows 2003 server to authenticate them against the active directory entries. What we have so far: - NIS master server on Windows 2003 Server with the unix-subsystem installed -> This is managing... (1 Reply)
Discussion started by: candyflip2000
1 Replies

10. Red Hat

How to nfs mount with Redhat Linux

*** I also posted this in the Unix general forum, but would like to get the Linux point of view. *** Hello all - I've searched this forum, but was unable to find out the info I need. I'm trying to mount (nfs mount) a directory on another box from my Linux machine. The mount point... (1 Reply)
Discussion started by: Heron
1 Replies
Login or Register to Ask a Question