Partition does not end on cylinder boundary

JD jd1008 at gmail.com
Sun Jun 5 15:06:35 UTC 2011


On 06/05/11 03:49, Alan Cox wrote:
> 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
Right. Also, modern drives have variable sectors per track.
But the FS code still organizes disk blocks into cylinder
groups. Even though these cylinder groups are virtual (i.e.
just the FS driver's way of organizing the disk blocks, it
has remained within the FS code for various reasons, such
as distributing the inodes  to be interspersed over the disk
to reduce head movement, and to allocate new blocks as close
to the file's or dir's inode as possible. So, even if the a disk cylinder
is now a virtual thing, it still helps in organizing the disk
blocks into a manageable collection.
Perhaps someone will write a new FS that will completely
get away from blocks and cylinders.



More information about the users mailing list