Windows 10 Disk-Management Tools
The principal disk-management tool in Windows 10 is the Disk Management console (Diskmgmt.msc). For those who need to incorporate disk-management tasks in scripts (as well as for those who simply prefer carrying out administrative tasks at the command prompt), Windows also provides a powerful command-line program called DiskPart. Everything you can do with Disk Management you can also do by using DiskPart; you just have to work harder and more carefully. Accessing Windows Management Instrumentation (WMI) through Windows PowerShell provides another method for managing disks. This method offers capabilities that are not available with the Disk Management console or DiskPart, and it has the additional advantage of custom programmability, which can be useful when you need to perform disk-management operations repeatedly on different computers.
Knowing when to use which tool is the secret of disk wizardry in Windows 10. Disk Management, for example, is ideal for shrinking and expanding volumes, while the Clean command in DiskPart makes short work of preparing a disk to be formatted for a new role. That command has no counterpart in Disk Management.
Running Disk Management
To run Disk Management, type diskmgmt.msc at a command prompt, or press Windows key+X and then click Disk Management. You need administrative credentials to run Disk Management. Figure below illustrates the Disk Management console.
Use the Disk Management console to gather information about and manage hard disks and removable disks.
Disk Management provides a wealth of information about physical disks and the volumes, partitions, and logical drives in place on those disks. You can use this utility to perform the following disk-related tasks:
- Check the size, file system, status, and other properties of disks and volumes
- Create, format, and delete partitions, logical drives, and dynamic volumes
- Assign drive letters to hard disk volumes, removable disk drives, and optical drives
- Create mounted drives
- Convert basic disks to dynamic disks and vice versa
- Create spanned and striped volumes
- Extend or shrink partitions
Disk Management displays information in two panes. In its default arrangement, the upper pane lists each volume on your system and provides information about the volume's type, status, capacity, available free space, and so on. You can carry out commands on a volume by right-clicking in the first column of this pane (the column labeled Volume) and choosing a command.
In the lower pane, each row represents one physical device. In the headings at the left of each row, you see the name by which the device is known to the operating system (Disk 0, Disk 1, and so on), along with its type, size, and status. To the right are areas that display information about the volumes of each device. Note that these areas are not by default drawn to scale. To change the scaling used by Disk Management, click View, then Settings. You'll find various options on the Scaling tab of the Settings dialog box.
Right-clicking a heading at the left in the lower pane displays commands pertinent to an entire storage device. Right-clicking an area representing a volume provides a menu of actions applicable to that volume.
Managing disks from the command prompt
To use DiskPart, start by running Cmd.exe with elevated privileges. You can do that by pressing Windows key+X and then clicking Command Prompt (Admin).
When you run DiskPart, it opens a console window and dumps you at the DISKPART> prompt. If you type help and press Enter, you see a screen that lists all available commands, like the one shown next.
Even if you don't prefer the command line and don't intend to write disk-management scripts, you should know about DiskPart because, if you ever find yourself needing to manage hard disks from the Windows Recovery Environment (Windows RE), you will have access to DiskPart but you won't have access to the Disk Management console. (Windows RE is a special environment that you can use for system-recovery purposes if a major hardware or software problem prevents you from starting Windows.)
Windows also includes a second command-line tool for file-system and disk management, called Fsutil. This utility allows you to find files by security identifier (SID), change the short name of a file, and perform other esoteric tasks.
Fsutil and DiskPart are not for the faint of heart or casual experimentation. Both are intended primarily to be incorporated into scripts rather than for interactive use. DiskPart in particular is dense and cryptic, with a complex structure that requires you to list and select objects before you act on them.
Understanding disk-management terminology
The current version of Disk Management has simplified somewhat the arcane language of disk administration. Nevertheless, it's still important to have a bit of the vocabulary under your belt. The following terms and concepts are the most important:
A volume is a disk or subdivision of a disk that is formatted and available for storage. If a volume is assigned a drive letter, it appears as a separate entity in File Explorer. A hard disk can have one or more volumes.
- Mounted drive
A mounted drive is a volume that is mapped to an empty folder on an NTFS-formatted disk. A mounted drive does not get a drive letter and does not appear separately in File Explorer. Instead, it behaves as though it were a subfolder on another volume.
To format a disk is to prepare it for storage by using a particular file system (such as NTFS).
- File system
A file system is a method for organizing folders (directories) and files on a storage medium. Windows 10 supports the following file systems: FAT (File Allocation Table), NTFS, exFAT (Extended File Allocation Table; optimized for use with flash drives), CDFS (Compact Disc File System; also sometimes identified as ISO-9660), and UDF (Universal Disk Format). Windows 10 does not currently support the new Resilient File System (ReFS, for short) but this support is likely to arrive in a future update.
- Basic disk and dynamic disk
The two principal types of hard-disk organization in Windows are called basic and dynamic:
- A basic disk can be subdivided into as many as four partitions. (Disks that have been initialized using a GUID Partition Table can have more than four.) All volumes on a basic disk must be simple volumes. When you use Disk Management to create new simple volumes, the first three partitions it creates are primary partitions. The fourth is created as an extended partition using all remaining unallocated space on the disk. An extended partition can be organized into as many as 2,000 logical disks. In use, a logical disk behaves exactly like a primary partition.
- A dynamic disk offers organizational options not available on a basic disk. In addition to simple volumes, dynamic disks can contain spanned or striped volumes. These last two volume types combine space from multiple disks.
- Simple volume
A simple volume is a volume contained entirely within a single physical device. On a basic disk, a simple volume is also known as a partition.
- Spanned volume
A spanned volume is a volume that combines space from physically separate disks, making the combination appear and function as though it were a single storage medium.
- Striped volume
A striped volume is a volume in which data is stored in 64-KB strips across physically separate disks to improve performance.
- MBR and GPT disks
MBR (master boot record) and GPT (GUID Partition Table) are terms describing alternative methods for maintaining the information regarding a disk's subdivisions. GPT disks support larger volumes (up to 18 exabytes) and more partitions (as many as 128 on a basic disk). You can convert a disk from MBR to GPT (or vice versa) only before a disk has been partitioned for the first time (or after all partitions have been removed). GPT is required on drives that contain the Windows partition on UEFI-based systems.
- Active partition, boot partition, and system partition
The active partition is the one from which an x86-based computer starts after you power it up. The first physical hard disk attached to the system (Disk 0) must include an active partition. The boot partition is the partition where the Windows system files are located. The system partition is the partition that contains the bootstrap files that Windows uses to start your system and display the boot menu.