Rekeying a Linux System Device

If you encrypted a Linux system device (such as /root, swap, or /home) with the htroot encrypt command, you need to rekey that system device with the htroot rekey command.

Important: This procedure applies to Linux system devices only. If you want to rekey a Linux data drive, see Rekeying a Disk Using the webGUI or Rekeying a Disk using the CLI. If you use this procedure to rekey a data drive, DataControl will treat the data drive as a system device and all future rekey tasks will require you to reboot the device.

During this procedure, the VM will need to be rebooted to start the rekey process. If you have enabled Online Encryption for this VM, the VM will come back online immediately and the Policy Agent will rekey the system devices as a background process. In this case, users can continue to access the data while it is being rekeyed.

If Online Encryption is not enabled, the VM will remain inaccessible for normal operations until the rekey process completes.

For more information about Online Encryption, see Linux Online Encryption Prerequisites and Considerations.

Procedure 

  1. Log into the VM as root.
  2. If you want to check the available disks on this VM, enter the hcl status command. The Registered Devices section shows all devices that have been encrypted on the VM, with the short form of the disk name in the first column. You will need this short name in order to rekey the device.

  3. Enter the htroot rekey <diskname1,diskname2,... | -a> command, where each diskname is the short form of the disk name. (For example, sda2 instead of /dev/sda2.) To specify multiple disks, use a comma-seperated list. To rekey all availabl e system devices, specify -a instead of a list of disk names. (If you specify -a, DataControl only rekeys the system devices. It does not rekey the data devices.)

    For example:

    # htroot rekey sda2,sda3
    
    Setting up system for root device rekey.
    This operation may take a long time
    
    Do you want to proceed? (y/N) y
    The system has been updated to rekey the Linux root device/s during next boot; please reboot the system now
    Do you want to reboot the system now? (y/N) y
  4. Confirm the server reboot to continue. When the server has rebooted, it authenticates itself with KeyControl to get the required encryption keys and then starts the rekey process. The time required to rekey the devices depends on their size and the type of storage you have.

    • If you have enabled Online Encryption for this VM, the VM reboots immediately and the Policy Agent rekeys the devices as a background process. In this case, you can check the rekey status at any time using the hcl status command.
    • If Online Encryption is not enabled, the VM remains offline until the rekey process completes. In this case, you can see the rekey progress on the VM console through vSphere, Azure, or AWS.