After you extend partitions and file systems on a disk of a Windows Elastic Compute Service (ECS) instance, you must continue extending the partitions and file systems of the disk in the instance. The disk can be a system disk or a data disk. This topic describes how to extend the incremental storage capacity of a Windows instance into an existing or added partition.
Prerequisites
A disk of the instance is resized in the ECS console. For more information, see Step 1: Resize a disk to extend its capacity.
(Recommended) A snapshot of the disk is created to back up disk data. For more information, see Create a snapshot of a disk.
NoteIn most cases, extending partitions and file systems does not cause data loss. To prevent data loss or exceptions caused by accidental operations, we recommend that you create snapshots to back up disk data.
A Windows instance that meets the following requirements is created:
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.
Procedures
In this example, a disk is extended from 40 GB to 60 GB in an ECS instance that runs the Windows Server 2016 64-bit operating system. The actual operations vary based on the operating system that your instance runs.
Step 1: Check whether the partitions of the disk require to be converted
If the disk does not exceed 2 TiB in size or uses GUID Partition Table (GPT) partitions, skip this step.
If the disk is larger than 2 TiB in size and uses Master Boot Record (MBR) partitions, convert the partitions to GPT partitions and then extend the partitions and file systems of the disk. For more information, see Convert MBR partitions into GPT partitions and Step 2: Extend partitions and file systems.
Step 2: Extend partitions and file systems
Extend an existing partition and file system
This section describes how to add 20 GB of incremental storage capacity to an existing partition. 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 Disk 0 (C:) is the system disk and Disk 1 (D:) is a data disk.
Right-click the blank space in the disk section and select Extend Volume... In this example, the blank space in the Disk 0 section is clicked.
NoteIf you want to extend a data disk, right-click the blank space in the data disk section. In this example, you can click the blank space in the 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.
Follow the instructions in the Extend Volume Wizard dialog box to extend the volume.
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.
Create an additional partition
This section describes how to create an additional partition to allocate the 20 GB of incremental storage capacity. In this example, the E drive is created.
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 Disk 0 (C:) is the system disk and Disk 1 (D:) is a data disk.
Right-click the blank space in the Disk 1 section and select New Simple Volume...
Follow the instructions in New Simple Volume Wizard to extend the volume.
After you extend partitions or file systems, you must check whether partition or file system sizes are the same as the specified values and whether business on the ECS instance runs as expected.