Subject: Re: percentage free on volume
To: Kadari Mayson <kmayson@viconet.com>
From: gabriel rosenkoetter <gr@eclipsed.net>
List: port-mac68k
Date: 01/24/2000 14:02:24
On Mon, Jan 24, 2000 at 01:38:38PM -0800, Kadari Mayson wrote:
> hmm when I type df, it shows the percent free on the total hard drive or just one particular volume? I only see /dev/sd5g, /proc, and /kern, where the sd5g volume show 93% free on sd5g so that includes my /usr and /var partitions? or just my /root partition?

Sounds like you've just got the one physical drive with only the one
partition, in which case yes, the 93% free includes space for /usr and
/var.

The real way to be sure is to read your /etc/fstab (and the related
man page is probably good reading as well).

As an example, here's my macppc system, whose drive set up is a bit
messier:

/etc/fstab:
# device    mnt     fstype  options               dump fsck
/dev/sd1a   /       ffs     rw                       1 1
/dev/sd1b   none    swap    sw                       0 0
/dev/sd1g   /usr    ffs     rw                       1 2
/dev/sd2b   /sariel ffs     rw,noexec,nosuid,nodev   1 2
kern        /kern   kernfs  rw                       0 0
/proc       /proc   procfs  rw                       0 0

output of df:
Filesystem  512-blocks     Used    Avail Capacity  Mounted on
/dev/sd1a      4062330   982776  2876436    25%    /
/dev/sd1g      7367386  2108240  4890776    30%    /usr
/dev/sd2b       465716   135334   283810    32%    /sariel
kernfs               2        2        0   100%    /kern
procfs               8        8        0   100%    /proc

/dev/sd1a is my root partition, which also includes /var, /etc,
etcetera (no pun intended). /dev/sd1b is my swap partition, so it
doesn't get a mount point. /dev/sd1g is my /usr partition, and it's
explicitly mounted at /usr (after /dev/sd1a is already up), and takes
over everything at that point in the directory tree and over (there
could be a /usr on /dev/sd1a that I just don't ever see because
/dev/sd1g has been mounted over it... I know for a fact there isn't,
but it's a theoretical possibility to do things that way).

/dev/sd2b is an old external drive from my first mac68k machine, which
I mount at that machine's name in /. I don't want the old device
handles and suid binaries on /sariel to cause security problems, thus
it's mounted noexec, nosuid, and nodev. I just want myself and the
other users of that system to be able to get at files in our home
directories.

/kern and /proc are for kernfs and procfs respectively, which are
important tools, but df doesn't tell you much about them. (Their man
pages will, though.)

       ~ g r @ eclipsed.net