All Products
Search
Document Center

Elastic Compute Service:Extend the partitions and file systems of disks on a Windows instance

Last Updated:May 29, 2025

After you extend partitions and file systems of a system disk or data disk of a Windows Elastic Compute Service (ECS) instance, you must continue extending the partitions and file systems of the disk on the instance. This topic describes how to extend the incremental storage capacity of a Windows instance into an existing or added partition.

Preparations

  • The instance to which the disk that you want to resize is attached meets the following requirements:

  • The disk is in the In Use (In_use) state.

  • The disk was resized in the ECS console. For information about how to resize a disk, see Step 1: Resize a disk to extend the disk capacity.

    Note

    If you set the Resizing Method parameter to Offline Resizing to resize a disk that is attached to an ECS instance, you must restart the instance in the ECS console or by calling an API operation after you resize the disk to make the new disk size take effect. If you restart Windows operating system on the instance, the new disk size does not take effect. For more information, see Restart an instance.

Preparations

  • (Recommended) Create a snapshot for the disk whose partitions and file systems you want to extend to back up disk data. For more information, see Create a snapshot.

    Note

    In most cases, data loss does not occur when you extend partitions and file systems. To prevent data loss or exceptions caused by accidental operations, we recommend that you create snapshots to back up disk data.

  • You must be familiar with the process for resizing a disk. For more information, see Overview.

Procedure

In this example, a disk is extended from 40 GB to 60 GB on an ECS instance that runs the Windows Server 2016 64-bit public image. The actual operations vary based on the disk and image that you use.

Step 1: Check whether the partitions of the disk require to be converted

Query the partition style

  1. Connect to the ECS instance.

    Log on to the ECS console. In the left-side navigation pane, click Instances. On the Instance page, select the instance to which you want to connect and click Connect in the Actions column. For more information, see Use Workbench to connect to a Windows instance over RDP.

  2. On the Windows Server desktop, right-click the 开始图标 icon and select Disk Management.

  3. Find the data disk whose partition style you want to check, right-click the blank area around the disk. Then, select Properties from the shortcut menu. In this example, the partition style of Disk 1 is queried.选择属性

  4. In the dialog box that appears, click the Volumes tab and view the Partition style value.

    The following figure shows that the partition style of the disk is MBR.分区格式

Step 2: Extend partitions and file systems

Extend an existing partition and file system

This section describes how to add 20 GiB of incremental storage capacity to an existing partition. In this example, the system disk C drive is used.

  1. Connect to the ECS instance.

    Log on to the ECS console. In the left-side navigation pane, click Instances. On the Instance page, select the instance to which you want to connect and click Connect in the Actions column. For more information, see Use Workbench to connect to a Windows instance over RDP.

  2. Check the virtio driver version of the Windows instance. If you want to resize a disk online, make sure that the version of your virtio driver is 58011 or later. Otherwise, you must restart the instance to allow the system to recognize the unallocated space. Open the Run dialog box. Enter powershell and click OK to start PowerShell. Run the following command to check the virtio driver version:

    [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\Windows\System32\drivers\viostor.sys")

    The following command output is returned.virtio版本信息

    Update the virtio driver if the number at the end of the ProductVersion value is less than 58011. For more information, see Update Red Hat virtio drivers of Windows instances.

  3. On the Windows desktop, right-click the 开始图标 icon and select Disk Management.

  4. In the Disk Management dialog box, choose Action > Rescan Disks 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.caozuo1

  5. 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.

    Important
    • The Windows operating system does not allow disks to be resized across partitions. For a disk that has multiple partitions, the incremental storage capacity can be allocated only to the left adjacent partition on a disk that has multiple partitions.

    • For example, the space of disk 1 cannot be directly allocated to disk 0. The partitions and file systems of different disks are independent from each other. The extended space can be used only to extend the partition of the current disk or create a new partition.

    kuozhan

  6. 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.kuozhan2

Create an additional partition

This section describes how to create an additional partition to which 20 GB of incremental storage capacity is allocated. In this example, the E drive is created.

  1. Connect to the ECS instance.

    Log on to the ECS console. In the left-side navigation pane, click Instances. On the Instance page, select the instance to which you want to connect and click Connect in the Actions column. For more information, see Use Workbench to connect to a Windows instance over RDP.

  2. Check the virtio driver version of the Windows instance. To resize a disk online, make sure that the version of your virtio driver is 58011 or later. Otherwise, you may be unable to identify the unallocated space online. Open the Run dialog box, enter powershell, and then click OK to start PowerShell. Run the following command to check the virtio driver version:

    [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\Windows\System32\drivers\viostor.sys")

    The following command output is returned.virtio版本信息

    Update the virtio driver if the number at the end of the ProductVersion value is less than 58011. For more information, see Update Red Hat virtio drivers of Windows instances.

  3. In the Disk Management dialog box, choose Action > Rescan Disks 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.caozuo1

  4. Right-click the blank space in the Disk 1 section and select New Simple Volume...

    jiandan1

  5. Follow the instructions in New Simple Volume Wizard to extend the volume.

    The following figure shows that the E drive has 20 GB of available capacity after you create the drive to allocate the incremental storage capacity.新分区

After you extend partitions or file systems, you must check whether the partition or file system sizes are the same as the specified values and whether business on the ECS instance runs as expected.