1834458 Members
2925 Online
110067 Solutions
New Discussion

Problem with DF

 
SOLVED
Go to solution
Abi Akalay
Occasional Contributor

Problem with DF

df is incorrectly reporting disk space The only way around this is to reboot, is there another way?

This problem doesn't happen all the time, but I have seen it with two of our customers.

As an example a partision will be showing 95% used, aftre restart it drops to 25% used.

Any Ideas?

3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Problem with DF

You can identify the and kill the process holding the space open.

fuser -cu /filesystem

kill proccesses

or kill them all

fuser -cuk /filesystem
This command is dangerous and can crash applications. It should be used only as a last resort.

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
Bill Hassell
Honored Contributor

Re: Problem with DF

df is working fine. When you restart, programs that have temporary files open will be terminated and the space returns. Since there is a large amount of space that is recovered, use the du command to map the directory by size:

du -kx /my_dir | sort -rn > /var/tmp/du.log

Run this when /my_dir is almost full and then again (into a different file) after a reboot. Now compare the two listings. The directory with the biggest difference will be the location of the temp file(s). Use ll to sort the contents by size:

ll /my_dir/big_dir | sort -rnk5 | head

As before, run the ll command on the suspect directory before and after a reboot.


Bill Hassell, sysadmin
Sanjay_6
Honored Contributor
Solution

Re: Problem with DF

Hi Abi,

The reason you might be seeing the problem with reporting free space is because there is a process that has locked up space on the filesystem or a large file used by the process was deleted and the space was not freed up. Instead of rebooting if you can identify the process and just restart the process, it will drop the utilization back to normal levels.

We run into this type of situation very often and lsof is a big help over there. You can download lsof from this link if you want,

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

Hope this helps.

Regds