Logo
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
EPL Standings
 
 
Windows 7

Managing Disks from the Command Prompt

3/12/2011 10:07:34 PM
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.


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:

  • 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.



Other -----------------
- Running Disk Management
- Decoding Hardware Errors
- Managing Installed Drivers
- Changing Settings for an Installed Device (part 2) - Viewing and Changing Resource Assignments
- Changing Settings for an Installed Device (part 1) - Adjusting Advanced Settings
- Advanced Performance Analysis Tools and Techniques
- Basic Strategies for Improving Performance (part 3) - Managing Startup Programs and Services
- Basic Strategies for Improving Performance (part 2) - Tuning and Troubleshooting SuperFetch & Using ReadyBoost to Compensate for a Slow Hard Disk
- Basic Strategies for Improving Performance (part 1)
- Setting Default Programs, File Type Associations, and AutoPlay Options (part 3)
- Setting Default Programs, File Type Associations, and AutoPlay Options (part 2) - Changing File Type Associations
- Setting Default Programs, File Type Associations, and AutoPlay Options (part 1) - Setting Default Programs
- Running a Program as an Administrator or Another User
- Managing Running Programs and Processes with Windows Task Manager
- Managing Startup Programs
- Configuring Legacy Devices
- Managing Devices with Device Stage
- Managing Devices with Devices And Printers
- Monitoring Performance in Real Time (part 2) - Using Resource Monitor
- Monitoring Performance in Real Time (part 1) - Using Windows Task Manager
 
 
Most view of day
- Microsoft Content Management Server Development : Validating Placeholder Controls - Validating the SingleAttachmentPlaceholderControl
- Administering an Exchange Server 2013 Environment (part 3) - Exchange Management Shell
- Windows Server 2012 : File Services and Storage - Configuring iSCSI storage (part 1) - Understanding iSCSI storage
- Workflow in Dynamics AX 2009 : Workflow Life Cycle (part 3) - Activating the Workflow
- Troubleshooting Hardware and Performance : First Aid for Troubleshooting Hardware
- Windows Phone 8 : Configuring Basic Device Settings - Date and Time (part 2) - Changing Time Zones, Using Military Time
- Microsoft Dynamics AX 2009 : Integration with Microsoft Office - Creating Excel files
- Microsoft Dynamics Ax 2009 : RunBase Framework Extension (part 1) - Property Method Pattern, Pack-Unpack Pattern
- Microsoft Systems Management Server 2003 : Analysis and Troubleshooting Tools - Using SMS Trace (part 1) - Obtaining SMS Trace
- Microsoft Dynamics CRM 4.0 : SharePoint Integration - Store Attachments in SharePoint Using a Custom Solution
Top 10
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 3) - Creating IPv4 DHCP Scopes
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 2) - Installing DHCP Server and Server Tools
- Windows Server 2012 : DHCP,IPv6 and IPAM - Exploring DHCP (part 1)
- Windows Server 2012 : DHCP,IPv6 and IPAM - Understanding the Components of an Enterprise Network
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 3) - Translating Text with the Mini Translator
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 2) - Translating a Word or Phrase with the Research Pane
- Microsoft OneNote 2010 : Using the Research and Translate Tools (part 1) - Setting Options for the Research Task Pane, Searching with the Research Task Pane
- Microsoft OneNote 2010 : Doing Research with Linked Notes (part 2) - Ending a Linked Notes Session, Viewing Linked Notes
- Microsoft OneNote 2010 : Doing Research with Linked Notes (part 1) - Beginning a Linked Notes Session
- Microsoft OneNote 2010 : Doing Research with Side Notes (part 3) - Moving Side Notes to Your Existing Notes
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro