[wellylug] Blocks count discrepancy fdisk & df
Centurion Computer Technology (2005) Ltd
daniel at centurion.net.nz
Mon Sep 10 11:26:03 NZST 2007
On Sat, 2007-09-08 at 11:33 +1200, Carl Turney wrote:
> Hi,
>
> I have a weird symptom on my system. Here are the fdisk and df reports.
> Take particular note of the massive difference between hda3 total blocks
> counts between the two, unlike for hda1 or hda2.
>
> fdisk says ...
>
> Disk /dev/hda: 80.0 GB, 80026361856 bytes
> 255 heads, 63 sectors/track, 9729 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this line defines what fdisk terms
as blocks. It appears to have cylinders containing 16065x 512 byte
blocks, so the raw partition block count is in units of 512 byte blocks.
> Device Boot Start End Blocks Id System
> /dev/hda1 * 1 13 104391 83 Linux
> /dev/hda2 14 138 1004062+ 82 Linux swap / Solaris
> /dev/hda3 139 9729 77039707+ 83 Linux
> df says ...
>
> Filesystem 1K-blocks Used Available Use% Mounted on
^^^^^^^ See here df uses a measure of 1K
(1024 byte blocks)
> /dev/hda3 37334192 20044920 15392800 57% /
> /dev/hda1 101086 13044 82823 14% /boot
> tmpfs 257980 0 257980 0% /dev/shm
You also need to take into account that fdisk is talking about raw
partition size, and df is talking about blocks available for use (raw
size less inode tables, and less any reserved (root use only) blocks, so
this amount of space will always be less than the raw partition size.
--
Daniel Reurich
Centurion Computer Technology (2005) Limited.
Ph: 021 797 722
More information about the wellylug
mailing list