With Cinder multi-attach, you can simultaneously attach volumes to multiple instances.

Prerequisites

If you want to use multi-attach volumes, be aware of the following limitations:

  • Hardware acceleration is required for NFS datastores that back multi-attach volumes.
  • Multi-attach volumes cannot be relocated while they are in use. To avoid the effects of this limitation, create multi-attach volumes on a shared datastore.

    You can specify datastores for multi-attach volumes by using a storage profile. Create the desired storage profile in vSphere and assign it to the volume type defined in this procedure using the vmware:storage_profile extra spec.

  • Multi-attach volumes must use thick provision eager zeroed as the provisioning format.
  • Multi-attach volumes must use VMDK as the back-end driver. FCD volumes do not support multi-attach.
  • To prevent data corruption, format multi-attach volumes with a cluster-aware file system.
  • You cannot clone, back up, or take snapshots of multi-attach volumes while those volumes are attached.
  • If more than eight ESXi hosts attempt to access a single multi-attach volume simulaneously, attaching the volume will fail.
  • You cannot perform live migration on an instance to which a multi-attach volume is attached.
  • The viocli prepare datastore command does not support multi-attach volumes. Detach multi-attach volumes before migrating them to another datastore.

Procedure

  1. Create a new volume type or choose an existing volume type to use for multi-attach.
    For instructions, see Create a Volume Type.
  2. Select View Extra Specs next to the volume type that you want to use.
  3. Click Create.
  4. In the Key field, enter multiattach.
  5. In the Value field, enter <is> True.
  6. Click Create.
  7. On the Volume Type Extra Specs page, click Create.
  8. In the Key field, enter vmware:vmdk_type.
  9. In the Value field, enter eagerZeroedThick.
  10. Click Create.
  11. (Optional) Specify a storage profile to ensure that multi-attach volumes are created on supported datastores.
    1. On the Volume Type Extra Specs page, click Create.
    2. In the Key field, enter vmware:storage_profile.
    3. In the Value field, enter the name of the desired storage profile.
    4. Click Create.

Results

A multi-attach-capable volume type is created. To create multi-attach volumes, select this volume type when creating or retyping volumes. Note that retyping a volume to enable or disable multi-attach is only supported when the volume is unattached.