How to use diskpart command to extend partition on Server 2003?

There is no Shrink and Extend feature under Windows 2003 Server Disk Management, so to extend system C drive on Server 2003, you need diskpart command line or third party Server partition software, such as Partition Magic Server. In this article, I’ll introduce how to extend partition with Diskpart command line and 3rd party partitioning software.

Short introduction of Diskpart Command Line

DiskPart.exe is a text-mode command line tool interpreter which enables storage objects such as disks, partitions or volumes configuration and management from a script, remote session, or direct input from a command prompt. Diskpart is actually the underlying utility that augments the Disk Administrator graphical user interface and enables a superset of the actions that are supported by the Disk Management snap-in.

You can use the Diskpart.exe utility to manage disks, partitions, and volumes from a command-line interface. You can use Diskpart.exe on both Basic disks and Dynamic disks. If an NTFS volume resides on a hardware RAID 5 container that can add space to the container, you can extend the NTFS Volume with Diskpart.exe while the disk remains a Basic disk.

Basic requirements of Diskpart command line

1. The volume must be formatted with the NTFS file system.
2. For Basic volumes, the unallocated space for the extension must be the next contiguous space on the same disk.
3. For Dynamic Volumes, the unallocated space can be any empty area on any Dynamic disk on the system.
4. Only the extension of data volumes is supported.
5. You cannot extend the partition if the system page file is located on. To do this, move the page file to a partition that you do not want to extend.

How to extend partition with Diskpart Command prompt?

Step 1: Press Windows and R key to run command prompt, type diskpart.exe.

Diskpart command

Step 2: Type “list volume” to display the existing volumes on the computer.

List volume

Step 3: Type “select volume X”, X is the number or drive letter of the partition that you want to extend.

Select volume

Step 4: Type extend [size=n] [disk=n] [noerr].

Diskpart error

As there is no Unallocated space behind partition E, you cannot extend this partition. To show the result, I delete Partition F and try Extend again.

Diskpart extended

Now, Partition E can be extended with the Unallocated space that deleted from Partition F. Check again under Disk Management:

Disk management 2003

The following describes the parameters:
size=n
The space, in megabytes (MB), to add to the current partition. If you do not specify a size, the disk will be extended using all the next contiguous unallocated space.
disk=n
The dynamic disk on which to extend the volume. Space equal to size=n is allocated on the disk. If no disk is specified, the volume is extended on the current disk.
noerr
For scripting only. When an error is thrown, this parameter specifies that Diskpart continue to process commands as if the error did not occur. Without the noerr parameter, an error causes Diskpart to exit with an error code.

Disadvantages of Diskpart command to extend partition

Though DiskPart is free and provides by Microsoft, it is not a good utility to extend the system.

  1. The system volume can only be extended by running Diskpart.exe from a command line by bootable CD.
  2. Only when you delete a data partition and get some Unallocated space, you can extend the system C drive.
  3. It works by command line and hard to use for many users.
  4. Incorrect operations lead to data loss and the operations cannot be undone.

With 3rd party program it is much easier to resize partition and no such limitations, you can easily extend a drive by taking unused space of any other drives in the same hard disk, you can even extend system partition on your 2003 Server without reboot if it is NTFS (close other running applications before launching the program).

Watch the video how to resize server partition easily:

 

Learn More Download to Try

Leave a Reply

You must be logged in to post a comment.