This topic describes how to extend the partitions and file systems of a disk on a Windows Elastic Compute Service (ECS) instance.
Scenario
After you resize a disk in the ECS console, the file systems of the partitions on the disk also need to be extended. You must connect to the ECS instance to extend the file systems of the disk. In this topic, two methods are provided to extend partitions: Use the incremental capacity of the disk to extend an existing partition or create additional partitions.
In this example, a Windows Server 2012 R2 64-bit public image is used and the disk is resized from 40 GB to 60 GB within the instance. Operations vary based on actual scenarios.
Prerequisites
- A disk on the Linux instance is resized based on the instructions described in Resize disks online for Linux and Windows instances.
- (Recommended) Snapshots are created for the disk to back up data. For more information, see Create a snapshot of a disk.
If you did not create snapshots for the disk when you perform Resize disks online for Linux and Windows instances, we recommend that you create snapshots for the disk to back up data before you extend partitions and file systems on the disk.
- The Windows instance meets the following requirements:
- The instance does not run Windows Server 2003 images.
- The version of the Red Hat virtio-scsi driver is later than 58011. For more information, see Update Red Hat virtio drivers of Windows instances.
(Optional) Step 1: Check whether the partitions of a disk need to be converted
- If the disk does not exceed 2 TiB in size or if the disk uses the GUID Partition Table (GPT) partition style, skip this step.
- If the disk is larger than 2 TiB in size and uses the master boot record (MBR) partition style, convert the partition style to GPT and extend the partitions and file systems of the disk. For more information, see Convert a data disk on a Windows instance from MBR to GPT and Step 2: Extend partitions and file systems.
- Connect to the ECS instance.
For more information, see Connect to a Windows instance by using a password or key.
- On the Windows Server desktop, right-click the
icon and select Disk Management.
- Find the data disk whose partition style needs to be identified, right-click the blank area around the disk (such as Disk 1), and then select Properties from the shortcut menu.
- In the dialog box that appears, click the Volumes tab and check the Partition style value. The following figure shows that the partition style of the disk is MBR.
Step 2: Extend partitions and file systems
Method 1: Extend an existing partition and file system
This section describes how to add incremental storage capacity to an existing partition to resize the system disk within an ECS instance. In this example, the system disk (C drive) is used.
- Connect to the ECS instance. For more information, see Connect to a Windows instance by using a password or key.
- On the Windows Server desktop, right-click the
icon and select Disk Management.
- In the Disk Management dialog box, choose to view the unallocated disk capacity. The following figure shows that the Disk 0 (C:) is the system disk and Disk 1 (D:) is a data disk.
- Right-click the blank space in the disk (such as Disk 0) section and select Extend Volume... Note If you want to resize a data disk, right-click the blank space in the data disk (such as Disk 1) section. If a disk has multiple partitions, we recommend that you extend the partition that is adjacent to the left of an unallocated partition. Otherwise, Windows converts the selected basic disk into a dynamic disk.
- Extend the volume as instructed in Extend Volume Wizard. After you extend the partition, the incremental storage capacity is automatically added to the C drive. The following figure shows that the C drive has 60 GB of available capacity.After you extend file systems, check whether the file system sizes are the same as the specified values.
- If the file system sizes are increased to the specified values and business applications on the instance can run as expected, the file systems are extended.
- If the file system sizes are not increased to the specified values, use the snapshots that you created to roll back the disk. For more information, see Roll back a disk by using a snapshot.
Method 2: Create an additional partition
This section describes how to create an additional partition for a data disk to allocate the incremental storage capacity within an ECS instance. In this example, the E drive is used.
- Connect to the ECS instance. For more information, see Connect to a Windows instance by using a password or key.
- On the Windows Server desktop, right-click the
icon and select Disk Management.
- In the Disk Management dialog box, choose to view the unallocated disk capacity. The following figure shows that the Disk 0 (C:) is the system disk and Disk 1 (D:) is a data disk.
- Right-click the blank space in the unallocated section of Disk 1 and select New Simple Volume...
- Extend the volume as instructed in New Simple Volume Wizard. After you create the E drive to allocate the incremental storage capacity, the E drive has 20 GB of available capacity.After you extend file systems, check whether the file system sizes are the same as the specified values.
- If the file system sizes are increased to the specified values and business applications on the instance can run as expected, the file systems are extended.
- If the file system sizes are not increased to the specified values, use the snapshots that you created to roll back the disk. For more information, see Roll back a disk by using a snapshot.