EBS volumes are scalable storage devices. You can expand the capacity of an existing EBS volume at any time to increase its storage space without affecting the data on the EBS volume.
After you expand the capacity of an EBS volume in the EBS console, you need to allocate the expanded capacity to partitions. The partitions can be existing partitions or partitions that are newly created and formatted. Then, resize the file systems of the partitions, so that the expanded capacity can be recognized.
- The maximum capacity of an EBS volume that uses MBR partitioning is 2 TB. If the capacity exceeds this limit, the excess capacity cannot be used. You may need to expand the capacity of an EBS volume that uses MBR partitioning to more than 2 TB. In this case, we recommend that you create and attach a data disk that uses GPT partitioning and then copy the data to the new disk.
- Misoperations during file system resizing may affect the existing data. We recommend that you manually create a snapshot to back up data before resizing. For more information about how to create a snapshot, see Create a snapshot.
- To resize a file system, you need to restart the instance or rescan disks. This will cause business interruption for a certain period of time. We recommend that you resize a file system with caution in a suitable period.
- After the partition and file system are resized, we recommend that you rescan disks to recognize the expanded capacity. The system may fail to recognize the expanded capacity if you perform other operations such as refreshing.
- The EBS volume has been attached to an KEC Windows instance in the console, and a file system has been created on the volume.
- A snapshot has been created to back up data. For more information about how to create a snapshot, see Step 1 of Expand the capacity of an EBS volume offline (Windows).
- The capacity of the EBS volume has been expanded in the console. For more information about how to expand the capacity, see Step 2 of Expand the capacity of an EBS volume offline (Windows).
||Windows Server 2012 R2 Datacenter 64-bit Chinese version
||Drive C: uses NTFS. You want to expand the capacity of the disk from 50 GB to 70 GB.
||Drive D: uses NTFS. You want to expand the capacity of the disk from 50 GB to 100 GB.
Step 1: Rescan disks
- Log in to the KEC instance. For more information, see Connect to instances.
- On the Windows Server desktop, right-click the Start icon and select Disk Management.
- In the Disk Management window, choose Action > Rescan Disks to view the unallocated disk capacity. Disk 0 is the system disk with the unallocated capacity of 20 GB. Disk 1 is the data disk with the unallocated capacity of 50 GB.
Step 2: Resize partitions and file systems on the system disk or a data disk
To resize partitions and file systems on the system disk, right-click the blank space in the Disk 0 section and select Extend Volume, as shown in the following figure.
Note: If you are resizing partitions and file systems on a data disk, right-click the blank space in the data disk section, for example, Disk 1.
Extend the volume by following the instructions in the Extend Volume Wizard window.
After you extend the volume, the expanded data disk space is automatically added to the EBS volume, as shown in the following figure.
The figure shows that the resizing succeeded. When you check the result, compare the result with the original capacity.
- If the resizing succeeded, the business programs on the KEC instance can continue to run as expected.
- If the resizing failed, use the snapshot to roll back the data.
Step 3: (Optional) Create a partition on a data disk
If you want to allocate the expanded capacity of an EBS volume to a new partition, perform the following steps:
- After you complete Step 1, right-click the blank space in the section of a disk on which you want to create a partition, and select Extend Volume. In this example, create a partition on Data disk 1, as shown in the following figure.
- Extend the volume by following the instructions in the New Simple Volume Wizard window.
After you complete the operations, a partition is created, as shown in the following figure.