When system disks or data disks do not have sufficient available storage space, you can resize the disks in the Elastic Compute Service (ECS) console to extend their capacity. This topic describes how to resize a disk online or offline. After you resize a disk online, you do not need to restart the associated instance for the new disk size to take effect. After you resize a disk offline, you must restart the associated instance for the new disk size to take effect.
Prerequisites
The instance to which the disk that you want to resize is attached meets the following requirements:
If you want to resize the disk online, the instance is in the Running state.
If you want to resize the disk offline, the instance is in the Running or Stopped state.
The disk that you want to resize meets the following requirements:
The disk is in the In Use (In_use) or Unattached (Available) state.
No snapshot is being created for the disk. If a snapshot is being created for the disk, wait until the snapshot is created before you resize the disk.
If the disk is a new data disk, the disk is initialized. For more information, see Overview.
The disk that you want to resize is a cloud disk or an elastic ephemeral disk.
Local disks do not support disk resizing. Do not resize local disks. If you resize a local disk, the partition table and file system structure on the disk may be corrupted, which affects business continuity.
Step 1: Resize a disk to extend the capacity of the disk
Go to ECS console - Block Storage.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
Find the cloud disk that you want to resize and perform one of the following operations based on the disk or instance status:
If the disk is attached to an instance that is in the Running state, click Resize in the Actions column.
If the disk is in the Unattached state or the disk is attached to an instance that is in the Stopped state, choose in the Actions column.
You can also select multiple disks and click Resize in the lower part of the cloud disk list to batch resize the disks.
(Recommended) After you verify information about the disk that you want to resize, click create snapshots. In the dialog box that appears, configure snapshot parameters and click OK. For information about the parameters, see Create a snapshot.
Important
To prevent data loss caused by accidental operations during the resizing process, we recommend that you create a snapshot for the disk to back up disk data before you resize the disk. You are charged for snapshots. For information about the billing of snapshots, see Snapshots.


Refresh the Resize Cloud Disk page. After Yes is displayed in the Resizing Supported column, click I Understand Risks and Have Backed Up Data. Proceed.. 
In the Configure Resizing Method and New Size step, configure the parameters.
①: Configure the New Disk Size parameter. The value cannot be smaller than the current disk size.
②: Configure the Resizing Method parameter. Valid values:
Online Resizing: After you resize a disk attached to an instance online, the new disk size immediately takes effect without the need to restart the instance.
Note
If the business deployed on an instance does not allow instance restarts, select Online Resizing to resize the disk.
Offline Resizing: After you resize a disk attached to an instance offline, you must restart the instance in the ECS console or by calling an API operation for the new disk size to take effect. The new disk size does not take effect if you run the reboot
command in the instance to restart the instance. For more information, see Restart an instance.
Note
The offline resizing method is suitable for the following scenarios:
If an instance is in the Stopped state or the instance type does not support the online resizing of disks, you can resize the disks attached to the instance only offline. For information about the instance types that do not support the online resizing of disks, see the Which instance types do not support the online resizing of disks? question in the "FAQ" section of this topic.
If a disk is in the Unattached state, you can resize the disk only offline.
If an instance is a Windows instance on which a virtio driver of a version earlier than 58011 is installed, select Offline Resizing. If you select Online Resizing to resize a disk on the Windows instance, the resize operation does not take effect. Before you can resize a disk on the Windows instance online, update the virtio driver version. For information about how to view and update the virtio driver version, see Update the Red Hat virtio driver on a Windows instance.
③: In the lower-left corner of the Resize Cloud Disk page, confirm the price and click OK.
In the Confirm Resizing Results step, confirm that Successful is displayed in the Resizing Result column.
Step 2: Extend the partitions and file systems on the disk
To allow the system to use the increased capacity of the disk, you must extend the partitions and file systems on the disk.
Click Next Step: Extend Partitions and File Systems in the lower-left corner of the Resize Cloud Disk page.
If you resized the disk offline, perform one of the following operations based on the disk status before you perform subsequent operations.
Disk status | Operation |
Unattached | Attach the disk to an ECS instance before you extend the partitions and file systems on the disk. For more information, see Attach a data disk and Step 2: Resize partitions and file systems. |
In Use | Click Restart Instance. Wait for the instructions to extend the partitions and file systems of the disk to appear on the following page.  |
(Conditionally required) If no file system is mounted on your disk, configure mount points. Enter an existing directory that has no data or a new directory as a mount point and click Manually Mount in the Actions column. After the file systems of the disk are mounted, wait for the instructions to extend the partitions and file systems of the disk to appear.

Click Run Preceding Command in the lower part of the Command Content section to extend the partitions and file systems.
In the Send Remote Commands dialog box, click Run. The system runs the command on the instance to extend the partitions and file systems of the disk. If Success is displayed in the lower part of the Command Output section, the partitions and file systems of the disk are extended.
FAQs
What do I do if I resized a disk offline but do not want to restart the associated instance?
The offline resize operation takes effect only after you start or restart the associated instance. If you resized a disk offline but you cannot start or restart the instance due to your business requirements, you can resize the disk online by 1 GiB to make the offline resize operation and the 1 GiB of new capacity take effect. The preceding method requires an additional online resize operation. You are charged for the additional new capacity. Determine whether to perform an additional resize operation based on your business requirements.
For example, you resize a disk to 60 GiB offline in the ECS console, but you do not want to restart the associated instance. The offline resize operation does not take effect. You can resize the disk online in the ECS console. For example, you can resize the disk to 61 GiB online. After you resize the disk online, the disk capacity is increased to 61 GiB in the operating system.
What do I do if the resize operation does not take effect on a disk for which the multi-attach feature is enabled?
To ensure that the instance to which a disk for which the multi-attach feature is enabled is attached can recognize the new capacity of the disk, we recommend that you perform the following steps after the disk is resized:
Detach the disk. For more information, see Detach a data disk.
Re-attach the disk. For more information, see Attach a data disk.
(Conditionally required) If the new disk size is still not recognized by specific instances after you re-attach the disk, we recommend that you restart the instances to which is disk is attached. For more information, see Restart an instance.
For information about the multi-attach feature, see Multi-attach for cloud disks.
Which instance types do not support the online resizing of disks?
The following instance types do not support the online resizing of disks:
ecs.ebmc4.8xlarge
ecs.ebmhfg5.2xlarge
ecs.ebmg5.24xlarge
ecs.t1
ecs.s1
ecs.s2
ecs.s3
ecs.c1
ecs.c2
ecs.m1
ecs.m2