1821204 Members
3519 Online
109631 Solutions
New Discussion юеВ

NFS

 
Chakravarthi
Trusted Contributor

NFS

Hi all,

Why ls and df commands hand when the nfs server is not responding, mostly in hard mount cases

regards
chakri
7 REPLIES 7
Chakravarthi
Trusted Contributor

Re: NFS

typo hang
H.Merijn Brand (procura
Honored Contributor

Re: NFS

Because it is a *hard* mount, ls expects the server to be online, and *waits* until it is.

I strongly advice against hard NFS mounts,and use soft mounts with a low retry count instead.
Enjoy, Have FUN! H.Merijn
Chakravarthi
Trusted Contributor

Re: NFS

Hi,

i wanted to know why they have to hang, internally what happens

df i can understand, it shows even the mounts, so it might not be able to get the stat of it, but why ls should hang, it just have to list the files, and it hangs even when you are running command in local file system
Vincent Stedema
Esteemed Contributor

Re: NFS

Hi,

'ls' hangs because it tries to open the directory for reading and it can't.

Regards,

Vincent
Jose Mosquera
Honored Contributor

Re: NFS

Hi,

Bcse you are requesting for something not available, more info about NFS services...

http://www.docs.hp.com/hpux/onlinedocs/B1031-90048/B1031-90048.html

Rgds.

Ravi_8
Honored Contributor

Re: NFS

Hi, chakri

df hangs while hard NFS mount is failing.
but in your case ls is hanging, i feel you are trying to do ls in the filesystem that are to be hard NFS mounted.
is the ls hangs on the filesystems thar are mounted like on / file systems?
never give up
Shannon Petry
Honored Contributor

Re: NFS

df and ls both hang for the same reason.
df needs to stat the file, and get info from the server.
when ls runs, it also sends a list command to the server, which returns the results. Read the man page for nfsstat

If the NFS server is not responding, any command related to the NFS mounted file system will hang. This can include a change directory, ls, df, etc...

I usually mount production machines soft and background retries which greatly reduces hang if an NFS server is down for any reason.

Regards,
Shannon
Microsoft. When do you want a virus today?