Partition Diskpart – Create, Extend or Delete a Disk Partition

Administrators can use the Disk Partition Utility or Diskpart, a command-line tool designed as a disc management tool, for basic Windows Server disc operations.

Managers are able to search for newly added disc drives with Diskpart, but can also build, uninstall and resize partitions for hard drive drives and allocate or reassign letters for a drive.

How to Create a Partition Using Diskpart?

The partitioning of your disc with Diskpart is very helpful for increasing the I/O output of newly added hard drives in a RAID series. The materials for many server applications, including Microsoft Exchange Server, actually go as far as suggesting that your primary or extended partitions should be built using Diskpart. An extended partition can be used as the device partition; only for additional logical drive assignments will an extended partition be used.

Steps to create a partition:

  1. At a command prompt, type: Diskpart.exe
  2. At the DISKPART prompt, type: LIST DISK (Lists disks found. Make note of the drive number you wish to manipulate.)
  3. At the DISKPART prompt, type: Select Disk 1 (This selects the disk; make sure to type in the disk number from step two.)
  4. At the DISKPART prompt, type: CREATE PARTITION PRIMARY SIZE=10000
    (Change the word PRIMARY to EXTENDED to create an extended partition. If you do not set a size — in megabytes — such as the above example for 10 GB, then all available space on the disk will be used for the partition. Seriously consider adding the following option to the end of the above command if you are using RAID — especially RAID 5 — to improve disk I/O performance: ALIGN=64.)
  5. At the DISKPART prompt, type: ASSIGN LETTER=D (Choose a drive letter not already being used.)
  6. At the DISKPART prompt, type: Exit
  7. Use the Command Prompt format command, Disk Administrator or any disk format utility to format the drive — typically using NTFS, of course.

How to Extend a Partition Using Diskpart?

This approach is superior to configuring dynamic discs when adding space to a partition or volume. The newly added space is concatenated by dynamic disc extensions so that the disc Space is simply added to the end of the partition without restraining the data.
Concatenation isolates the partition’s output and does not provide a fault tolerance when the partition is set in a RAID array. Diskpart enables the current data to be limited. When the partition is set up in a RAID array, this is very advantageous, since the current partition data is distributed over all the drives in this array instead of simply adding new spaces, such as Disk Administrator.

Official Microsoft position is that to expand the device or boot partition you cannot use Diskpart. However, it suggests otherwise this tip for increasing your machine volume power.

Make sure you have a complete backup if you try it or some other form.

Steps To extend a partition:

  1. Verify that contiguous free space is available on the same drive and that free space is next to the partition you intend on extending, with no partitions in between.
  2. At a command prompt, type: Diskpart.exe
  3. At the DISKPART prompt, type: Select Disk 1 (Selects the disk.)
  4. At the DISKPART prompt, type: Select Volume 1 (Selects the volume.)
  5. At the DISKPART prompt, type: Extend Size=10000 (If you do not set size, such as the above example for 10 GB, then all available space on the disk will be used.)
  6. At the DISKPART prompt, type: Exit

It is not necessary, but I usually reboot the server to ensure all is nice from the start-up point of view.

How to Delete a Partition Using Diskpart?

You can’t uninstall an active device or boot partition or an active page file partition.

  1. At a command prompt, type: Diskpart.exe
  2. At the DISKPART prompt, type: Select Disk 1
  3. At the DISKPART prompt, type: Select Partition 1
  4. At the DISKPART prompt, type: DELETE partition
  5. At the DISKPART prompt, type: Exit

How to Format a Disk Using Diskpart?

All data on the disc is removed by this process.

  1. At a command prompt, type: Diskpart.exe
  2. At the DISKPART prompt, type: Select Disk 1
  3. At the DISKPART prompt, type: CLEAN ALL (The CLEAN ALL command removes all partition and volume information from the hard drive being focused on.)
  4. At the DISKPART prompt, type: Exit

Note:

There are four things that should be taken into consideration with respect to Diskpart.

1. Do not use DISKPART until you have taken a complete backup of your hard disk.
2. Use DISKPART on Dynamic Disks with caution.
3. Before using Diskpart, check your disk provider.
4. To use the Diskpart Tool, install the Windows Resource Pack.

Erick Miser

Erick Miser is a Senior Author of Read Us 24×7. He lives in the United States of America. He’s best known for Technical, business, and review Content Writing along with the proper knowledge base of SEO.