How does FreeBSD calculate disk sizes
wash at wananchi.com
Mon Nov 3 01:07:23 PST 2003
I have a disk which is actually 72GB. 2GB has been used as swap while
the rest was given to /.
Can someone explain to me what I could be missing here, because what
I am seeing isn't what I expect. Perhaps it's just right while I am
the dumb one. Why isn't the whole size reported?
sucks# uname -nmr
sucks.wananchi.com 5.1-RELEASE-p10 i386
sucks# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 64G 1.8G 57G 3% /
devfs 1.0K 1.0K 0B 100% /dev
Here is what the partition editor shows:
Disk name: da0 FDISK Partition Editor
DISK Geometry: 8855 cyls/255 heads/63 sectors = 142255575 sectors (69460MB)
Offset Size(ST) End Name PType Desc Subtype Flags
0 63 62 - 12 unused 0
63 142255512 142255574 da0s1 8 freebsd 165
142255575 8425 142263999 - 12 unused 0
And disklabel shows this:
sucks# disklabel -n da0s1a
# size offset fstype [fsize bsize bps/cpg]
a: 138255512 63 4.2BSD 2048 16384 28552
b: 4000000 138255575 swap
c: 142255512 63 unused 0 0 # "raw" part, don't edit
partition a: partition extends past end of unit
partition b: offset past end of unit
partition b: partition extends past end of unit
partition c: partition extends past end of unit
disklabel: partition c doesn't start at 0!
disklabel: partition c doesn't cover the whole unit!
disklabel: An incorrect partition c may cause problems for standard system utilities
Some expert explanation would help clear my ignorance!
|\ _,,,---,,_ | Odhiambo Washington <wash at wananchi.com>
Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com
|,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922
'---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121
World War Three can be averted by adherence to a strictly enforced
More information about the freebsd-questions