This article introduces how to extend system C drive with diskpart command prompt, and the limitations to extend volume/partition with diskpart on Windows Server 2019.
The same with all previous versions, system C drive is running out of space on Windows Server 2019. You'd better expand C drive before it becomes full, otherwise, you'll encounter many problem such as server stuck and reboot unexpectedly. To extend partition on Windows Server 2019, there's a native tool - diskpart, which runs via command prompt. However, it is not recommended because of many limitations, it only works under particular condition.
How to extend system C drive with diskpart on Windows Server 2019
To extend partition with diskpart on Windows Server 2019, your disk partition must meet all requirements below:
- The partition that you want to extend must be formatted with NTFS file system. (It is not an issue to system partition C.)
- There must be another partition (such as D:) on the right side and on the same hard disk.
- You must delete the right contiguous partition before expanding C drive. (Don't do this if you installed programs in this volume.)
Follow the steps to extend C drive (system partition) with diskpart on Windows Server 2019:
- Press Windows and R together on your keyboard, type diskpart and press Enter.
- Type list volume in diskpart.exe command prompt and press Enter.
- Type select volume D and press Enter.
- Type delete volume and press Enter.
- Type select volume C and press Enter.
- Type extend and press Enter.
Immediately, diskpart reports successfully extended the volume. Run list volume again, C drive is extended from 40GB to 110GB.
- Steps 2 is not required, but it displays the initial partition size and other information, so it's helpful.
- Before you delete, shrink or extend a partition, you must select it to give focus.
- If you want to extend part of Unallocated space to C drive, type extend size=XX (XX is a value in but without MB) in Step 6.
Shortages to extend partition volume with diskpart command prompt
1. Unallocated space must be contiguous and on the right side
Type help extend in diskpart command prompt window, you'll see the syntax and limitation of extend command.
As you see, the free (Unallocated) space must be on the same disk and immediately follow the volume or partition with focus. If you shrink D to expand C drive with diskpart, you'll receive error "The size of the extend is less than the minimum". In fact, this error message is not accurate, maybe it's easier to understand if change the error message to "There's no contiguous free space".
After you shrink D drive with Diskpart shrink command, Unallocated space is generated on the right of D drive, so it is non-adjacent to C drive. Shrink command cannot make Unallocated space on the left side. This is the reason why you should delete the right contiguous drive (D:) before extending C drive with diskpart in Windows Server 2019.
2. Only NTFS partitions can be extended
As the screenshot shows above, diskpart extend command only supports NTFS partition, FAT32 and any other types of partitions can't be extended.
3. Lack of significant information
Diskpart command prompt only show you all partitions in a list with little information. If you open Server 2019 Disk Management, you'll see all disks with partition structure and other information such as used and free space of each partition. So you'll see clearly which partitions are on the same disk and how much free space can be shrank from and extended to other volume. However, Disk Management has same restrictions when shrinking and extending partitions.
Better way to shrink and extend partition on Windows Server 2019
Comparing with diskpart command and Disk Management, disk partition software is much easier and more powerful. You just need to drag and drop on the disk map to shrink and extend partition without deleting.
Download NIUBI Partition Editor and follow the steps to shrink and extend partition in Windows Server 2019:
Better than other disk partition software, NIUBI Partition Editor is much safer and faster because of the advanced technologies:
- Virtual Mode - all operations will be listed as pending for preview, real disk partitions won't be changed until click Apply to confirm.
- Cancel-at-well - if you applied incorrect operations, it doesn't matter, you can cancel the ongoing operations without causing damage.
- 1-Second Rollback - if anything goes wrong while resizing partition, it automatically reverts server to original status in a flash. If it happens, your server could back online rapidly without modification.
- It is 30% to 300% faster because of the advanced file-moving algorithm.
Besides shrinking and extending partitions, it helps do many other operations such as move, merge, convert, copy, defrag, hide, wipe, scan bad sectors.