Diskpart is an inbuilt command line tool that integrated from Windows XP. It has similar ability with Disk Management but work via command prompt. Comparing with Disk Management, Diskpart is faster and easier if you know disk partition structure and other information clearly, otherwise, you may be confused. The major problem is that diskpart has many restrictions when resizing Windows server partition. This article introduces how to extend volume in Server 2008 R2 with diskpart command.
How to extend partition with diskpart in Server 2008
Diskpart only displays single partitions with little parameters, furthermore, it doesn't display unallocated space which is required while extending a partition. To better understand how diskpart works to extend volume, I attached the screenshot of Disk Management as comparison.
Steps to extend volume with diskpart in Windows Server 2008 R2:
Step 1: Press Windows and R together on keyboard, type diskpart and press Enter, then diskpart command prompt will be opened.
Step 2: Type list volume and press Enter in the command prompt window, then you'll see all partitions in a list.
Step 3: Type select volume C and press Enter. "C" is drive letter or number of the volume that you want to extend. Before any operations to a disk partition, you must select and give focus to it.
Step 4: Type extend and press Enter. If you want to specify an amount, type extend size= (in MB).
If your disk partition configuration meet the requirements, it is very easy and fast to extend partition with diskpart in Windows Server 2008. But in most cases, diskpart cannot help you extend disk partitions.
Limitation of diskpart command to extend Server 2008 volume
Type help extend in diskpart command prompt, you'll see how extend command works, the syntax and the limitations.
There are 3 common restrictions in basic disk:
- Free (unallocated) space must be adjacent and on the right side of the partition that you want to expand.
- Free (unallocated) space and the partition must be on the same disk.
- This partition must be formatted as NTFS or without file system (RAW).
When I repeat to extend D: drive with diskpart, I receive error - The volume cannot be extended because the file system does not support it.
Drive D is formatted with FAT32, which is not supported, so Extend Volume is disabled in Disk Management, too.
I have combined the 10GB adjacent unallocated space to C drive with diskpart before, when I repeat without such space, I receive error - There is not enough usable free space on specified disk to extend volume. Disk Management is also grayed out for C: drive.
To extend partition with diskpart command in Windows Server 2008, you must delete the right contiguous partition first. In addition, the partition that you want to expand must be NTFS.
Better way to expand volume with partition editor
With server partition manager, there are no such restrictions. You just need to drag and drop on the disk map. Shrink a drive and make unallocated space on either side, this space can be combine to any contiguous or nonadjacent partition on the same disk.
Download NIUBI Partition Editor and follow the steps in the video to extend volume in Windows Server 2008:
The rule to resize partition with NIUBI:
- Right click a NTFS or FAT32 partition and select "Resize/Move Volume" in the list, if you drag either border towards the other side in the pop-up window, then you can shrink this partition.
- If you drag one border opposite to the other one, then you can extend this partition by merging contiguous unallocated space.
- If you drag the middle of this partition towards other side, then you can move this partition and adjacent unallocated space.
Besides shrinking, moving and extending partition, NIUBI Partition Editor helps do many other disk and partition management operations.