Diskpart of Server 2003

Use diskpart command to extend partition on Windows Server 2003 (R2)

In Windows Server 2003, the most common issue is C drive running out of space. Meanwhile, there is large amount of free space in other volumes such as D. So many people ask whether it is possible to extend C drive with the free space in partition D. If yes the low disk space issue can be solved without starting over. The answer is definitely yes, to resize and extend partition on Windows Server 2003, you may use either Windows built-in Diskpart command or 3rd-party server partition software such as NIUBI Partition Editor. In this article I’ll introduce how to extend volume with Diskpart command.

Diskpart of Server 2003

What is Diskpart Command

DiskPart is a text-mode command interpreter in Windows Vista, Windows® XP, and the Windows Server 2003® family. This tool enables you to manage objects (disks, partitions, or volumes) by using scripts or direct input at a command prompt.

Diskpart differs from many command-line utilities because it does not operate in a single-line mode. Instead, after you start the utility, the commands are read from standard input/output (I/O). You can direct these commands to any disk, partition, or volume.

Precondition to use diskpart command

  • The volume must be formatted with the NTFS file system.
  • For Basic volumes, the Unallocated space for the extension must be the next contiguous space on the same disk.
  • Only the extension of Data volumes is supported in Windows, to extend system volume, you have to run diskpart from bootable CD.
  • You cannot extend the partition if the system page file is located.

How to run diskpart in Server 2003

1. Press ‘Windows‘ and ‘R‘ key on the keyboard, type ‘cmd’ and press ‘Enter’.

Run diskpart command

MS-DOS command prompt window will be opened.

Comand prompt window

2. Type “diskpart” and press ‘Enter‘.

Diskpart command window

Now you are ready to input diskpart commands to do disk partition management.

How to extend partition with diskpart command

Before running diskpart command to extend a volume, you’d better check the disk partition layout under Disk Management (Right click “My Computer” > “Manage” > “Storage” > “Disk Management“. Because in the graphic interface, you’ll see disk partition layout clearly. On my Windows 2003 server, there is drive C: E: F: and a free unallocated space.

Before running diskpart

Steps to extend partition with Server 2003 diskpart:

Step 1: Follow the steps above to open diskpart command prompt window.

Type “list volume“, you’ll see all partitions but NO Unallocated space.

List volume

Step 2: Type “select volume X” to give focus to the partition you want to extend. (X is the volume number)

Step 3: Type “extend” to proceed extending.

Diskpart extend volume

Now drive F: was extened.

Failed to extend partition with Diskpart

As I said in the beginning, only when there is adjacent Unallocated space on the right side, you can extend a volume, otherwise you’ll receive failure message, for example:

When you try to extend drive E, you’ll receive error message “The volume you have selected may not be extended. Please select another volume and try again“.

Diskpart failed to extend

To extend volume E, you must delete the adjacent F to get Unallocated space.

OK, delet drive F: and redo the steps.

Diskpart extend partition

List Volume

Diskpart extended partition

Extend volume

Yes, drive E: was extended.

How about C: drive, as it is system boot partition? From previous steps we know C: drive cannot be extended if there is no Unallocated space, delete drive E:.

Diskpart extend system partition

Diskpart failed to extend system C: drive even though there is continuous free unallocated space.

Limitations of diskpart command

  • The system volume cannot be extended.
  • Data partition with FAT file system cannot be extended.
  • Comparing with graphical user interface, command line is difficult to use for many users.
  • Operations cannot be undone, an incorrect operations lead to data loss.
  • Stop the Server running for a long time.

Extend Server 2003 volume with partition software

With server partition software Download Freely it becomes much easier to extend volume on Windows Server 2003.

Watch the video (full screen is recommended)