strange behaviour of df command
Nigel Wade
nmw at ion.le.ac.uk
Tue Oct 10 15:34:46 UTC 2006
Atul Tyagi wrote:
> Hi All,
>
> I am facing a little problem. I guess its more of a conceptual problem
> rather than a OS issue.
>
> One of my software raid partiton /dev/md4 is about 30 GB. I had put a file
> of about 18GB in that jus for few mins and then deleted that. Now even
> after
> about 6 hrs. My RHEL4 system gives me weird output. following are the
> outputs that might help you understand.
>
> df -h
> ===
>
> [root at pingu ~]# df -h
> Filesystem Size Used Avail Use% Mounted on
> /dev/md0 5.0G 2.7G 2.1G 56% /
> /dev/md1 99M 17M 78M 18% /boot
> none 1014M 0 1014M 0% /dev/shm
> /dev/md2 5.0G 190M 4.5G 4% /var
> /dev/md4 30G 22G 5.9G 79% /usr/local/test
>
> du -hs
> =====
> [root at pingu ~]# du -hs /usr/local/test
> 2.7G /usr/local/test
>
> Can some one please clear my doubt and explain why there is a such a hugh
> difference in both the commands. Disk usage shown by df -h is 22G where as
> du shows 2.7G.
>
> Would appriciate any pointer to this problem.
>
> Thanks,
>
> Atul
Is the file still open? A file which is open can have it's i-node deleted from
the directory containing it, but the actual disk space will not be released
until the file is closed.
Check for open file descriptors. A common cause is a large log file held open by
syslog even after the file has been deleted.
--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw at ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
More information about the redhat-list
mailing list