Subject: df(1) on unmounted device works improperly
To: NetBSD Current Users <current-users@netbsd.org>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 03/17/2003 21:42:00
Hey, all,

with -current kernel and userland as of a week ago (and, it seems, as
far back as 1.6M, if not farther), df(1) does The Wrong Thing.

One used to be able to run df on an unmounted fs, accessing it via
the block (or was it the char?) special device, showing no mount point
associated with it, but giving the correct stats for the filesystem
in question.

This no longer works, and I honestly have no idea how long it's been
broken, but it's broken:

rivendell 502# df /dev/wd2p
Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
/dev/wd1a       64319    49167     11936    80%    /
rivendell 503# df /dev/rwd2p
Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
/dev/wd1a       64319    49167     11936    80%    /
rivendell 504# mount /dev/wd2p /backups
rivendell 505# df /dev/wd2p
Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
/dev/wd2p    38251300  3929576  32409156    10%    /backups
rivendell 506# df /dev/rwd2p
Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
/dev/wd1a       64319    49167     11936    80%    /
rivendell 507# df /backups
Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
/dev/wd2p    38251300  3929576  32409156    10%    /backups
rivendell 508# umount /backups
rivendell 509# df /dev/wd2p
Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
/dev/wd1a       64319    49167     11936    80%    /
rivendell 510#

Architecture does not matter.  "Can we fix this please?"

				--*greywolf;
--
NetBSD: unshackling hardware designers and users from the bondage of WinTel.