How to resize a Windows partition
How to Extend a Windows Partition
When a Windows VPS storage is upgraded, the new space may not automatically be added to your existing C drive partition. This can happen if a hidden recovery partition is located between your C drive and the newly unallocated space. This guide provides a step-by-step process to extend your C drive by temporarily disabling and deleting the recovery partition, extending the C drive, and then recreating the recovery partition.
Step 1: Disable the Windows Recovery Environment
- Open Command Prompt as an administrator.
- Type
reagentc /disable
and press Enter.
Step 2: Delete the Recovery Partition
- In the same Command Prompt window, type
diskpart
and press Enter. - Type
list disk
to view all your disks, then typeselect disk <number>
(replace<number>
with the disk that has the recovery partition). - Type
list partition
to see all partitions. Identify the recovery partition; it is typically less than 1 GB. - Type
select partition <number>
(replace<number>
with the recovery partition's number). - Type
detail partition
and copy the Partition ID and Attributes. You will need this information to recreate the partition later. - Type
delete partition override
and press Enter to delete the recovery partition.
Step 3: Extend the C Drive
- Open Disk Management. You should now see the unallocated space adjacent to your C drive.
- Right-click on the C drive and select "Extend Volume".
- Follow the wizard to add the unallocated space to your C drive.
Step 4: Recreate and Configure the Recovery Partition
- Go back to Disk Management. Create a new 1 GB empty partition in the unallocated space that remains.
- Return to the Command Prompt and type
list partition
. - Select the empty partition you just created by typing
select partition <number>
. - Set the Partition ID by typing
set id=<partition_id>
using the ID you copied earlier. - Set the attributes by typing
set attributes=<attributes>
using the attributes you copied earlie
Step 5: Hide the Recovery Partition
- Type
list volume
to see a list of volumes. - Note the drive letter of the recovery partition and then type
select volume <number>
. - To hide the partition from File Explorer, type
remove letter=<drive_letter>
. - Type
exit
to leave DiskPart.
Step 6: Re-enable the Recovery Environment
- In the Command Prompt, type
reagentc /enable
and press Enter. The process is now complete.
Updated on: 16/09/2025
Thank you!