I've already read this SE question, but it's somewhat old now. How can I reencrypt a LUKS partition using a different master key? I have a cloned VM image that needs to go into production, but it's obviously using the original VM's master key. When I install cryptsetup-reencrypt, I see a scary message:

[root@server ~]# cryptsetup-reencrypt /dev/xvdd1

WARNING: this is experimental code, it can completely break your data.

  • 2
    Since you're making a copy anyway, why not use cryptsetup-reencrypt? If it crashes, you can just throw the broken copy away and make a new one. – Gilles 'SO- stop being evil' May 23 '16 at 23:25
  • Just make sure the device is not in use and don't reboot the machine until it's done. You're operating in-place on your only copy of data, that's always dangerous no matter what you do. – frostschutz May 23 '16 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.