With nearly 95% of our servers being of the rackmount Poweredge variety, we’re definitely what you would call a Dell shop. Naturally I’ve become familiar with a number of tools offered by Dell, with extpart.exe being one of the most utilized. It’s a great alternative tool (to the built in DiskPart) for extending partitions that we use on every Windows virtual machine in our vmware environment. We include this tool on the C: drive of every template we deploy from to ensure it’s always available.
After adjusting the size of the disk from vCenter, it’s rather an quick change to extend inside the os. As I mentioned, extpart.exe is on the root of C: for us, so all I have to do is open up a command prompt, navigate to the root of C:, and type extpart c: 5120 (or whatever amount of megabytes you’ve expanded the disk).
I usually open up disk management first to make sure the extra space is showing up after extending the vmdk inside vCenter. If you don’t see the extra unallocated space at first, you can try to right click on Disk Management and select Rescan Disks to see if that works.
As you can see from the image above, I expanded the C: drive by 4 gigabytes from 16gb to 20gb. Now all I have to do is open a command prompt, navigate to C:, and run extpart.
And after you hit Enter…
If you’re lazy like I am and want to avoid math (1024 x # of gb’s you are extending), just extend it by a whole number. For example, I extended the drive by 4gb, so I ran extpart for 4000. This is where it helps to have Disk Management open because you can see what’s left for unallocated space after you run it the first time.
All you do is hit your up arrow and alter the number to what you have left and run it again. In this case, I’d simply type extpart c: 94 and hit Enter. Bam, done!