Decrypting a Disk Using the CLI

The following procedure explains how to decrypt a disk and remove it from KeyControl. If you want to remove the disk but you don't care about the contents of the disk, see Removing a Disk from KeyControl.

The following procedure applies to all types of Windows disks and to Linux data disks. You cannot, however, decrypt a Linux system device (such as /root, /swap, or /home) using this procedure. Instead, use the htroot decrypt command as described in Decrypting a Linux System Device.

Before You Begin 

You cannot decrypt a disk if it has an Access Control Policy associated with it. Make sure that no such policy association exists before you decrypt the disk. For details, see Viewing the Access Control Status for a Disk.

Procedure 

  1. For Linux, log into the VM as root. For Windows, log in as a System Administrator and open a Command Prompt or start Windows PowerShell.
  2. If this is a Linux system and you have not enabled Online Encryption for this VM, unmount the disk you want to decrypt. For more information about enabling Online Encryption, see Linux Online Encryption Prerequisites and Considerations.
  3. Enter the hcl decrypt [-s] [-y] diskname command, where:

    DataControl decrypts the disk and unregisters it with KeyControl. Any keys associated with the disk are deleted.

    For Linux, you can now mount the disk in the standard manner and access its contents in plain text. For Windows, all drives and folder mounts are immediately accessible in plain text.

    For example:

    # hcl decrypt -s sdb1
    
    All the data on /dev/mapper/clear_sdb1 will be decrypted
    The clear text data will be available on /dev/sdb1
    This operation may take long time
    Do you want to proceed? (y/n) y
    total device size 1044193 KB
    Processing: 100% 	Time left: 00:00:00
    Completed decryption of sdb1 successfully
    Removed device sdb1