Diskpart shrink volume in Windows Server 2008 R2

by John, Updated on: November 12, 2024

Diskpart is a command line tool integrated from Windows XP, it has many commands such as shrink, extend and convert. If you want to create new volume, you can shrink an allocated partition with Diskpart shrink command to release free space. However, because of many restrictions, diskpart is not the best tool to help resize server partition. This article introduces how to shrink volume in Server 2008 R2 with diskpart command.

How to shrink partition with diskpart in Server 2008

I'll explain the restrictions of diskpart in next section. Firstly, let's see how this inbuild tool works. 

Steps to shrink volume with diskpart in Windows Server 2008 R2:

Step 1: Press Windows and R together on the keyboard, type diskpart and click OK or press "Enter".

Open diskpart

Step 2: Type list volume and press Enter in the command prompt window. Then you'll see all single partitions with other information including file system, type, size and status.

Step 3: Type select volume C and press Enter. C is the drive letter or number of the volume that you want to shrink.

Step 4: Type shrink desired=10240 and press Enter. 10240 is the amount of space that I shrink from this partition (in MB). Replace with proper value in your server.

List volume

In a short while, diskpart report successfully shrunk the volume by 10GB.

Repeat from STEP 2 to shrink drive D, but diskpart report error - The volume cannot be shrunk because the file system does not support it.

Shrink error

Limitations to shrink volume with diskpart command

Type help shrink in diskpart command line window and press Enter, then you'll see what shrink command is used for, and the syntax on the top.

Shrink command

At the end, you'll see the restrictions of diskpart shrink command.

Diskpart shrink

Limitations of diskpart command to Server 2008 R2 partition:

Explanation about the last restriction: for example there is 25GB free space in system partition C, if there are "unmovable" files in this drive, you cannot shrink with desired 25GB (or even 20GB).

As I said in the beginning, you cannot extend a volume by shrinking other one with Diskpart command. This is because:

For example: after shrinking partition D with diskpart, unallocated space is produced on the right of D, so this space cannot be extended to the nonadjacent drive C or the right partition E.

There are same limitations while shrinking volume with Server 2008 Disk Management.

Better way than diskpart to shrink and extend partition

With server partition software, there are no such limitations. Comparing with Diskpart command tool, NIUBI Partition Editor is able to:

Download NIUBI Partition Editor and follow the steps in the video to shrink partition in Windows Server 2008 R2:

Video guide

Better than other third party tools, NIUBI Partition Editor provides innovative 1 Second Rollback, Virtual Mode, Cancel-at-will and Hot Clone technologies to protect system and data, advanced file-moving algorithm to help resize partition 30% to 300% faster.