Symptom
After you expand a disk in the Elastic Compute Service (ECS) console, Disk Management in Windows still shows the original disk capacity. The operating system has not recognized the new, larger size.
Why disk sizes can be mismatched
Disk expansion on ECS is a two-step process:
Expand the disk in the ECS console -- this increases the raw block storage capacity.
Extend the partition inside Windows -- this makes the operating system recognize and use the additional space.
A size mismatch means step 2 has not taken effect yet.
Before you begin
Before troubleshooting, confirm the following:
The disk expansion in the ECS console completed successfully. Check the disk size on the Block Storage page in the ECS console.
You have administrator access to the Windows instance.
Causes
Instance not restarted after offline expansion
If you perform an offline expansion on a system disk or data disk in the ECS console but do not restart the instance, the operating system continues to use old, cached disk information. The instance must be restarted for the operating system to detect the new disk capacity during boot.
Abnormal expansion detection
The operating system may fail to automatically detect the new disk size. This can be caused by an interruption in the update process or by driver issues.
Solutions
Start with Solution 1 and move to the next only if the issue persists. If you performed an offline expansion, skip to Solution 2 -- a restart is required.
Solution 1: Rescan disks with DiskPart
If you cannot restart the instance immediately because it would interrupt your services, manually trigger a rescan to detect the new capacity.
Log on to the ECS instance and open Command Prompt as an administrator.
Run
diskpartto start the disk partition management tool.diskpartRun
rescanto instruct the operating system to rescan all storage buses for new or changed hardware.rescanWait for the scan to complete, then run
exitto close DiskPart.exitOpen Disk Management and verify that the disk capacity now reflects the expanded size.
The added space appears as unallocated. You still need to extend the existing partition or create a new partition to use this space.
Solution 2: Restart the instance
If the rescan did not resolve the mismatch, or if you performed an offline expansion, restart the instance.
Go to the ECS console - Instances page. In the upper-left corner, select the resource group and region of the target instance.
Click the target instance ID to open the instance details page. In the upper-right corner, click Restart, then click Confirm.
After the instance restarts, log on to the Windows instance again. Open Disk Management and confirm that the disk capacity is updated to the post-expansion size.
The added space appears as unallocated. Extend the existing partition or create a new partition to use this space.
Solution 3: Check storage drivers
If the disk size is still incorrect after a rescan and a restart, a driver issue may be preventing the operating system from detecting the expanded disk.
Right-click the Start menu and select Device Manager.
Expand the Storage Controllers and Disk Drives categories.
Check for any devices marked with a yellow exclamation point icon. This indicates a driver problem.
If an abnormal device exists, right-click the device and select Properties. On the General tab, view the error code in the Device Status box.
Look up the error code in the Microsoft official documentation: Error codes in Device Manager in Windows and follow the recommended fix.
Tip: Error code 19 indicates incomplete or corrupted registry information. For this specific error, see How do I check for residual disk driver entries in the registry of a Windows ECS instance?