ansible-debootstrap
ansible-debootstrap copied to clipboard
Round down LUKS partition to luks-sector-size boundary
device mapper has issues when the partition size doesn't divide cleanly by luks-sector-size. This is not an issue with devices that report a native sector size of 4KiB, but may be an issue otherwise. The partition size can be rounded down to eh 4KiB boundary so this problem does not occur - there probably needs to be some wiggle room for other data structures as well.
The error one sees with this is: device-mapper: reload ioctl on failed: Invalid argument
And in the kernel log:
device-mapper: table: 253:2: crypt: Device size is not multiple of sector_size feature
device-mapper: ioctl: error adding target to table