disk space hogged
I would appreciate any advice on the following problem that I
have run twice during this week.
I found that at some point someone hogs all the disk space on
my RedHat 9 workstation: "df -k /dev/hdc2" shows that all
60 GBytes on my hard disk (/dev/hdc2) are used, and there is
zero free space left on it. This seems to be correct - when
I try to write to the disk "echo Hello > /hello.txt", I am
getting messages "no space left on the device".
However, if I try to find out which file(s) take so much of
disk space by executing "du -k / | tail", this command's output
says that there are only 30 GB worth of files and directories
under "/" (root dir). Apparently 'df' and 'du' have disagreement
regarding how much disk space used and how much is left free.
If I reboot my workstation, and execute 'd'f and 'du' again,
they both will agree that there are 30 GB used disk space, and
30 GB left free.
I am really confused who hogs all the disk space, and why
'du' fails to report it. I would appreciate any advice on this
I am running RedHat 9 (original installation, no upgrades) on
pretty much standard PC (Pentium 4 2.0 GHz, 1 GB RAM, Matrox G550
video, 3COM905B network card, CDROM and single 60 GB Hitachi
hard disk at /dev/hdc). I am not doing anything particularly
unusual - GNome is running, Xsnow (toy X Windows applications
with Santa and Rudolph running across the screen), couple of
Bash shells, Emacs, and Firefox. I actually suspect Firefox
to cause this problem (since this problem start happening out
of the blue after I have upgraded Firefox to 18.104.22.168 couple of
weeks ago), but at the moment I can't prove it.
So how can I find out which process or file hogs all the
free space on disk ?
Thanks and Regards,
Re: disk space hogged
On 2006-12-29, nobody <firstname.lastname@example.org> wrote:[color=blue]
> If I reboot my workstation, and execute 'd'f and 'du' again,
> they both will agree that there are 30 GB used disk space, and
> 30 GB left free.[/color]
The missing space could go in a file that has been unlinked (the file
name has disappearead from the directory) but some process has still
an open file handler, so the file is still 'there' and the space is
used, but the file itself can no longer be seen or accounted for by
new processes. Rebooting remove the file handler and then clear the
space used by the "invisible" file.
> I am running RedHat 9 (original installation, no upgrades)[/color]
That thing is almost 10 years old, it would be better to upgrade to
something more up-to-date.
> So how can I find out which process or file hogs all the
> free space on disk ?[/color]
Using fuser and lsof, and checking which processes are active when
the problem arises.
Politics is the art of looking for trouble, finding it everywhere, diagnosing
it incorrectly, and applying the wrong remedies.
-- Julius Henry "Groucho" Marx ([url]http://en.wikiquote.org/wiki/Groucho_Marx[/url])