Though Microsoft adds graphical user interface utility in Windows Server 2008 Disk Management to shrink and extend partition, many people still like to use diskpart command line. This article describes how to extend Windows 2008 partition with diskpart commands. In most cases, the aim is to extend system C drive.
Diskpart Command description
In computing, diskpart is a command-line hard disk partitioning utility included in versions of the Windows NT operating system line from Windows 2000 onwards, replacing fdisk which was used in MS-DOS based operating systems. The diskpart command supports the use of scripts to automate its usage.
You can use this utility to enable storage configuration from a script, a remote session, or another command prompt. Diskpart enhances the Disk Administrator graphical user interface (GUI).
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.
Diskpart version in Windows Server 2008 is 6.0, higher than the version in Server 2003 - 5.2. Of course, Windows 2008 diskpart command is more powerful, for example, shrink command is added, system drive can be extended.
How to extend Windows 2008 data drive
Step 1. Press 'Windows' and 'R' key on the keyboard, type 'cmd' and click 'OK' or press 'Enter' to open command line.
Step 2. In the command line window, type diskpart and press 'Enter'.
Step 3. To better understand this, let's open Server 2008 Disk Management as well, where you'll find out the disk partition layout. In diskpart command window, input "list volume".
Step 4. To extend data drive D:, input "select volume 2" and then input "extend".
From Microsoft, to extend a volume, there must be next contiguous Unallocated space, so extend drive D: failed. OK, delete volume E: to create Unallocated space. Type "list volume" again.
Retry to extend data volume D:
Diskpart is successfully extend a Windows 2008 data drive.
How to extend Server 2008 system volume with diskpart
Better than Windows Server 2003, Windows 2008 diskpart is able to extend system drive C:. From the steps above, to extend C: drive, we have to delete data partition D to create unallocated space.
Redo "extend"
Diskpart successfully extended the Windows 2008 system drive.
It is not a good idear to extend C drive by deleting D, because all applications and Windows services that point to it stop working. In some situation, you cannot expand C even if you delete volume D, learn why Extend Volume grayed out in Server 2008.
To extend volume in Windows Server 2008 (R2), 3rd party partition software is better choice, here I recommend NIUBI Partition Editor Server, which integrates Roll-Back technology to ensure 100% data safety while resizing and extending disk partitions.