output of du and df differ

From: sreenath sarikonda (sreeredhat@yahoo.com)
Date: Mon Apr 19 2004 - 11:47:48 EDT


This is the output I have from dfu and df.
bash-2.03# du -sk /var

10364 /var
and df -k

Filesystem kbytes used avail capacity Mounted on

/dev/dsk/c1t0d0s3 246466 214812 7008 97% /var
I guess both are different.Please let me know what should I do now.I am a bit relieved.
 
Thank you

Stepan Kucherenko <twohalf@dtd.peterstar.com> wrote:
There was the same problem with radiusd server on one of my sun servers.
It can happen because of creating file (i.e. assigning inode to it), than
deleting entry in directory with this inode, so this file cannot be found.
Try to look at 'df -k' output and 'cd /var ; du -sk' output. Compare
reported sizes - are they differs ? Such situation can happen because du
looks each file in directories and adds their sizes, but df looks at ufs
superblock and report free space.
If yes, and if you cannot found files which eats disk space, look at
programs running and try to restart them.
You can try to look at lsof (lsof = LiSt of Open Files) output (lsof can be
found on sunfreeware.com site, for example) and look at open files of any
program on your system.
As a last try, you can reboot machine.

But if sizes are not differs, just rotate logs....
Yahoo! Photos: High-quality 4x6 digital prints for 25"
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:28:29 EDT