Monday 6 December 2010

Expanding Virtual Disks - Inconsistency between Explorer and Disk Management

One of the things I love about Virtual MS 2008 Servers on vSphere 4 is the ability to expand virtual disks on the fly.

I have however found that occasionally there is an inconsistency between the size that shows in Windows Explorer and Disk Management.

So far I haven't worked out what causes this as it is intermittent, sometimes it works and sometimes it doesn't.

I am not going to outline here how the disk is expanded as there are a lot of documents on line that explain this.

I am however going to quickly outline a workaround if you get inconsistency between the size showing in Windows Explorer and Disk Management.

Workaround - NB Use the DISKPART command line utility at your own risk and please take the necessary pre-cautions to minimise the risk of Data loss!


You will need to use the Diskpart Command Line Utility in this workaround.

1.) Open a command prompt.
2.) Type diskpart
3.) You will then need to type list volume
4.) This will list the volumes on the server:
5.) In this instance it was Volume 6 that was showing a Size of 140GB in Disk Management (And Diskpart) but 120GB in Windows Explorer. So the next step is to type select volume 6 to set the focus of DISKPART to volume 6.
6.) Once you have selected the volume you will need to issue the following command: extend filesystem

This completes the workaround, you should now find that both Windows Explorer and Disk Management are now showing the same disk size.

Sometimes you may get an error when using the diskpart utility that states that the volume you are trying to extend is corrupt or words to that affect. If this happens run the Chkdisk utility, unfortunately this will require downtime to acheive.

Once this is done and the Disk consistancies have been fixed by Chkdisk, re-run diskpart commands...

Useful Links

Diskpart Command Line Utility

VMWare KB: Extending partition - This document is for MS 2003 but is still a useful document: