Is it supported to add LUKS encryption to not yet encrypted device?

Solution In Progress - Updated -

Issue

  • Is it supported to add LUKS encryption to not yet encrypted device?
  • How to add LUKS encryption to not yet encrypted device.
  • Can existing devices be encrypted (LUKS) and retain the data?

    • When I try to encrypt an unencrypted, but currently in-use device, I get the message below indicating I will lose all existing data. Is there not a way to use LUKS so that it does not delete the data?

      # cryptsetup ...
      WARNING: Device /dev/sdN already contains a ... signature.
      
      WARNING!
      ========
      This will overwrite data on /dev/sdN irrevocably.
      
      Are you sure? (Type 'yes' in capital letters):
      

Environment

  • Red Hat Enterprise Linux (RHEL) 9
  • Red Hat Enterprise Linux (RHEL) 8
  • Red Hat Enterprise Linux (RHEL) 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content