Partition does not end on cylinder boundary

Alan Cox alan at lxorguk.ukuu.org.uk
Sun Jun 5 10:49:48 UTC 2011


On Sat, 04 Jun 2011 12:50:12 +0100
Timothy Murphy <gayleard at eircom.net> wrote:

> Does this matter?
> If so, what can you do about it?
> I get it after partitioning with fdisk,
> choosing partitions of size 50GB, etc.
> 
> Is it really better to give the block count?

Traditional boot loader stuff and BIOS depends on cylinder counts but
modern systems don't really care so it's no longer that important. It's
probably a good idea to keep any bootable partition cylinder aligned just
in case.
 
> Incidentally, I notice that lshal takes a block as 512B,
> while fdisk has 1kB blocks.

The physical block size of a traditional hard disk is 512 bytes and each
block is fixed that size. 

The block size used by ext2/3 is usually 1K or 4K and maps to a set of
adjacent hard disk blocks.

Various tools report 1K blocks.

In truth it's even more complicated than that nowdays

Firstly - drives haven't truely had a heads/cylinders/sectors geometry
model for years, they fake a geometry for compatibility with old OS.

Seocndly the physical block size of many modern drives is 4K or so and
they fake 512 byte sectors. The OS partitioning tools also try to align
things on the boundary of a 'real' sector so that a 4K linux ext3 block
maps to a real 4K disk block in order to get the best performance.

Alan


More information about the users mailing list