TECHNIG
Gateway for IT Experts and Tech Geeks

How to Manage Hard Disk using Diskpart Utility

Manage Hard disk with command line tools. Disk Partition Utility (Diskpart) is a command-line tool for managing hard disk in Windows operating system. Diskpart has replaced with fdisk command-line tool which work with MS-DOS based operating system.

Diskpart can be used on both command prompt and PowerShell. But, you must well understanding what you are doing when using Diskpart. It happened too many time for students which formatted the entire disk with one command. The last one was a Lap top with lots of memorial photos and videos. Fortunately we had recovered all data successfully. But takes too much time.

Manage Hard Disk With DiskPart Utility
Run Diskpart

To run the diskpart, press Windows+R button to open the Windows Run and type diskpart then press enter.

How to Create, Format a disk partition?

You may want to list installed hard disks of the system. Simply type ‘list disk’ then press enter.

List all disks
List all disks

So, in this PC we have tow hard disks. You must select the exact disk that you want to work with.

Select Hard Disk
Select Hard Disk

To select disk 1, just type ‘select disk 1’ and press enter, then type ‘list disk’ to see whether the disk has selected or not.

Clean Hard disk
Clean disk

Now clean the disk by ‘Clean’ command and create a partition with create partition command. ‘Create partition primary size=40000’ this command will create a 40 GB primary partition from disk 1.

Create a Primary Partition
Create a Primary Partition

To check the created partition type ‘List vol’ command. The command will list all volumes.

List all Hard disk Volumes
List all Hard disk Volumes

The Volume 3 is the newly created partition. It is selected and ready to format it.

Format a hard disk
Format a hard disk

Type ‘format fs=ntfs quick’ to format the partition, and type ‘list vol’ to see the formatted partition with NTFS file system.

Assign letter to a volume
Assign letter to a volume

Now you have learned creating, formatting and some diskpart commands.

How to Delete a Partition or Volume.

To delete a partition or volume, first select volume then type delete partition. Like below screenshot.

Delete a Partition with Command
Delete a Partition with Command

See, the partition ‘Volume 3’ has deleted successfully.

How to Extend a Partition?

Extend is to add some more space to existing partition from the free space of a hard disk. To do this, simply follow the screenshot.

Extend a Partition
Extend a Partition

The ‘Extend size=10000’ will add 10 GB to the Volume 3 partition. If you don’t mention the size, the system will add all free space.

How to Shrink a Partition?

Shrink a volume is to create unallocated space from free spaces of an existing partition.

Sharink a Partition
Sharink a Partition

The diskpart has shrunk 19 GB from the Volume 3 successfully.

1 Comment
  1. gjgbbn says

    although diskpart or disk management can help you manage partitions, both of them have limitations such as you can only extend partition when there is unallocated space contiguous behind to the partition you plan to extend, or the extend volume will gray out. I have been troubled by this problem, but i found third-party software that allows you avoid the problem.
    for more information:
    http://www.disk-partition.com/

Leave A Reply

Your email address will not be published.