[OmniOS-discuss] [zfs] SSD alignment, EFI label rpool support

Jim Klimov jimklimov at cos.ru
Thu Aug 1 21:13:41 UTC 2013


On 2013-08-01 22:27, Matthew Ahrens wrote:
> It's hard for me to see how aligning the partition on a greater
> granularity than the physical sector size (aka "ashift", typically 4k
> for modern large devices) would help anything.  Regardless of partition
> alignment, ZFS is going to write to whatever sectors it wants.

Well, it is my understanding (as detailed in another post) that the
partitioning tables (MBR/SMI, GPT/EFI) still count in 512-byte units
as the minimum size, over whatever hardware sector sizes.

So it is, on one hand, required to do all this accounting in finer
granularities than 4k sectors or 8k pages, and on another hand - it
is possible to make a mistake in all this. And the goal of alignment
is to not have ZFS block writes span incomplete hardware sectors.

One potential for errors, which may break ZFS whole-drive usage with
its default EFI label generation, is the alleged existence of 4k AF
drives with a DIP-switch or something like that which shifts the LBAs
by one legacy sector, so that the first partition which starts at LBA
sector number 63 would in fact start on a physical 4k sector boundary.
Apparently, this helps optimal usage of new hardware from old OSes
like Windows XP by default, which would format the disk with a 4k
clustered NTFS or FAT32 and use the hardware sectors wholly and well
aligned, to store their FS clusters, and not care or know about either
alignment or non-512b sector sizing.

My 2c,
//Jim Klimov



More information about the OmniOS-discuss mailing list