Updated on 2022-02-21 GMT+08:00

Managing a Shared Disk

How to Use Shared VBD and SCSI Disks?

You can create shared VBD disks or shared SCSI disks. It is recommended that you attach the shared disk to the ECSs in the same ECS group to improve service reliability.
  • Shared VBD disks: The device type of a newly created shared disk is VBD by default. Such disks can be used as virtual block storage devices, but do not support SCSI reservations. If SCSI reservations are required for your applications, create shared SCSI disks.
  • Shared SCSI disks: These disks support SCSI reservations.
    • To improve data security, you are advised to use SCSI reservations together with the anti-affinity policy of an ECS group. That said, ensure that shared SCSI disk is only attached to ECSs in the same anti-affinity ECS group.
    • If an ECS does not belong to any anti-affinity ECS group, you are advised not to attach shared SCSI disks to this ECS. Otherwise, SCSI reservations may not work properly, which may put your data at risk.

    Concepts of the anti-affinity ECS group and SCSI reservations:

    • The anti-affinity policy of an ECS group allows ECSs to be created on different physical servers to improve service reliability.

      For details about ECS groups, see Managing ECS Groups in the Elastic Cloud Server User Guide.

    • The SCSI reservation mechanism uses a SCSI reservation command to perform SCSI reservation operations. If an ECS sends such a command to a disk, the disk is displayed as locked to other ECSs, preventing the data damage that may be caused by simultaneous read/write operations to the disk from multiple ECSs.
    • ECS groups and SCSI reservations have the following relationship: A SCSI reservation on a disk cannot differentiate multiple ECSs on the same physical host. For that reason, if multiple ECSs that use the same shared disk are running on the same physical host, SCSI reservations will not work properly. Therefore, you are advised to use SCSI reservations only on ECSs that are in the same ECS group, thus having a working anti-affinity policy.

Attaching a Shared Disk

A common disk can only be attached to one server, whereas a shared disk can be attached to up to 16 servers.

For details about how to attach a shared disk, see Attaching a Shared Disk.

Deleting a Shared Disk

Because a shared disk can be attached to multiple servers, ensure that a shared disk is detached from all the servers before deletion.

For details about how to delete a shared disk, see Deleting a Disk.

Expanding a Shared Disk

Shared disks must be expanded when they are in the Available state. For details, see Expanding an Available Disk.