How to Enable LUKS Encryption for Cinder Volumes?
Problem
How to implement LUKS encryption for Cinder volume backends to enhance data security by encrypting storage volumes at rest.. This ensures that sensitive data remains protected, even if the underlying storage devices are compromised.
Environment
Private Cloud Director Virtualisation - v2025.4 and Higher.
Self-Hosted Private Cloud Director Virtualisation – v2025.4 and Higher.
Component - Storage (Cinder, Barbican, LVM)
Procedure
Ensure Barbican is running and integrated with Keystone:
$ openstack service list | grep barbican | [service-uuid] | barbican | key-manager |Create an Encryption Key in Barbican.
$ openstack secret store \ --name luks-key \ --payload-content-type 'application/octet-stream' \ --payload-content-encoding base64 \ --payload "$(openssl rand -base64 32)" ## Sample Output +---------------+------------------------------------------------------+ | Field | Value | +---------------+------------------------------------------------------+ | Secret href | https://[PCD_FQDN]/barbican/v1/secrets/[secret-id] | | Name | luks-key | | Created | None | | Status | None | | Content types | {'default': 'application/octet-stream'} | | Algorithm | aes | | Bit length | 256 | | Secret type | opaque | | Mode | cbc | | Expiration | None | +---------------+------------------------------------------------------+Create an Encrypted Volume Type
$ openstack volume type create luks-encrypted +-------------+--------------------------------------+ | Field | Value | +-------------+--------------------------------------+ | description | None | | id | [Volume-Type-Id] | | is_public | True | | name | luks-encrypted | +-------------+--------------------------------------+
Associate Encryption with the Volume Type
Confirm volume type and secret:
On the PCD GUI Select Cluster blueprint Edit desired volume add below properties save the blueprint.
Configure the key manager in the
/opt/pf9/etc/pf9-cindervolume-base/conf.d/cinder.confon all cinder hosts.After the above changes, restart the
pf9-cindervolume-baseservice on all cinder hosts.Confirm whether the following highlighted configurations are present in the
/opt/pf9/etc/pf9-cindervolume-base/conf.d/cinder.conffile:Create Encrypted volume.
Confirm the Encryption status of the volume.
Last updated
