To use Diskpart, start by running Cmd.exe with
elevated privileges. You can do that by opening the Start menu and choosing All Programs,
Accessories. On the Accessories submenu, right-click Command Prompt,
choose Run As Administrator, and then reply to the User Account Control
(UAC) prompt.
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 here:
Even if you don't prefer
the command prompt 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 not 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.
Warning:
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. For more details about Diskpart, see Knowledge Base article
300415, "A Description of the Diskpart Command-Line Utility" (w7io.com/2501). Although this article dates from Windows XP days
and some of the comparisons it makes between Diskpart and the Disk
Management console are out of date, its tutorial information about the
syntax and usage of Diskpart is still accurate.
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:
Volume
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 Windows Explorer. A hard disk can have one, several,
or many 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 Windows Explorer.
Instead, it behaves as though it were a subfolder on another volume. Format
To format a
disk is to prepare it for storage 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 7 supports the following file systems: FAT (File
Allocation Table), NTFS (NT File System), CDFS (Compact Disc File
System, also sometimes identified as ISO-9660), and UDF (Universal Disk
Format). 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 2000 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). 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.
|