I have a LUKS device opened on top of a logical volume, and I'd like to do an online reencryption for the LUKS device.
I did cryptsetup reencrypt --active-name <LUKS2 device>, and it gives me This operation is not supported for this device type.
I searched the error message in cryptsetup gitlab repo, and I suspect the failure reason might be that USE_LUKS2_REENCRYPTION is undefined, but I couldn't find any place to enable the online reencrypt code.
Does anyone know if what I suspect is correct, or how to enable that macro? Thanks!
FWIW, I'm on cryptsetup 2.2.2, the device was encrypted with LUKS2, and the linux distro is Ubuntu 20.04.4.
I tried different ways to run the reencrypt command like using the logical volume name, but ended up with the same error.
I'm expecting this command to be passed.
You probably are using LUKS1, this function only works in LUKS2. Enable LUKS2 with this command
sudo cryptsetup convert --type luks2 /dev/mapper/disk9or whatever your disk is.