Re: Linux 2.0.30 loosing HD space?

Keith Owens (kaos@ocs.com.au)
Tue, 10 Jun 1997 22:41:42 +1000


On Tue, 10 Jun 1997 13:58:56 +0200 (MET DST),
Baldur Norddahl <bbn@dark.x.dtu.dk> wrote:
>
>I have a couple of linux 2.0.30 servers where free space is slowly
>vanishing.
>
>[root@dark /]# du -x /
>...
>829401 /
>
>[root@dark /]# df
>Filesystem 1024-blocks Used Available Capacity Mounted on
>/dev/hda2 1501968 1319340 105013 93% /
>
>829 MB sounds much more right than the 1.319 MB that df is reporting.

Both can be correct. du only shows files in directories. If a file is
open but deleted it will not exist in any directory but will be taking
up space. If the program that opened the file is still writing, it
will be gradually taking up more space.

This command will list all open descriptors on /dev/hda2. Any numbers
without a name indicate files that are open but are not in directories.

ls -l /proc/*/{fd,cwd,exe,root} | \
fgrep '[0302]' | \
sed -e 's/.*://' | \
sort -u | \
awk '{print "echo " $1 "; find / -xdev -inum " $1 " -print"}' | \
sh