1836937 Members
2259 Online
110111 Solutions
New Discussion

Re: ls -l not responding

 
SOLVED
Go to solution
Gary Yu
Super Advisor

ls -l not responding

Hi all,

we had a strange problem with ls command, when I cd to root directory, and run a ls, I got the file/directory list, but any option with ls, e.g ls -l or ls -p will hang, nothing returned. it only happened to root directory '/', in any sub-directories they are OK.

I have noticed some entries in the syslog like
"May 15 14:43:59 test1 vmunix: NFS server (pid864@/net) not responding still trying. "
the process 864 is automount, we don't have any NFS file system on the sever, and we are not using automount, so I kill the process, disable automount and restart nfs.core and nfs.client. there're no entries in syslog about automount anymore, but the problem still exists, any idea?

thanks,
Gary
11 REPLIES 11
Helen French
Honored Contributor

Re: ls -l not responding

Is "bdf" hanging? Do you have any entry in /etc/fstab for NFS mounts? If yes, remove it since you are not using NFS. Also, while doing "ls" on root directory, do you see a lot files? Did you try "ll"?
Life is a promise, fulfill it!
Zafar A. Mohammed_1
Trusted Contributor

Re: ls -l not responding

Check the Access Control List maybe you'll find something.

It seems it is trying to reach some other server and some of the root files will be NFS.
ls -l will display the complete reference path also.

Thanks
Zafar
someone_4
Honored Contributor

Re: ls -l not responding

Hi Gary,
If you dont have an nfs mount .. I beleive that the only way to fix this is to reboot the server.

If you want to disable nfs from starting at boot up you can go to /etc/rc.config.d/

vi nfsconf
and change
NFS_CLIENT=1
NFS_SERVER=1

to
NFS_CLIENT=0
NFS_SERVER=0


Richard
Dietmar Konermann
Honored Contributor

Re: ls -l not responding

On HP-UX by default this entry is in /etc/auto_master:

/net -hosts -soft

This automount/autofs configuration allows to access remote host's file systems via the path /net/, as long as those hosts export them.

Now you have killed the automounter, but the kernel still monitors the mount point for it... I'm afraid, you will only get rid of this problem by rebooting. Comment out the auto_master entry before, if you don't need the functionality.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Gary Yu
Super Advisor

Re: ls -l not responding

Hi,

thanks all for the reply.

bdf works but ll doesn't either. I found the problem is the /net directory which automount uses. when I try to "cd /net" it hangs, and after Ctlr-C, it said :
sh: /net: The specified directory is not valid.

and any operations on /net will hang. so the question now is, how to release /net or delete /net ?

thanks,
Gary
Gary Yu
Super Advisor

Re: ls -l not responding

Hi Dietmar,

didn't see your reply when I was typing, I think you are right, although automount is killed, /net still not released. is reboot the only option?

BTW, will it cause other problems other than "ls", I may not have a chance to reboot the server in a while, I just want to know can I live with it before restart ?

thanks,
Gary
Dietmar Konermann
Honored Contributor
Solution

Re: ls -l not responding

Gary,

the only problem is that e.g. open() or stat() the /net directory hangs (interruptable). Your ll does a stat() on files/dirs it sees, just to print the timestamps, etc.

Other parts of the system should not be affected, so it should be no problem to wait until the next planned downtime. However, scripts could get stuck while accessing /net.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Umapathy S
Honored Contributor

Re: ls -l not responding

hi,
If no process is accessing files from /net then it wont be a problem until reboot.
To find out which process are accessing try lsof package.

lsof -b /net

Kill if any process comes out as a result.

HTH
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
someone_4
Honored Contributor

Re: ls -l not responding

hello Dietmar ,

I did not know about auto_master. I had this issue and looked and looked and like you said the only solution is to reboot but i was never able to find out how to prevent it. Execpt for stop or disabling nfs.

I do have one question. On one server when I look at /etc/auto_master it tells me
## Configured using SAM by root on Thu Mar 27 21:26:31 2003

With nothing in it.

On another server ( the one that I had the problem with /net )
I do see the entry.

Would you happned to know what why they are different?


Thanks
Richard
Dietmar Konermann
Honored Contributor

Re: ls -l not responding

Gary,

normally you should not get into problems forcing a reboot. However there, there are versions of automount that are known to cause such things... usually they get solved by installing the latest NFS/ONC cumulative patch. But if you don't use/need NFS at all then disabling is the easiest workaround.

Concerning your auto_master file... looks like someone used SAM to configure it. You are able to do some from the "Networking and Communications" -> "Networked File Systems" area.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Dietmar Konermann
Honored Contributor

Re: ls -l not responding

Oops, Richard. Didn't see that not Gary was asking. :)
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)