Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Mar 1997 11:22:46 +0200
From:      Nadav Eiron <nadav@barcode.co.il>
To:        Michael Alwan <alwan@rma.edu>
Cc:        questions@FreeBSD.ORG
Subject:   Re: disk usage reporting
Message-ID:  <331BE9E6.24C@barcode.co.il>
References:  <331BBB00.41C67EA6@rma.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Michael Alwan wrote:
> 
> To all:
> 
> Using df to look at my disk space, I get some confusing reports:
> 
>                                free                    capacity         mounted
> on
>         /dev/wd0a             -1282                     104%                /
>         /dev/wd0s4f              etc                      etc

This is a *very* weird setup. Why mounting something on /etc? Files in
/etc are used before the filesystems get mounted (specificaly,
/etc/fstab tells the system what filesystems to mount), so mounting
something on top of that really makes no sense (at least to me). Are
these the only file systems you have?

> 
> The first entry perplexes me.  According to the disk label editor, the
> name of the disk is wd0, and the freebsd partition name is wd0s4, and
> the file systems are wd0s4a...f.  (This is a 1.6mb hard drive with three
> primary dos partitions and one freebsd partition with the autodefaults
> for file system allocation).  Is the wd0a file system mentioned above
> the root file system, and is it filling up because I log on as root and
> all my mail and web caches are there?  Why is it /dev/wd0a and not
> /dev/wd0s4a?  Perhaps these are the wages of the evil sin of logging on
> as root--perhaps if I had a /usr/home directory I wouldn't be running
> out of space.  Any suggestions on how to handle this problem in the
> future (relocate mail and disk caches--a temporary fix?), are my
> suppositions correct, and what about the file system name
> discrepancies.  Any light shed on these matters would be appreciated!
> 
> Thanks,
> 
> Michael
The root file system is reported without the slice number for historical
reasons. Anyhow, FreeBSD will always boot the first BSD slice off the
hard drive, so the slice number for the root filesystem is implicit.
Using the root filesystem for all your needs is not recommended. Apart
from getting it filled up you may also get it corrupted. The standard
setup (with /usr and /var on separate file systems) will ensure that
under normal operation the root filesystem is read-only, lowering the
risk of corruption.

Running as root also lets you use the space that UFS normaly reserves to
allow faster allocations (that's why you have negative free space on
it). This has a very large impact on write performance. In short - I
usually try to use the root filesystem as little as possible. Most of my
machines have just 20MB of root filesystem, and I never had it filled
up.

Your df output doesn't show any additional filesystems, but is /usr on a
separate partition? If not, moving to /usr/home won't help...

Nadav



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?331BE9E6.24C>