Re: SSD dm-crypt partition alignment

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

 



Seems some confusion here, in short:

Data alignment:

- default cryptsetup <= 1.1.3 (LUKS data offset) alignment is 4k

- cryptsetup 1.1.3 understand topology info provided by kernel,
if storage (SSD) announces proper values, it is properly aligned
(kernel with topology ioctl support required)

- devel version (next cryptsetup, change in svn already) will use default alignment
to 1MiB (if 1 MiB is multiple of topology alignment, it remains 1MiB; otherwise
it is aligned according to topology info - useful for nonstandard RAID devices)

Aligning to 1MiB is now trend in storage technology and it is safe default
for most of these configs (I'll describe reasons in release notes).

If you want align LUKS even in old version or use explicit value
add to luksFormat --align-payload=2048
(in 512B sectors - here aligns to 1MiB boundary)

(in most cases it cause encrypted data offset to start on sector 4096)

All basic storage tools should now align to optimal values by default
(like fdisk/lvm2/cryptsetup/mdadm etc) - in recent versions.
So the whole storage stack should not suffer from possible misalignment.


TRIM:
(nothing to do with alignment above, this is also kernel-only thing)

- device-mapper in 2.6.36 have support for TRIM/discard except dm-crypt target.

dm-crypt ignores it, later we probably add some optional support,
but default will be always ignore trim/discard for security reasons.

Milan
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt


[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