Some people like to use diskpart command line to manage disk partitions, so in this article, I want to introduce how to shrink partition with diskpart command line in Windows 2008 Server.
What is Diskpart
Dskpart is a command-line hard disk partitioning utility included in versions of the Windows NT operating system line from Windows 2000 onwards, replacing fdisk which was used in MS-DOS based operating systems.
How to run diskpart command
1. Press 'Windows' and 'R' key on the keyboard, type 'cmd' and click 'OK' or press 'Enter'.
MS-DOS command line window will be opened.
2. In the command line window, type diskpart and press 'Enter'.
In this diskpart command window, you can do many partition operations by type the command, such as list volume, select volume, extend volume etc.
How to shrink Windows 2008 partition with Diskpart command
To check whether diskpart command line works, I take a screenshot of Disk Management.
1. Type 'list volume' to list all disk partitions.
2. Type 'select volume' to give focus on the partition you want to shrink.
3. Type 'shrink' to shrink the partition.
When shrink a partition, you may add some parameters, such as 'desired='.
Check again in Disk Management. Yes, the partitions were shrank.
Supplement of Diskpart shrink Windows 2008 partition
- Complete command should be shrink [desired=<desiredsize>] [minimum=<minimumsize>]
- Shrink without a option diskpart will reclaim the maximum amount of space possible.
- [desired=<desiredsize>] option means how much space you want to shrink, size is in megabytes (MB).
- [minimum=<minimumsize>] option means shrink the space you specified if desiredsize is too large.
It is very easy to shrink Windows 2008 Server partition with diskpart command, but if you want to extend C: drive by shrinking D:, it is impossible. Because to extend a partition, there should be Unallocated space behind, by shrinking with Diskpart, the free Unallocated space is behind D rather than C.
So you cannot only create new partitions by shrinking a partition.
To extend C drive in Windows 2008 Server, you need third party partition software.
Related Articles
- Partition Manager for Windows 2008 Server
- Server 2008 partition software to manage disk partition
- How to resize Windows 2008 partition
- How to extend partition on Windows 2008 Server R2
- How to merge Windows 2008 partitions?