Subject: Re: Adding new disk; partitions not empty
To: Chris Brown <chrsbrwn@mindspring.com>
From: Christopher P. Gill <cpg@scs.howard.edu>
List: port-mac68k
Date: 06/28/1999 14:44:02
On Mon, 28 Jun 1999, Chris Brown wrote:

[** Stuff about 'df 'failing basic arithmetic deleted **]

> As I'm sure somebody else will say as well, this is a (rather old and
> longstanding) bug. df reports the size/used of each partition (except the
> first) as that of the current partition plus the previous partition in the
> partition table.

Is this bug specific to the mac68k port?  I didn't find any reference to
it in the FAQ document, although I could have missed it.

> I just wrote a perl (and python, too, as I am teaching myself both languages)
> wrapper that takes the columns apart, subtracts out the excess, redoes the
> Avail and Capacity calculations, and then prints out the results in the
> original format. 

Hmmm.

> It's a dirty hack, but you are welcome to it if you would like to customize it
> to your system (at the very least, you would have to change the device names
> and reorder the calculations, as my system starts over with the addition at
> one partition, just to be different). The python one is actually much prettier
> and easier to understand, so if you know any python that might be the best to
> customize :)

The only python I know is Monty Python, and I don't have perl on my system
yet - one of the reasons is because I need more disk space...

However, it seems as though it'd be just as easy for some knowledgeable
person to patch 'df' to do the right thing.  Or am I just a little naive?


/*======================================================================
"Don't die wondering..."                http://www.cldc.howard.edu/~cpg
                                              email: cpg@scs.howard.edu
chris out-              Christopher P. Gill
  peace.        C.L.D.C. Senior System Operator (Ret.)
======================================================================*/