misaligned ending sector, 4096-byte luks sector size can't be used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

cryptsetup-2.4.3-1.fc36.x86_64

On 512-byte logical sector size, 4096-byte physical sector size
drives, cryptsetup luksFormat uses a 4096-byte LUKS sector size except
when there's an unaligned last sector in a partition, i.e. the
partition ends within a 4096-byte physical sector. Unfortunately this
is pretty common due to the backup GPT, which makes the "last usable"
sector, unaligned. gdisk, fdisk, and parted can all run into this
problem. I can't really tell if this was ever considered by UEFI/GPT
spec writers. The backups GPT is 33 LBAs in size. So it's always
4096-byte unaligned.

All the sectors in the partition are 4096-byte aligned except the last
one. Therefore it seems suboptimal to fall back to 512-byte LUKS
sector size, or for luksFormat --sector-size 4096 to fail. Is there a
way for cryptsetup to just map out the dangling 1-7 512-byte sectors
at the end? They are useless anyway in this case, but the partitioning
tools aren't in a position to know the use case. The last 1-7 sectors
are legitimately individually addressable so it's not incorrect for
the partitioning tool to include them in the last partition on the
device.


-- 
Chris Murphy
_______________________________________________
dm-crypt mailing list -- dm-crypt@xxxxxxxx
To unsubscribe send an email to dm-crypt-leave@xxxxxxxx



[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux