Operating System - HP-UX
1748161 Members
4037 Online
108758 Solutions
New Discussion юеВ

What's wrong with my /opt filesystem?

 
SOLVED
Go to solution
MA Qiang
Regular Advisor

What's wrong with my /opt filesystem?

When I executed 'du -xk /opt', I got '1957720 /opt' at the last line.
But 'bdf /opt' give the following output:
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol6 5242880 4191744 1043496 80% /opt

Who can tell me why the used 4191744 is larger then 1957720?

Thanks.
11 REPLIES 11
Bernhard Mueller
Honored Contributor

Re: What's wrong with my /opt filesystem?

Hi,

first you may have
- additional mount points under /opt
second most likely you have
- links into other filesystems where du counts the size of those files in other filesystems as "disk usage"

Regards,
Bernhard
Yogeeraj_1
Honored Contributor

Re: What's wrong with my /opt filesystem?

hi,

who ran the commands? root user?

here is the output from my system:

#du -xk
..
2847840 /opt
# bdf /opt
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol5 3145728 2858672 287056 91% /opt
# du /opt
...
5695680 /opt

regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Devender Khatana
Honored Contributor

Re: What's wrong with my /opt filesystem?

Hi,

Apart from these option there is a possibility of some file still open under /opt which has been actually removed. lsof can help you to find these files.

HTH,
Devender
Impossible itself mentions "I m possible"
Devender Khatana
Honored Contributor

Re: What's wrong with my /opt filesystem?

Hi,

lsof is available here is you do not have one.

http://gatekeep.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.74/

Regards,
Devender
Impossible itself mentions "I m possible"
Kevin Wright
Honored Contributor

Re: What's wrong with my /opt filesystem?

Certainly lsof will help diagnose large files that remain open on the filesystem. bfd is most likely reporing a removed file that a process still has open.

lsof /opt
Fabio Ettore
Honored Contributor

Re: What's wrong with my /opt filesystem?

Hi,

another possibility is by ncheck command

ncheck -F vxfs /dev/vg00/lvol6

for example on lvol6 (should be /opt for you too) I can check contents are all expected.

A few months ago I used that to discover that another mount point was on root filesystem and that kept on a large amount of space.

Just a thought....

Best regards,
Fabio
WISH? IMPROVEMENT!
MA Qiang
Regular Advisor

Re: What's wrong with my /opt filesystem?

I downloaded lsof from http://gatekeep.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.74/ and installed it. But I got coredump when run it. Why?

root@neptune2 [/home/admin]
# lsof /opt
Memory fault(coredump)

root@neptune2 [/home/admin]
# file core
core: core file from 'lsof' - received SIGSEGV

root@neptune2 [/home/admin]
# swlist |grep lsof
lsof 4.74 lsof

Mel Burslan
Honored Contributor

Re: What's wrong with my /opt filesystem?

UTAH HP-UX Porting archive only shows the 64 bit lsof available as far as I can see from your link. Are you sure you are running lsof on 64 bit version of hpux ?

try this :

getconf KERNEL_BITS

if it outputs number 32, this is why it is coredumping. If it reports back 64, I don't know why this is happening as it does not have any dependencies as far as I know.

On another note, are you sure you downloaded the correct depot for your hardware ? There are two depots over there. One for PA-RISC other for Itanium processors. Make sure you are trying to run the correct version.
________________________________
UNIX because I majored in cryptology...
Devender Khatana
Honored Contributor
Solution

Re: What's wrong with my /opt filesystem?

Hi Qiang,

I just tested the lsof depot available at the site and found that when we install the one for PA-RISC 64 bit it give the same error as mentioed by you. Infact while installing it gives a error in the log file if you would have noticed

ERROR: Unknown owner and/or group for file "/usr/local/bin/lsof".
SUID and/or SGID bit was not set.
ERROR: Failed installing fileset "lsof.lsof-RUN,r=4.74". Check the
above output for details.

You can find this error in swagent log file /var/adm/sw/swagent.log as well.

I then found working lsof at the link

http://the-other.wiretapped.net/security/host-security/lsof/binaries/hpux/

This is binary itself and only require to be copied to sever and permisions set. Then it works like a champ.

HTH,
Devender
Impossible itself mentions "I m possible"