Microsoft Windows server 2003 and the R2 version of it, is a great product to work with. For some purposes I find it even better then the Windows 2008 version, but that's another story. Stable as it is, the R2 version a bit more, I can recomment the use of it to anyone. It's cheaper that W2K8 and that also counts today. Why buy a new license when you allready have one. The only real upcoming problem is that the normal W2K3 veresion will be end-of-life soon. In this article I like to share with you, a little tric that I often use to increase the virtual volume from a disk partition. Server 2008 handles that a lot nicer, but as there are stille many Windows 2003(R2) machines, we have to do that sometimes as well. So, the initially set up was for my own references, but now I share it with you. Enjoy it !! Due to the fact that a big percentage of visitors of this page are international based, this article is in the english language.

Use diskpart to extend W2K3 dynamic volumes

Now, first, you have to make sure that the disks are off the type "Dynamic". This can be done with "standard" disks as well. You can do that by checking the disk-and storage management. If you have a hardware RAID-5 volume, formatted as NTFS, and there is room to expand it, you can use diskpart as well to increase the size, keeping the harddisk at the standard version.

Open the command promt as an administrator, otherwise it will not work due to a lack of permissions. Generally, you can use diskpart.exe to manage all disks, partitions and volumes from the commandline.

But know the explaining part:

You can use the the command expand to increase the size of a disk at any time if you have non-allocated space free on your disk, without loosing any data. The volume has to be allways of the type NTFS. If you are using a standard volume, the not-allocated space has to be part of the same disk. If you are using a dynamic volume, the not allocated space can be on any other free dynamic space, even if its resides on another disk. It is not possibel to extend start- or systemvolumes, and it is also not possible to extend a disk where the page has been located. The only work-around on that last issue, is to move the pagefile first, and after that, you can extend the disk using diskpart.exe. This will probably require a reboot of your system though. 

The actual commands now, after opening the commandbox:

- type diskpart start the diskpart tool. Instead of C:> you will see DISKPART> as a prompt.
  You can see the rest in the picture above as well.

- type list volume to get a list of the currect available volumes on your system.

- type select volume to set the tool, looking at the right volume you want to extend.

- Just now type extend to use the full size of the available diskspace. That easy right?

By typing the list volume command again you will see the direct effect of the extension in your screen. You can imagine how to do this in scripting. But you can limit the size as well, and don't use all the available space. For that kind of action, set some parameters behind the "extend" command. You can use it like this:

extend [size=n] [disk=n] [noerr]

A little extra explaining.
size=n is the space in megabytes (MB), which has to  be extended to the listed volume.
disk=n is the dynamic disk/volume number which you want to use to extend the listed volume.
            if this parameter has not been specified, the volume will be extended as much as there is available.
noerr is an option that you only will use in script. It wil surpress any errors to force the script to continue as if nothing
            happened. Without this optional parameter your script will abort when an error occurs.

When the extension of your disk is ready, a message like "Diskpart successfully extended the volume" will show up in your screen. Your disk will be larger, while maintaining the data that was allready on it. After that, you can type "exit" to quit the diskpart tool.

Attention: It is not possible to extend a disk that has running the operating system on it. Look for other solutions, to clean up that partition, like removing log-files or compromise/move files that are not directly needed.

Now a little extra information. Diskpart has been build into the Windows version from level Windows XP and Windows Server 2003. Earlier operating systems could download this utility as an extra tool. There are a few possible errors, but there all from pre Windows XP and Windows Server 2003. I assume you do not use them anymore, as they are allready in the end-of-life stage. It is also possible that you get a message that you have to convert your standard disktype, to a dynamic disk first. Please do so and do not fear. I have done it many times, and never got any error doing this.

Enjoy, extending your (virtual) disks!


Ben OostdamBen Oostdam has been working with Windows systems since 1993. Worked for several companies as a system administrator, and is currently a Senior Support Engineer for Qurius Customer Care in the Netherlands, specialized in System Center Solutions.

Disclaimer: The information contained in this website/article is for general information purposes only. The information is provided as is, by Ben Oostdam and while we endeavour to keep the information up to date and correct, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk. In no event will we be liable for any loss or damage including without limitation, indirect or consequential loss or damage, or any loss or damage whatsoever arising from loss of data or profits arising out of, or in connection with, the use of this website. Through this website you are sometimes able to link to other websites which are not under my control. I have no control over the nature, content and availability of those sites. The inclusion of any links does not necessarily imply a recommendation or endorse the views expressed within them. Every effort is made to keep the website up and running smoothly. However, I take no responsibility for, and will not be liable for, the website being temporarily unavailable due to technical issues beyond our control. All entries in these articles, are my individual opinion, or from co-writers and they don't necessary reflect the opinion of my employer.



Friday the 7th, May 2021. All rights reserved.. // Oostdam WebDesign