df not reporting root filesystem usage (but is reporting mounted dos drives)

df not reporting root filesystem usage (but is reporting mounted dos drives)

Post by Darx » Sat, 13 Apr 1996 04:00:00



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?
________________________________________________________________________
***PGP fingerprint = D5 EB F8 E7 64 55 CF 91  C2 4F E0 4D 18 B6 7C 27***
reality is in the \\I don't think they could handle the music in my head

 
 
 

df not reporting root filesystem usage (but is reporting mounted dos drives)

Post by Bruce Toml » Sat, 13 Apr 1996 04:00:00



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?

Do you have /etc/fstab set up?

 
 
 

df not reporting root filesystem usage (but is reporting mounted dos drives)

Post by Andries Brouw » Sat, 13 Apr 1996 04:00:00


: 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.

 
 
 

df not reporting root filesystem usage (but is reporting mounted dos drives)

Post by Darxu » Thu, 18 Apr 1996 04:00:00




> >I had been rather frustrated for a while that when I did a df, it did
> >not report the usage of any filesystems

> 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.

What do you mean by "shot" -- anything to be done about it?
________________________________________________________________________
***PGP fingerprint = D5 EB F8 E7 64 55 CF 91  C2 4F E0 4D 18 B6 7C 27***
reality is in the \\I don't think they could handle the music in my head

 
 
 

1. df incorrectly reports 100% usage after power down

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.

Pierre Royal

2. Querying modem-to-modem speed of PPP connection.

3. Ultrix df doesn't report the correct filesystem space

4. guava (Java) with Redhat Linux 6.0 -- (newbie)

5. 'df' continues to report filesystem full after files deleted

6. Does Solaris 2.4 mailtool support MIME?

7. tripwire email reports to not match harddrive reports

8. Change IRQ of eth0

9. I am doing a marketing report on Ycc

10. Proble: df reports disk full, but not true

11. "dfspace" reports correct information, but "df -v" does not.

12. fsck reports filesystem larger than device it is mounted on Help!!!