When trying to extend a partition on a Windows 2003 Server using diskpart.exe he got the error:
“The volume you have selected may not be extended.
Please select another volume and try again.”
I remembered seeing this error back in the VMware 3.0 days when resizing disks and then extending the partitions. So without doing much other research I quickly found Microsoft KB 841650 and VMware KB 1007266 which both reference a bug in DiskPart.exe and a hotfix that is needed.
Well… It turns out that the Microsoft hotfix was only for pre-SP2 for Windows 2003 systems. Since this server was running Windows 2003 SP2 the hotfix did not apply.
After looking closely at the screenshot I was sent, I noticed that the “Extended Partition” and “Free Space” sections did not look correct. I wasn’t used to seeing those green colors and tried to figure out why it was showing like that. I’m used to seeing show the unallocated in Disk Manager.
So took a look at a test Windows 2003 virtual machine to see if could reproduce the issue. When I initially resized the disk in VMware and rescanned by disks in Disk Manager, I noticed the new space was showing "Unallocated" and not like the screenshot I was sent.
I then needed to try and get the disk to look like the screenshot that he sent me. I was able to do this by right-clicking on unallocated space, selecting New Partition, Extended partition, and then selecting all of the new space.
Then my test machine was appearing like the screenshot I was sent. I was then able to confirm that I got the same error when I’d try to run diskpart.exe extend on that volume.
To fix I had him simply delete the new “Free Space” partition so that the space was showing unallocated. At that point we were able to successfully extend the volume on that
Once the space was showing "Unallocated" I was able to sucessfully extend the volume with DiskPart.exe and now the partition is using all of the new space.
The lesson learned was that the space needs to show "Unallocated" if you want to extend a volume (partition) on a basic disk in Windows.
I passed this information back to my colleague and he was able to sucessfully delete the free space partition and extend his volume.