Categories
Microsoft Tech

Extending disk volume fails – The parameter is incorrect (Windows Server)

When trying to extend a volume in windows I received an error when applying the extend. The volume is extended, but the extra space isn’t visible/usable… This is how I fixed it!

Logical Disk Manager - The parameter is incorrect.
Logical Disk Manager – The parameter is incorrect.

So today I was extending a volume of a virtual machine. It was close to filling up. As this is a VMware VM, I began with extend the VMDK with 30GB. After a refresh you can see the 30GB as unallocated space.

Disk Management - Unallocated space
Disk Management – Unallocated space

I decided to use the wizard to extend the volume. After completing the wizard an wild error appeared!!

Logical Disk Manager - The parameter is incorrect.
Logical Disk Manager – The parameter is incorrect.

After inspection the the effect became clear… The volume had been extended, but the extra capacity could not be seen/used:

 Disk Management – Wrong size
Disk Management – Wrong size

After a bit of googling it appeared that after the wizard had finished, the volume had been expanded… But the NTFS file system hadn’t.

Luckily it can be fixed with the help of diskpart.

Start by opening a command prompt with elevated rights. And start diskpart by entering the command diskpart. When diskpart is started you can view the volume by entering the following command: list volume

Diskpart - list volume
Diskpart – list volume

Now lookup the ID of the corresponding volume which you want to extend. In this example the ID is 2. Now we need to select this volume if we want to continue. We do this with the following command: select volume <id>. In this case the command would be: select volume 2.

Diskpart - select volume
Diskpart – select volume

At this point we can fix the error by entering this command: extend filesystem

Diskpart - extend filesystem
Diskpart – extend filesystem

And HOORAY!!  We have our space back!!

Disk Management – All is good again
Disk Management – All is good again

You can exit the diskpart application by entering the exit command.