Extend primary partition Windows Server 2008/2012/2016/2019

by John, Updated on: November 10, 2024

This article introduces how to resize and extend primary partition in Windows Server 2008/2012/2016/2019 without losing data.

GPT and MBR are common disk type in both Windows PC and server. Primary partition is common partition type in both GPT and MBR disk, NTFS and FAT32 are common file system for both primary and logical partition.

Difference of MBR and GPT disk:

Is there any difference when resizing primary and logical partition in Windows Server?

1. Resize primary partition with diskpart for Windows server

Diskpart is a command line tool that runs in Windows or from Preinstallation Environment (Windows PE). It is included from old Windows XP. This Windows native tool can only shrink and extend NTFS partition, other types of partitions are not supported.

How to resize primary partition in Windows Server 2008/2012/2016/2019 with diskpart:

  1. Press Windows and R together on the keyboard, type diskpart and press Enter.
  2. Input list volume and press Enter in the command prompt window. Then you'll see all partitions in a list.
  3. Input select volume D and press Enter. D is drive letter or number of the volume that you want to shrink.
  4. Input shrink desired=10240 and press Enter. 10240 is the amount of space that you want to shrink from this partition (in MB).

List volume

  1. Input list volume and press Enter in the command prompt window.
  2. Input select volume D and press Enter. (D is the right adjacent drive.)
  3. Input delete volume and press Enter.
  4. Input select volume C and press Enter. (C is the partition that you want to extend.)
  5. Input extend and press Enter.

Diskpart extend

There's no difference to resize a logical partition, the problem is that you cannot extend a partition by shrinking another one. Because, the unallocated space that shrunk from D is non adjacent to C drive, so extend command cannot add this space into C drive. To extend a partition (such as C:) with diskpart, you must delete the contiguous partition on the right (such as D:). D drive could be either primary or logical.

2. Extend primary partition with Disk Management

Disk Management has graphical interface, it has new "Shrink Volume" and Extend Volume function to help repartition hard drive. The same with diskpart cmd, before extending a partition with Disk Management, you must delete the right contiguous partition in advance.

Cant extend C

As you see in the screenshot, Extend Volume is disabled for C: drive, because:

There is an additional limitation while extending primary partition with Server 2008 Disk Management.

Extend volume disabled

As you see in the screenshot, the 70GB Free space is deleting from drive D, Extend Volume option is still disabled for C drive. This is because:

Unlike primary partition, logical drive will be changed to "Free space" after deleting. It is still part of the Extended partition. Free space can't be extended to any primary partition. Likewise, unallocated space deleted from primary partition can't be extended to any logical drive.

To extend primary partition in Windows Server 2008 R2/2012/2016/2019 with Disk Management, your disk partition structure must meet the requirements below:

  1. This primary partition must be formatted with NTFS file system.
  2. There is another primary partition on the right and on the same disk.
  3. There's no programs installed in the primary partition on the right, so you can delete it to get adjacent unallocated space.

In general, server administrators want to extend C drive, this partition is always primary. Therefore, if you want to extend primary partition C in Server 2008 Disk Management, the contiguous partition D must be primary, too. Before deleting this partition to get contiguous unallocated space, make sure there are no programs or Windows services installed in it.

3. Better way to resize and extend primary partition

Third party software is more much more powerful to resize and extend partitions for Windows 2008 server.

You can resize primary and logical partition without deleting any other one. Operating System, programs and anything else keep the same with before. There are many partition manager for Windows Server 2008, but you'd better make a backup first and run the safest, because there's potential data loss risk with unreliable software. Better than other tools, NIUBI Partition Editor has powerful technologies to protect system and data:

Download NIUBI Partition Editor and follow the steps in the video to resize and extend primary partition in Windows Server 2008 R2 and other versions:

Video guide

To NIUBI Partition Editor, there's no difference to resize NTFS or FAT32 partition, primary or logical partition, you just need to drag and drop on the disk map.

Beside shrinking and extending partitions, it helps you do many other operations such as copy, merge, convert, defrag, hide, wipe, scan partition, etc.