Do you have /etc/fstab set up?Quote:>I had been rather frustrated for a while that when I did a df, it did
>not report the usage of any filesystems, I figured I missed some
>configuration somewhere, and I'd get around to it. I just got around to
>mounting two DOS drives (/dev/hda1 and /dev/hdb1) -- my linux partition
>is /dev/hdb2 -- and now df, with no parameters, lists only the usage of
>/dev/hda1 and /dev/hdb1 -- I can get it to report usage of /dev/hdb2 if
>I do a df /hdb2 , but it should do all three, right?
: I had been rather frustrated for a while that when I did a df, it did
: not report the usage of any filesystems, I figured I missed some
: configuration somewhere, and I'd get around to it. I just got around to
: mounting two DOS drives (/dev/hda1 and /dev/hdb1) -- my linux partition
: is /dev/hdb2 -- and now df, with no parameters, lists only the usage of
: /dev/hda1 and /dev/hdb1.
No doubt df uses getmntent() to figure out which filesystems are
mounted. This routine will look at /etc/mtab. The program mount
updates /etc/mtab. So, the behaviour you describe is caused by
an initially empty or nonexisting /etc/mtab, where you would hope
for an entry describing the root fs.
Now it is quite common (and proper) for rc scripts to do a
rm -f /etc/mtab
and mount will create a fresh mtab when it finds none exists,
with a root entry found in /etc/fstab.
So, if either you do not remove /etc/mtab on bootup, or do
not have a line for your root fs in /etc/fstab, or only call
mount with the -n option (do not write mtab), or remove mtab
after you called mount, then you will have the above problem.
> Sounds to me like your /etc/mtab is shot.
> Startup sripts should clear /etc/mtab and then do a "mount -a".
> This inelegance will (hopefully) not exist in Linux v2.0 where
> /etc/mtab has moved to /proc.
My system has restarted after a power failure. Now df reports no free disk
space and 100% usage even if it does have space. I ran e2fsck without any
success. Sendmail cannot start because it does not have free space and I
cannot put a file by ftp to the system. I can however write to the disk.
Do I have to repartition and format the disk to fix it? I also tried
e2fsck -b 8193 . That did not work neither.