Subject: Re: df vs devices
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 01/09/2006 10:15:07
On Jan 9, 2006, at 9:43 AM, der Mouse wrote:

> (Sending to both tech-kern and tech-userlevel since I don't know which
> part contains the responsible change.  Please feel free to trim the
> list when following up with stuff relevant to only one of the two.)
>
> Traditionally, on NetBSD (and on older BSDs), df on a disk device has
> shown space on the filesystem on that device, even if the device is  
> not
> mounted anywhere at the time.
>
> Doesn't work that way on 2.0; instead, it shows the space on the
> filesystem holding the special device file (typically /).

In the old days, df used to actually open the device and interpret  
the UFS data structures to glean the free space.  "Ick."

I consider the current behavior to be correct.  Any other behavior  
would require adding file system-specific knowledge to df for every  
file system that works on NetBSD.

> Is this a bug (and thus worth sending-pr), a feature (??), an
> unfortunate side effect of something considered more important, or
> what?  It's annoying to have to mount a filesystem just to find out  
> how
> much space is free on it.
>
> /~\ The ASCII				der Mouse
> \ / Ribbon Campaign
>  X  Against HTML	       mouse@rodents.montreal.qc.ca
> / \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

-- thorpej