3.4. Configuring multi-attach Block Storage volumes
To attach a Block Storage (cinder) volume to multiple instances at the same time, you must create this volume from or retype this volume to a multi-attach volume type. These multiple instances can then simultaneously read data from and write data to this volume.
You must use a multi-attach or cluster-aware file system to manage write operations from multiple instances. Failure to do so causes data corruption.
For example, you can create a multi-attach volume on a NFS back end and then attach this volume to multiple instances that can use this volume as shared storage.
- Limitations of multi-attach volumes
-
Your Block Storage (cinder) back-end driver must support multi-attach volumes. The Ceph RBD driver is supported. Contact Red Hat support to verify that the
multiattachvolume property is supported by your vendor plugin. For more information about the certification of your vendor plugin, see https://catalog.redhat.com/search?searchType=software&target_platforms=Red%20Hat%20OpenStack%20Platform&p=1&subcategories=Storage. - When you attach a multi-attach volume, some hypervisors require special considerations, such as when you disable caching.
- Read-only multi-attach volumes are not supported.
- You can live migrate an instance that has a multi-attached volume, but you cannot live migrate multi-attach volumes.
- Encryption of multi-attach volumes is not supported.
- Multi-attach volumes are not supported by the Bare Metal Provisioning service (ironic) virt driver. Multi-attach volumes are supported by only the libvirt virt driver.
-
When a volume is not in use and its status is
available, you can retype this volume to be multi-attach capable or retype a multi-attach capable volume to make it incapable of attaching to multiple instances. - You can create bootable volumes with multi-attach enabled, but you cannot attach the same bootable volume to multiple instances.
- You cannot retype an attached volume from a multi-attach type to a non-multi-attach type, or from a non-multi-attach type to a multi-attach type.
- You cannot use multi-attach volumes that have multiple read write attachments as the source or destination volume during an attached volume migration.
- You cannot attach multi-attach volumes to shelved offloaded instances.
- Simultaneous API calls, such as create or resize, to instances attached to the same multi-attach volume can fail. For more information, see https://access.redhat.com/solutions/7077470.
-
Your Block Storage (cinder) back-end driver must support multi-attach volumes. The Ceph RBD driver is supported. Contact Red Hat support to verify that the
Prerequisites
- You must be a project administrator to create multi-attach volume types.
Procedure
Access the remote shell for the
openstackclientpod from your workstation:$ oc rsh -n openstack openstackclientCreate a multi-attach volume type:
$ openstack volume type create --property multiattach="<is> True" <multi-attach_volume_type_name>-
Replace
<multi-attach_volume_type_name>with the name of your multi-attach volume type.
-
Replace
Exit the
openstackclientpod:$ exit
Next steps
Create a volume from your multi-attach volume type and attach this volume to multiple instances.