What's the DiskPart utility?

DiskPart is similar to the MS-DOS Fdisk utility, which lets you create and view partitions from the command line. However, DiskPart does much more than Fdisk. In addition, the DiskPart UI matches the graphical interface of the Microsoft Management Console (MMC) Disk Management snap-in.

DiskPart is part of the Win2K Server Resource Kit and the Win2K Professional Resource Kit. (Microsoft includes DiskPart as a core utility in Windows Server 2003 and Windows XP.) You can download the tool for free from Microsoft's web site

To run DiskPart, type

at the command prompt, then press Enter. Rather than relying on command-line execution, you actually run commands inside the DiskPart environment. When you're finished, type

to leave the DiskPart environment. For example, the screen might display

C:\Documents and Settings\john>diskpart

Microsoft DiskPart version 1.0
Copyright (C) 1999-2001 Microsoft Corporation.
On computer: TRINITY


Leaving DiskPart...

C:\Documents and Settings\john>
during a DiskPart session.


How can I use DiskPart to extend a volume?

You can use the DiskPart utility from the Windows 2000 Server Resource Kit or the Win2K Professional Resource kit to extend an existing volume by performing the following steps:

1.Download the DiskPart utility from the Microsoft web site , then install it on your computer.
2.Go to Start, Run, then type
3.to start a command-line session.
4.to start a DiskPart session.
list volume
to list the current volumes. The list will look like
Volume ### Ltr Label Fs Type Size Status Info
Volume 0 C NTFS Partition 10 GB Healthy System
Volume 1 D Data NTFS Partition 9 GB Healthy Pagefile
select volume <volume number>
6.to select the volume you want to extend.
to extend the selected volume. If you don't pass any parameters, DiskPart will use all unpartitioned space on the current disk. Alternatively, you can type
extent size=<size in MB> disk=<disk number>
7.to set a size and disk to use for the extension.
when you're finished.

You can extend only volumes created on a dynamic disk, not volumes created on a basic disk that you've upgraded. If you try to extend volumes created on a basic disk, you'll receive the error "DiskPart failed to extend the volume. Please make sure the volume is valid for extending."