Re: "df" and "du" show different results

Paul Chang (pschang@cdfsga.fnal.gov)
Thu, 18 Nov 1999 12:15:42 -0600 (CST)

Hi,

Thanks for these valuable suggestions. After reboot the system now I can
edit and copy some files to the previously "full" disk. But something
interesting occurred. This time the "df" doesn't work !!! Below is the
error messages:

Filesystem 1024-blocks Used Available Capacity Mounted on
df: module: No such file or directory
df: kerneld: No such file or directory
df: kerneld,: No such file or directory
df: filesystems.: No such file or directory
df: was: No such file or directory
df: 116/205600: No such file or directory
...
...

I happened to find that these error messages are strongly correlated
to the second field for each line in the file /etc/mtab; that also means
something wrong to the file /etc/mtab in my system. After carefully
modifying this file, now the output of df seems in a good shape, as
follows,

Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/hda10 1041606 661670 326120 67% /
/dev/hda9 995115 344007 599702 36% /disk1
/dev/hda8 792800 28432 723404 4% /disk2

But I am not sure whether I had done something dangerous in modifying
/etc/mtab. I am also afraid that when I reboot the system next time the
file /etc/mtab will be changed again. Does it means I have to re-install Linux
to my PC ? Thanks.

Paul