You are not logged in.
Did a quick search but came up empty handed.
I'm wondering if there is anything special that needs to be passed to be able to use dm-crypt (cryptsetup) with 4096 byte sector drives.
I know md, lvm, partitions, filesystems all need to have special triggers for 4K drives (even thouh I think it's done automatically for all of them nowadays) but I see no mention of cryptsetup.
Offline
Asked this question in the dm-crypt mailinglist and this is the reply I got
Do not worry. Dm-crypt uses 512B sectors, but there is only a
negligible performance loss. This matters far, far more on the
filesystem layer. If that layer does it right, dm-crypt will
allways process 8 x 512B at a time, as it does process exacly
what the uppeer layer requests. And alignment in LUKS is done
so that 4k sectors will not be broken up for the data area.
and this has been added to their FAQ section 2.17 http://code.google.com/p/cryptsetup/wik … s#2._Setup
Offline
You don't have to do anything special if your cryptsetup version is recent enough.
cryptsetup luksDump should print Payload offset 4096, that makes the data MiB aligned. Older versions of cryptsetup used to align differently (2056 or something which is 1MiB + 4k, which may not be optimal for SSD).
Of course, everything else (partitions, md, lvm, filesystems, etc.) has to be aligned as well; recent versions of mdadm also go for MiB alignment, so in a current install, you should not have to worry as long as you do not mess up the partitioning.
Last edited by frostschutz (2014-01-19 21:29:53)
Offline
As far as I know, I think LVM is the only one where you still have to ensure proper alignment manually. Though it has been several months since I have used it, so maybe this has changed as well.
Offline
LVM: pvs -o +pe_start,vg_extent_size should show 1.00MiB (or multiple thereof) for 1st PE, and 4.00MiB (or multiple of 1MiB, usually something in the 4-128MiB range) for Ext.
Offline