Subject: Re: Invalidcapacity value from df
To: None <tech-userlevel@netbsd.org>
From: Christos Zoulas <christos@tac.gw.com>
List: tech-userlevel
Date: 06/22/2005 14:31:48
In article <200506211136.35487.ianzag@megasignal.com>,
Ian Zagorskih <ianzag@megasignal.com> wrote:
>
>---cut---
># uname -a
>NetBSD MAKS 3.99.3 NetBSD 3.99.3 (CAN-104) #356: Mon May 30 14:08:12 NOVST
>2005 ianzag@IANZAG:/home/ianzag/NetBSD/kernel/CAN-104 i386
>
># dmesg | grep wd0
>
>wd0 at atabus1 drive 0: <Hitachi XX.V.3.3.0.0>
>wd0: drive supports 1-sector PIO transfers, LBA addressing
>wd0: 122 MB, 978 cyl, 8 head, 32 sec, 512 bytes/sect x 250368 sectors
>wd0: 32-bit data port
>wd0: drive supports PIO mode 4
>wd0(geodeide0:1:0): using PIO mode 4
>boot device: wd0
>
># disklabel wd0
>
># /dev/rwd0d:
>type: SCSI
>disk: mydisk
>label: MAKS
>flags: removable
>bytes/sector: 512
>sectors/track: 32
>tracks/cylinder: 64
>sectors/cylinder: 2048
>cylinders: 122
>total sectors: 250368
>rpm: 3600
>interleave: 1
>trackskew: 0
>cylinderskew: 0
>headswitch: 0 # microseconds
>track-to-track seek: 0 # microseconds
>drivedata: 0
>
>4 partitions:
># size offset fstype [fsize bsize cpg/sgs]
> a: 250368 0 4.2BSD 1024 8192 31296 # (Cyl. 0 -
>122*)
> c: 250368 0 unused 0 0 # (Cyl. 0 -
>122*)
> d: 250368 0 unused 0 0 # (Cyl. 0 -
>122*)
>
># df -m
>Filesystem 1M-blocks Used Avail Capacity
>Mounted on
>192.168.100.112:/var/project/maks 496 219 251 46% /
>mfs:30 3 0 3 2% /var
>/dev/wd0a 118 -3
>1163728266% /mnt
>mfs:63 1 0 1 0% /tmp
>---cut---
>
>/dev/wd0a capacity is nice :)
From the manual page of df:
Note that the printed count of available blocks takes minfree into
account, and thus will be negative when the number of free blocks on the
filesystem is less than minfree.
As far as the percentage being weird goes please file a PR, so that it
does not get lost.
christos