From: Michael Heldebrant <hmike@portalofevil.com>
To: debian-user@lists.debian.org
Subject: Re: df print the wrong information
Date: 24 Oct 2001 23:50:38 -0500
On Wed, 2001-10-24 at 22:06, Yuwen Dai wrote:
> Hi, All
>
> I encounter a strange behaviour of df. This is the output of df on my
> machine:
>
> Filesystem 1k-blocks Used Available Use% Mounted on
> /dev/hda6 303344 25804 261879 9% /
> /dev/hda1 23302 1897 20202 9% /boot
> /dev/hda7 2016016 453636 1459968 24% /usr
> /dev/hda9 2016016 467776 1445828 24%
/usr/local/cvsroot
> /dev/hda10 101089 13 95857 0% /tmp
> /dev/hda11 101089 14185 81685 15% /var
> /dev/hda12 2016016 467776 1445828 24% /usr/local
> /dev/hda13 10080488 1604 9566816 0% /home
> /dev/hda14 12563216 20 11925016 0% /opt
> /dev/hda8 2016016 13032 1900572 1% /usr/local/mysql
>
> Note `/dev/hda9` and `/dev/hda12` have the same information. But
> `/dev/hda9' is larger than `/dev/hda12'.
>
> I umount /usr/local/cvsroot and re-mount it. Then df prints the correct
> thing:
>
> Filesystem 1k-blocks Used Available Use% Mounted on
> /dev/hda6 303344 25804 261879 9% /
> /dev/hda1 23302 1897 20202 9% /boot
> /dev/hda7 2016016 453636 1459968 24% /usr
> /dev/hda10 101089 13 95857 0% /tmp
> /dev/hda11 101089 14186 81684 15% /var
> /dev/hda12 2016016 467776 1445828 24% /usr/local
> /dev/hda13 10080488 1604 9566816 0% /home
> /dev/hda14 12563216 20 11925016 0% /opt
> /dev/hda8 2016016 13032 1900572 1% /usr/local/mysql
> /dev/hda9 10080488 20 9568400 0%
/usr/local/cvsroot
>
> Any idea? Thanks in advance.
I have the sneaking suspicion that you mount /usr/local/cvsroot before
you mount /usr/local. This would make for very odd behavior for the
system. Change the location of /usr/local to be higher in the
/etc/fstab file for all your partitions under /usr/local
(/usr/local/mysql and /usr/local/cvsroot) and this problem should go
away. This will cause /usr/local to be mounted before the
subdirectories, which is the correct thing for what you want to do.
Also check under the mount points with the filesystems unmounted
(suggested to be done in single user mode). Data may be in the wrong
places at this point (most of /usr/local is probably under /usr (hda7).
--mike