Operating System - HP-UX
1836458 Members
2182 Online
110101 Solutions
New Discussion

Re: File System Housekeeping

 
Indrajit Bhagat
Regular Advisor

File System Housekeeping

testnodep-root> bdf .
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg_common_01/lv_app
                    131072  131072       0  100% /app

 

dr026-root> du -sk *|sort -nr|more
5130428323      lms                                   -----This is seperate Mount Point
27737617        common                            -----This is seperate Mount Point
0       web
0       test
0       sms
0       ors
0       oracle
0       lost+found
0       ets
0       bmc

 

testnodep-root> lvdisplay /dev/vg_common_01/lv_app
--- Logical volumes ---
LV Name                     /dev/vg_common_01/lv_app
VG Name                     /dev/vg_common_01
LV Permission               read/write
LV Status                   available/syncd
Mirror copies               0
Consistency Recovery        MWC
Schedule                    parallel
LV Size (Mbytes)            1024
Current LE                  32
Allocated PE                32
Stripes                     0
Stripe Size (Kbytes)        0
Bad block                   NONE
Allocation                  strict
IO Timeout (Seconds)        default

 

Above File system is full, but not able find any directory or file which is utilizing more, on which we can do housekeep, any suggestion what could be reason, what best we could do to find something which can be housekeep.

9 REPLIES 9
Dennis Handly
Acclaimed Contributor

Re: File System Housekeeping

I'm confused.  Your bdf has 131 Mb.

But your du looks like it has 5130 and 27 Gb.

 

Can you do a bdf in lms  & common?

If there is a big difference in bdf and du in accounting for used space, it could be a large opened but removed file.

Turgay Cavdar
Honored Contributor

Re: File System Housekeeping

Hi,
Please check with lsof command , If some files are deleted but still opened by processes.

# lsof | grep "/app"
Steven E. Protter
Exalted Contributor

Re: File System Housekeeping

Shalom,

fuser -cu <mount point>

This will show you processes with open file handles.

lsof is a better tool, but if you don't have it and are careful, you can resolve this issue without lsof.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: File System Housekeeping

Hi:

 

You need to use 'lsof' to find deleted but open files.  This is one of the reasons the tool was developed.

Look for files with an "NLINK" count of zero (0). The "SIZE/OFF" field will be the size in characters consumed. Files with a link count of zero are those that have been unlinked (removed):

# lsof +L1 +D /path_to_mountpoint

If you don't have 'lsof' installed (and you should) fetch it for installation from:

 

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.84/

 

Installation is quick and doesn't require a reboot.  *Every* server, in my opinion should have this installed.

 

Regards!

 

...JRF...

Indrajit Bhagat
Regular Advisor

Re: File System Housekeeping

I am getting following error while running losf command:

 

dr026-root> lsof | grep "/app"
sh: lsof: Execute permission denied.
dr026-root>

 

dr026-root> ls -lrt|grep lsof
-rwsr-xr-x   1 root       bin         346748 Jun  4 05:27 lsof

 

Please suggest what is the issue in running lsof command?

 

 

Dennis Handly
Acclaimed Contributor

Re: File System Housekeeping

>sh: lsof: Execute permission denied.
-rwsr-xr-x   1 root       bin         346748 Jun  4 05:27 lsof

 

You seem to have the right permissions.  What is the architecture of this lsof?

file lsof

 

Did you download the right lsof to match your hardware?  I.e. You're trying to run an Integrity version on PA.

Indrajit Bhagat
Regular Advisor

Re: File System Housekeeping

dr026-root> file lsof
lsof:           ELF-32 executable object file - IA64
dr026-root> model
9000/800/rp4440
dr026-root>

Dennis Handly
Acclaimed Contributor

Re: File System Housekeeping

>lsof:   ELF-32 executable object file - IA64
>9000/800/rp4440

 

You need a PA version of lsof.

Pete Randall
Outstanding Contributor

Re: File System Housekeeping

Well, there's your problem.  You're trying to run an ia64 module on a PA-RISC machine.  You need to install the PA-RISC version.

 

 

 

Oops!  Sorry, Dennis - I swear your reply wasn't there when I originally posted this.  Though maybe my tired old eyes just missed it.


Pete