Operating System - HP-UX
1829125 Members
2266 Online
109986 Solutions
New Discussion

ls or find command strange

 
Asep Somantri
New Member

ls or find command strange

If running command "ls -l" of "find" at directory /, server not give a respond (like hang).

But in other direcory, both command are normal.

Why ?

OS is HPUX 11.11 running on rp3440
11 REPLIES 11
Victor BERRIDGE
Honored Contributor

Re: ls or find command strange

Greetings,
Most certainly because you may have a NFS mount point and the distant server isnt responding...


All the best
Victor
Matti_Kurkela
Honored Contributor

Re: ls or find command strange

Are you running that command as root or as a normal user?

The directory / is located on the root filesystem (/dev/vg00/lvol3), while most other directories are on other, separate filesystems.

The directories /etc and /sbin are also located on the root filesystem. If "ls -l /etc" or "find /sbin" also hang, your root filesystem might be damaged.

MK
MK
Asep Somantri
New Member

Re: ls or find command strange

Hi,

Yes, I've NFS but so far "bdf" is okay.

But I haven't tried "ls -l /etc".

If root file system corrupted, Do I have to restore from Ignite ? .. or any way that simple without down the machine.

Best Rgds
Asep
Srikanth Arunachalam
Trusted Contributor

Re: ls or find command strange

Hi,

Try using ls -l with different options like

ls -l|head -2
ls -l|tail -2

This will confirm if you have problem retrieving the very old file. Probably that file might be a link file whose reference file is not available.

Thanks,
Srikanth
Victor BERRIDGE
Honored Contributor

Re: ls or find command strange

OK .. then.. what does bdf show?
Do you have mirrored disks?
What do you see when you type vgdisplay -v vg00?
(any stale- are both disks available?)...

My 2 cents

All the best
Victor
rajdev
Valued Contributor

Re: ls or find command strange

Hi,

First try to identify which FS/NFS is creating the problem.

have you used -xdev option when you run find ....?

Eliminate NFS, by going to the NFS directories and do a ls or ls -lR etc...
see for any errors in syslog or by running dmesg

Also running a find or ls -lR on a heavily used NFS is bound to take time...

If its not NFS then you can continue on which ever FS is causing the problem.
once you have identified a particular FS and if you have proper backups and no other process are using that FS, you can try unmounting it and run fsck on it.

Regards,
RD
Asep Somantri
New Member

Re: ls or find command strange

Hi,

Running bdf is OK & there's 1 nfs(linux).
Running "ls -l" & "find " on NFS directory is good.

We have no mirror & "vgdisplay -v vg00" shows no problem at all.

I'm not sure if restart the server will be a good idea.

Rgds,
Asep
V. Nyga
Honored Contributor

Re: ls or find command strange

Hi,

'ls' is working?

For me it sounds like your hard disk is defect.
You can test your hd:
'dd if=/dev/rdsk/ of=/dev/null bs=32768k'
(bs=block-size can be 1024, 2048,... - choose one you want)
you can see in your 'bdf'.
Check that /dev/null exists ;-)

If there's an error or 'in' and 'out' differs, then you've a problem.
Ignite backup is very good, but you'll need a disk which is ok.

Or have you damaged your file sytem with a 'rm *' command?
Compare your 'ls' results with another workstation.

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
V. Nyga
Honored Contributor

Re: ls or find command strange

ok - bs=512k or bs=1024k should be enough :-)

You should see something like this for an 'io' disk:
17677440+0 records in
17677440+0 records out

V.
*** Say 'Thanks' with Kudos ***
jasonK_1
Frequent Advisor

Re: ls or find command strange

Hi,

I just bought a new server (HPUX 11.31 rp3310) and it also has a problem with the find command. It runs, hang, run, hang... until it finished. dd command doesn't report any problem. The server doesn't have any NFS. How did you solve your problem?

Thanks,
Jason
Dennis Handly
Acclaimed Contributor

Re: ls or find command strange

>jason: I just bought a new server (HPUX 11.31 rp3310) and it also has a problem with the find command. It runs, hang, run, hang... until it finished. The server doesn't have any NFS.

If you don't have any NFS mounts, this is a different problem. Please create your own thread.

If you think there is connection, you can put a link to this thread.