You can separately create a pay-as-you-go disk and attach the disk to an Elastic Compute Service (ECS) instance as a data disk.
Prerequisites
- The disk resides within the same zone as the instance to which you want to attach the disk.
- The instance is in the Running (Running) or Stopped (Stopped) state, instead of the Locked (Locked) state.
- The disk is in the Unattached (Available) state.
- You have no overdue payments within your Alibaba Cloud account.
- The Cloud Assistant client is installed on the instance, so that you can partition the disk in the ECS console after the disk is attached. For more information, see Install the Cloud Assistant client.
Precautions
Before you attach a disk, take note of the following items:
- Disks that are created along with instances and subscription data disks that are created for subscription instances are automatically attached to the corresponding instances.
- A maximum of 64 data disks can be attached to an ECS instance. The maximum number
of disks that can be attached to an instance varies with instance types. For more
information, see Overview of instance families.
Note You can attach one system disk and a maximum of 16 data disks to an instance when you create the instance. If the instance requires more data disks, attach more data disks after the instance is created. The number of disks that can be attached to an instance is determined by the instance type. You can call the DescribeInstanceTypes operation to query the number of disks that are supported by an instance type.
- Disks that do not support the multi-attach feature or disks for which the multi-attach feature is disabled can be attached only to a single instance at the same time. Disks that support the multi-attach feature can be attached to multiple instances at the same time. For more information, see NVMe disks.
Note The attach operation refers to the process of attaching disks to ECS instances in
the ECS console, instead of mounting file systems in the operating systems of ECS
instances by running the
mount
command. For information about how to format data disks and mount file systems, see
Partition and format a data disk on a Linux instance and Partition and format a data disk on a Windows instance.
Attach a data disk
This section describes how to attach a data disk on the Instances page. You can also choose Actions column to attach the disk to an ECS instance.
in the left-side navigation pane. Find the disk that you want to attach and choose in the