Operating System - HP-UX
1844558 Members
3571 Online
110233 Solutions
New Discussion

Re: long delay while issuing ls -l on /

 
SOLVED
Go to solution
Nick D'Angelo
Super Advisor

long delay while issuing ls -l on /

Hello.

On our test server, when I issue the command either as root or myself, ls -l on the root / drive it takes forever to come back.

However an ls command comes back almost instaneous.

Suggestions?
Always learning
15 REPLIES 15
John Carr_2
Honored Contributor

Re: long delay while issuing ls -l on /

Hi

do you have a long wait doing ls -l else where eg /tmp ?

you may have some corrupt inodes and need to do an fsck

John.
Anupam Anshu_1
Valued Contributor

Re: long delay while issuing ls -l on /

Do you have any stale nfs mount on '/' directory. Unmount nfs directories, ls(1) should work fine with the usual speed.

BTW, which version of HP-UX are you using. Could you please provide the what string (what /usr/bin/ls) for ls(1) binary.

Regards,

Anshu
Nick D'Angelo
Super Advisor

Re: long delay while issuing ls -l on /

Thanks for your tips.

I do believe that there is a stale nfs mount, let me dig into it a bit further.
Always learning
Nick D'Angelo
Super Advisor

Re: long delay while issuing ls -l on /

I have changed the /etc/rc.config.d/nfsconf file to read NFS_CLIENT=0 and restarted the nfs service.
I have also done a mount -a
and I have also restarted the /sbin/rc2.d/net services but the problem still exists.

I am on HPUX 11i on an RP390
Always learning
Anupam Anshu_1
Valued Contributor

Re: long delay while issuing ls -l on /

Hi Nick,

looks like the nfs server for you is down. Identify the server which is down or "out of network" and then follow the steps to mount the directory of this nfs server on to your machine.

Just to test ls(1), you can unmount all nfs mounts. I am sure ls(1) would will work fine.

Also if you can mount all the the nfs mount, you will be able to find which nfs mount is down.

HTH,

Anshu
Jeff_Traigle
Honored Contributor

Re: long delay while issuing ls -l on /

Same problem here on an L-class with 11i. NFS isn't turned on at all... all local file systems. It's an Ignite-UX/SD-UX server for the test environment so I haven't been overly concerned about it, but it would be nice to know the reason for it.
--
Jeff Traigle
KapilRaj
Honored Contributor

Re: long delay while issuing ls -l on /

In my experience this situation in two cases,

1. stale NFS mounts #Identify and unmount the fs.
2. Huge number of files ! # Proper housekeeping

Regds,

Kaps

Nothing is impossible
hpuxrox
Respected Contributor

Re: long delay while issuing ls -l on /

Have you been using pfs to mount cdroms? This issue can come from dismounting a cdrom with "umount" that should have been dismounted with pfs_umount. If this is the case, it can get very ugly and you will need to reboot :-( to resolve the issue.
Jose Mosquera
Honored Contributor

Re: long delay while issuing ls -l on /

Hi,

Do you have a lot of files inside?

Rgds.

Jeff_Traigle
Honored Contributor

Re: long delay while issuing ls -l on /

Oops. I was mistaken. I guess the default config is to have client, server, and automount turned on. (I should have known NFS server was on since that's how I server the Ignite image.)

I don't recall trying to mount a pfs CD either. I thought I'd rebooted once before to see if that resolved the problem and it hadn't... but after turning off the unneeded NFS services and rebooting, it's ok now. An rp2400 loaded with the same OS (and default NFS config) was working fine all along.
--
Jeff Traigle
Nick D'Angelo
Super Advisor

Re: long delay while issuing ls -l on /

Everyone,
1, there are not a lot of files in /.
2, I am quite sure the problem is with the /net (which was in the mnttab to use nfs)
However, I issued the command /sbin/rc2.d/nfs.client (whatever) stop and then restarted it to try and re-initialize or re-read the fstab and re-create the mnttab. But this didn't work.
I also tried to issue the mount -a and this didn't resolve the problem either.

Is there a command that I am missing in the /sbin/rc2.d that I should be using to re-intialize the 'required' filesystems?

I would rather not reboot the server, but I can if I have to as it is a test server.

Always learning
John Carr_2
Honored Contributor

Re: long delay while issuing ls -l on /

Nick

if you have identified a stale NFS mount try unmounting it with the -f force option if this does not work which is usually what happens try mount -o which over rides an existing mount. If you cant overcome it with one of these options I think you may well have to reboot.

John.
John Carr_2
Honored Contributor
Solution

Re: long delay while issuing ls -l on /

Nick

mount -O not lower case as i mistyped


John.
Nick D'Angelo
Super Advisor

Re: long delay while issuing ls -l on /

Tried the mount -O and all other options but no go.

Therefore rebooted and it is much better now, although I am onto my next problem.

Thanks all.
Always learning
Mohanasundaram_1
Honored Contributor

Re: long delay while issuing ls -l on /

Hi,

If you are interested in knowing, I had 28 systems giving the same problem at 1 site. The problem was resolved after I disabled automounter.

I have not investigated this problem further but know automount was causing this.

Hope it helps others.

Cheers,
Mohan.
Attitude, Not aptitude, determines your altitude