Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Dec 2001 12:53:42 +0800
From:      sothat <sothat@bsd.ee.ntu.edu.tw>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: du and df not consistency ?
Message-ID:  <20011230045342.GA38980@bsd.ee.ntu.edu.tw>
In-Reply-To: <1009682944.79990.0.camel@shumai.marcuscom.com>
References:  <20011230030524.GA32059@bsd.ee.ntu.edu.tw> <1009682944.79990.0.camel@shumai.marcuscom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Dec 29, 2001 at 10:28:59PM -0500, Joe Clarke wrote:
> On Sat, 2001-12-29 at 22:05, sothat wrote:
> 
> Well, my thoughts would be in either /tmp or /var will give you the most
> trouble.  It's not a good idea to leave these on the root filesystem.  /
> should be read-only for all intents and purposes.  The more writing you
> do to /, the more chance you have to corrupt it.

  Oh thank god. The free space goes back :D
  As the problem you descirbe 
  /var/log bursted and I use 
  mount_null /mnt/log /var/log ( is it buggy ?)
  
  But for no reason , I umount /var/log and use soft link again :Q
  the space never turned back.
> 
> > 
> >     below is df output:
> > 
> >     Filesystem        1K-blocks     Used    Avail Capacity  Mounted on
> >     /dev/da0s1a          297663   255876    17974    93%    /
> >     /dev/da1s1e          297663   173693   100157    63%    /usr/local
> >     /dev/ad0s1f          992239   668380   244480    73%    /usr/src
> >     /dev/ad0s1e         2980238  2209800   532019    81%    /backup
> >     /dev/ad0s1g         4037030  2587663  1126405    70%    /backup2
> >     /dev/vinum/vinum0   7000492  6230498   209955    97%    /mnt
> >     /dev/da2e          68798704  7827914 55466894    12%    /ftp
> >     procfs                    4        4        0   100%    /proc
> > 
> >     the "/" Used 255876 kilo byte
> > 
> >     But when I use du -d 1 -x in /
> > 
> >     77      ./dev
> >     93796   ./usr
> >     1812    ./stand
> >     861     ./etc
> >     1       ./proc
> >     3965    ./bin
> >     714     ./boot
> >     1       ./mnt
> >     5193    ./modules
> >     4887    ./root
> >     11776   ./sbin
> >     17965   ./tmp
> >     2468    ./var
> >     4       ./modules.old
> >     2       ./ftp
> >     1       ./mnt2
> >     1       ./backup
> >     1       ./backup2
> >     49      ./lost+found
> >     153189  .
> > 
> >     I just got 153189 kilo. 
> > 
> >     why the df output and du got the different result ?
> >     ( I've sync many times :)
> 
> What does echo $BLOCKSIZE report?  What version of FreeBSD is this? 
> With 4.5-PRE, and BLOCKSIZE set to K, I get fairly consistent df/du
> reporting.  Also, du may report different values if you run it as a
> non-root user.  Try doing du -r -d 1 -x and see if you get any errors
> about unreadable directories.
  FreeBSD Stable 4.4
  du -r -d 1 -x get the same result .

  but they are the same now :)

  indi[root]:/# du -d 0 -x 
  153540  .
  inid[root]:/# df
  Filesystem        1K-blocks     Used    Avail Capacity  Mounted on
  /dev/da0s1a          297663   153539   120311    56%    /


  thanks anyway :)
-- 
-sothat


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011230045342.GA38980>