[OpenIndiana-discuss] 3 TB 4k USB disk woes (bug!)

Jim Klimov jimklimov at cos.ru
Wed Feb 13 01:28:39 UTC 2013


On 2013-02-13 01:28, Reginald Beardsley wrote:
> I have just verified by experiment that the reason OI 151a7 cannot read s0 as outlined below is because dd is looking for the EFI label based on 512 byte sectors.  So format(1m) is labeling the disk based on 4k sectors whereas some part of the OS is treating it as 512 bytes. I'd expect both accesses to go through the sd driver, so I'm quite perplexed how this can happen.
>
> What I did was copy the EFI label information from absolute disk offset 0x1000 to 0x200 and from 0x2000 to 0x400. (I *think*  I got the explanation right).
>
> Obviously this is a bug, but where is a bit more challenging. Does anyone have any suggestions about how to document this properly?


I think the formatting offsets are defined in bytes, however
many sectors of certain size that would amount to. The notion
of a 512-byte block as the sector size is historically prevalent,
and that's what such blocks may be called in code (for example,
even though ZFS can use sectors of different size via ashift,
its minimum unit is 512b as can be seen in some variables which
count by units...) but I think that any formatting tool which
goes on to assume HW sector size as a unit for formatting offset
in common formats is un-interoperable and heretic in its reading
of de-facto or de-jure standards :) And a bug it seems :)

However, citing ZFS again, it does (within its realm of control)
rely on HW sector size in the disk labels - storing about 128 or
just 32 labels (also used for TXG rollback) in the given fixed
size space. Fixed in bytes :)

//Jim




More information about the OpenIndiana-discuss mailing list