Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Windows 10 / Fix: Can’t Extend Volume in Windows

January 12, 2023 Windows 10Windows 11Windows Server 2019

Fix: Can’t Extend Volume in Windows

Quite often, you have to expand virtual machine disks when the system drive runs out of free space. For example, you increased the disk size in the VMware or Hyper-V virtual machine settings, and now you need to extend the volume inside the guest operating system (Windows).

Contents:
  • Extend Volume Option is Grayed Out in Windows Disk Management Console
  • Cannot Extend Volume Due to Windows Recovery Partition
  • Move Windows Recovery Partition to the End of Disk with GParted LiveCD

Extend Volume Option is Grayed Out in Windows Disk Management Console

Open Disk Management console (diskmgmt.msc) and right-click on the partition you want to expand (in my example, it’s a logical volume assigned the drive letter C:\). As you can see, the Extend Volume option is grayed out. The fact is that you can extend a volume in Windows only if there is an Unallocated space to the right of it.

In my case, the recovery partition is between volume C: and unallocated space. You cannot expand the C: partition because it has a recovery (Windows RE) partition to its right. That’s why the “Extend Volume” option is inactive (grayed out).

Extend Volume Greyed Out How to increase C drive space

You won’t be able to extend a disk volume in Windows (Windows Server) if:

  1. To the right of the partition you want to expand is another partition;
  2. The partition is formatted with a file system that does not support the extending (FAT32, exFAT). Only NTFS/ReFS volumes can be extended;
  3. You cannot create partitions larger than 2 TB on disks with an MBR partition table. Use the GPT partition table for large drives (greater than 2 TB). You can convert MBR to GPT without data loss using the built-in Mbr2gpt.exe tool. You can check the current partition table type on the Volumes tab of the disk in Device Manager. In this example, my Windows 10 VM is installed in EFI mode with GPT partitions on a disk.check the partition table (GPT or MBR)

In this article, we will look at how to properly increase a partition (system drive C:) in Windows if the Extend Volume option is not available (greyed out) in the Disk Management console. You need to move or delete the recovery partition if it prevents (blocks) your volume from extending.

It is strongly recommended to backup (or make a snapshot) of your drive before making changes to the partition table.

Cannot Extend Volume Due to Windows Recovery Partition

In the simplest case, you can just move the recovery environment files from the WinRE partition to the system drive C: and completely delete the 541MB recovery partition.

Here you can find a detailed guide about the WinRE environment in Windows.

First, assign a drive letter to the recovery partition. Open a command prompt as an administrator and run:

diskpart

List available local disks:

list disk

Choose your disk:

select disk 0

Display a list of partitions.

list part

Select the recovery partition (in your case it may be a different partition number):

select partition 4

Assign it a drive letter R:

assign letter r:
exit

diskpart assign drive letter recovery partition

Disable the Windows Recovery Environment (WinRE):

reagentc /disable

reagentc /disable WinRE

Now you have to remove the recovery partition with a size of 541 (in our example, this is Partition 4).

If you try to delete the Windows recovery partition from the Disk Management GUI  by clicking Delete Volume (sometimes the disk properties are not available at all), the following error will appear:

Delete recovery partition on windows 10

Virtual Disk Manager
Cannot delete a protected partition without the force protected parameter set.

Cannot delete a protected partition without the force protected parameter set.

You can delete such a protected partition only using the diskpart tool. Open the elevated command prompt and run the diskpart command. Select the partition you want to delete (note the results of your commands, since the numbers of disks and partitions may differ).

DISKPART> rescan
DISKPART> list disk
DISKPART> select disk 0
DISKPART> list part
DISKPART> select part 4
DISKPART> delete partition override

DiskPart successfully deleted the selected partition.
The override parameter allows diskpart to delete any partition regardless of its type (whether it is an active, system, or boot partition).

DISKPART> Rescan

Please wait while DiskPart scans your configuration...
DiskPart has finished scanning your configuration.

DISKPART> exit

diskpart delete recovery partition override

Enable WinRE and update the ReAgent.xml configuration file with the command:

reagentc /enable

reagentc /enable

Run the following command to verify that the recovery environment WIM file has been recreated on drive C:

bcdedit /enum all | find "osdevice"

ramdisk=[C:]\Recovery\WindowsRE\Winre.wim,{e668f79e-60da-11ed-b27a-ea3359f08732}

bcdedit check recovery wim image

Check your current WinRE configuration:

reagentc.exe /info

Windows Recovery Environment (Windows RE) and system reset configuration
Information:
Windows RE status: Enabled
Windows RE location: \\?\GLOBALROOT\device\harddisk0\partition3\Recovery\WindowsRE
Boot Configuration Data (BCD) identifier: e668f79d-60da-11ed-b27a-ea3359f08732
Recovery image location:
Recovery image index: 0
Custom image location:
Custom image index: 0
REAGENTC.EXE: Operation Successful.

reagentc.exe /info - check Windows Recovery Environment health

In this example, we are completely deleting a separate 540 MB partition for WinRE. The winre.wim recovery environment file is now located on the system partition where Windows is installed.

Now you can extend your system partition (drive C:):

  1. Open the diskmgmt.msc console;
  2. Right-click on the partition you want to increase and select Extend Volume; extend drive C in windows
  3. Specify the amount of space in MB you want to increase your partition. In my case, I will extend the C: drive by 5 GB. Click Next -> Finish; Extend Volume to Unallocated Space in Windows
  4. The system partition has been extended successfully.  Increase C Drive Space in Windows
If there are any other vendor recovery partitions on the disk that prevent you from extending the volume, check the article “How to Remove an OEM Partition in Windows?”.

Windows detects the recovery partition by the special labels: GUID — de94bba4-06d1-4d40-a16a-bfd50179d6ac and the GPT attribute 0x8000000000000001.

If are having issues with the EFI bootloader or the EFI partition, follow the links to read the related articles.

Move Windows Recovery Partition to the End of Disk with GParted LiveCD

If you are afraid of removing existing partitions on disks, you can move the partition that prevents it from expanding to the end of the disk using a third-party tool. You can use the free GParted (GNOME Partition Editor) boot image to manage partitions offline. This is a Live CD based on Linux Debian with a graphical frontend for the parted tool (a console-based utility for managing disk partitions in Linux). Download the ISO image gparted-live-1.4.0-6-amd64.iso here https://gparted.org/download.php (about 490 MB).

Boot your virtual machine from the gparted-live ISO image (if you want to expand the partition on a physical computer, you can burn the ISO image to a USB flash drive using the Rufus utility).

Gparted LiveCD

Select consecutively:

  1. Don’t touch keymap
  2. Default English language (33)
  3. Mode 0 – Continue to start X to use GParted automatically

Start GParted GUI

The graphical partition editor GParted will start automatically.

Find the partition you want to move to the right. Note that GParted uses the Linux partition naming. The easiest way to find your Windows recovery partition is by its size. In our case, this is the /dev/vvme0n1p4 partition with a size of 541 MB. Right-click on a partition and select Resize/Move.

move recovery partition in windows

Specify a value of 0 in the Free space following (MiB) field to move the partition to the end of the disk.

Move Partition to End of Disk on Windows

Click the Resize/Move button. In order to start moving partitions, click Edit -> Apply all operations in the top menu. In my case, a small 500 MB partition was moved in a few seconds.

move partitions in windows

Reboot the VM and start Windows. Open the Disk Management console. As you can see, the recovery partition has been moved to the end of the disk. The unallocated area is now to the right of the volume with the drive letter C:\.

extend system volume using disk management console

The Extend Volume option is now available and you can extend the system partition on your drive. The Windows recovery environment will not be affected.

9 comments
10
Facebook Twitter Google + Pinterest
previous post
Wi-Fi (Internet) Disconnects After Sleep or Hibernation on Windows 10/11
next post
Allow or Prevent Non-Admin Users from Reboot/Shutdown Windows

Related Reading

Configuring Event Viewer Log Size on Windows

May 24, 2023

How to Detect Who Changed the File/Folder NTFS...

May 24, 2023

Enable Single Sign-On (SSO) Authentication on RDS Windows...

May 23, 2023

Allow Non-admin Users RDP Access to Windows Server

May 22, 2023

How to Create, Change, and Remove Local Users...

May 17, 2023

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Configuring Event Viewer Log Size on Windows

    May 24, 2023
  • How to Detect Who Changed the File/Folder NTFS Permissions on Windows?

    May 24, 2023
  • Enable Single Sign-On (SSO) Authentication on RDS Windows Server

    May 23, 2023
  • Allow Non-admin Users RDP Access to Windows Server

    May 22, 2023
  • How to Create, Change, and Remove Local Users or Groups with PowerShell?

    May 17, 2023
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows

    May 16, 2023
  • View Success and Failed Local Logon Attempts on Windows

    May 2, 2023
  • Fix: “Something Went Wrong” Error When Installing Teams

    May 2, 2023
  • Querying Windows Event Logs with PowerShell

    May 2, 2023
  • Configure Windows LAPS (Local Administrator Passwords Solution) in AD

    April 25, 2023

Follow us

  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Repair EFI/GPT Bootloader on Windows 10 or 11?
  • How to Restore Deleted EFI System Partition in Windows?
  • Network Computers are not Showing Up in Windows 10/11
  • How to Run Program without Admin Privileges and Bypass UAC Prompt?
  • Fix: BSOD Error 0x0000007B (INACCESSABLE_BOOT_DEVICE) on Windows
  • Updating List of Trusted Root Certificates in Windows
  • How to Create a Wi-Fi Hotspot on your Windows PC?
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top