Configurable sector size for crypt device? #101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm running into an issue with some NVMe devices with a logical block size of 512 bytes and a physical block size of 4096 bytes.
Since cryptsetup 2.4.0
luksFormatwill automatically detect the optimal encryption sector size. For me, this will result in a 4096 bytes sector size, which would be fine, but I'm trying to use the server as a host for virtual machines, which must use 512 bytes (see https://github.com/ganeti/instance-debootstrap/pull/2 for some more details).Setting the encryption sector size with
--sector-size=512passed to cryptsetup, will set the logical block size to 512 bytesIt's also possible to change the sector size by running
cryptsetup reencrypt --sector-size=512 /dev/md1without data being lost. After a reboot, such a device looks like thisI'm happy to send in a PR, which adds a new config option to make this configurable, to avoid running
cryptsetup reencryptas this might take a lot of time.@saz hi!
I'm afraid I cannot help you here anymore, but glad to see you here as well!