On 2015-10-06, Theo de Raadt <dera...@cvs.openbsd.org> wrote:
>> Wait, sorry - so the disklabel tool says that the c partition starts at
>> offset 0 , that's logical indeed as data always starts at offset 0.
>> 
>> By some reason, the disklabel tool however doesn't want partitions on the
>> first 64 sectors (console dump below), i.e. on the first 32KB (why?).
>
> Modern disks are showing up with sector sizes > 512 bytes.  This is an
> alignment strategy, to future proof things.

Flash memory in particular has large erase blocks (it's not possible to
erase less than this amount in one go, so to modify data on the device
involves read+erase+write of often as much as 256-512K.

The larger alignment increases the chance of filesystem blocks aligning
with these (if a filesystem block spans over two erase blocks, that's
a lot of extra data to erase+rewrite when you might only be making a
very small change).

Some OS are going further than 64x 512-byte sectors in their default
partition alignment - 2048 (1MB) seems pretty common now. This isn't
likely to be noticeable on decent SSDs which have a lot more software
in the way of access to the flash media, it's more likely to be seen
on the relatively simple media like cheap CF/SD cards/USB sticks.

https://en.wikipedia.org/wiki/Flash_memory

http://electronics.stackexchange.com/questions/125228/why-does-nand-erase-only-at-block-level-and-not-page-level

Reply via email to