You can resize a system disk or data disk to extend its capacity. If your Linux or Windows Elastic Compute Service (ECS) instance does not support online resizing of disks, you can resize the disks of the instance offline. After you resize a disk of an instance offline, you must restart the instance for the change to take effect. The restart operation temporarily interrupts services that run on the instance. We recommend that you resize disks offline during off-peak hours.

Prerequisites

The requirements described in the following table must be met before you can resize a disk offline for an ECS instance.
Resource Requirement
Instance The instance is in the Running or Stopped state.
Disk
  • The disk is in the In Use state.
  • The disk is an enhanced SSD (ESSD), a standard SSD, or an ultra disk.
  • After you renew a subscription instance and downgrade its configurations, the subscription disks of the instance cannot be resized for the remainder of the current billing cycle.

Step 1: Create a snapshot

Before you resize a disk online, you must create a snapshot for the disk to back up the data stored on the disk.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. On the Instances page, find the instance whose disk you want to resize and click the instance ID.
  5. On the Instance Details page, click the Cloud Disk tab.
  6. Find the disk that you want to resize and click Create Snapshot in the Actions column.
  7. In the Create Disk Snapshot dialog box, configure the parameters and then click OK.
    For more information, see Create a snapshot of a disk.
  8. Click the Snapshot tab to view the snapshot.
    After the snapshot is created, 100% appears in the Progress column. Then, you can proceed to perform subsequent operations.

Step 2: Resize the disk and start or restart the instance in the ECS console

Resize disks

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. On the Instances page, find the instance whose disk you want to resize and click the instance ID.
  5. On the Instance Details page, click the Cloud Disk tab.
  6. Find the disk that you want to resize. Then, in the Actions column corresponding to the disk, choose More > Resize.
    To batch resize disks, log on to the ECS console by using your Alibaba Cloud account and choose Storage & Snapshots > Disks in the left-side navigation pane. On the Disks page, select the disks that you want to resize and click Resize in the lower part of the page. Disks that are attached to the same instance cannot be resized together.
    Note Alibaba Cloud accounts are permitted to batch resize disks, but RAM users are not. To batch resize disks, log on to the ECS console by using your Alibaba Cloud account.
  7. On the Resize Disks page, set the Size after Resize parameter.
    The specified value of Size after Resize must be greater than the current disk capacity.
  8. Verify the price, read and select ECS Service Terms, and then click Confirm.
  9. Read the notes, click I have read the notes. Resize, and then complete the payment.

Start or restart the instance in the ECS console

To restart the instance in the ECS console, perform the following steps:
Note
  • If your instance is in the Running state, you must restart the instance in the ECS console. If your instance is in the Stopped state, you must start the instance in the ECS console.
  • The disk resizing operation takes effect only after you start or restart the instance by using the ECS console or by calling the RebootInstance operation. If you restart the instance from within the operating system, the disk resizing operation does not take effect.
  • The offline disk resizing operation takes effect only after you start or restart the instance. If you have resized a disk offline but cannot start or restart the instance due to your business requirements, you can resize the disk online again to make the offline resizing operation take effect when the instance is in the Running state. You are charged for resizing the disk online. You must resize the disk based on your business requirements. For more information, see What do I do if I have resized a disk offline but do not want to restart the instance?.
  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. Find the instance that you want to restart. Then, in the Actions column corresponding to the instance, choose More > Instance Status > Restart.
  5. In the Restart dialog box, select a restart method and click OK.

What to do next

After a disk is resized offline for an instance, you must continue to resize the partitions and file systems of the disk within the instance. The resizing method varies with the operating system that runs on the instance.