Sunday, May 24, 2009

Diskpart differs from many command-line

Diskpart differs from many command-line utilities because it does not operate in a single-line mode. Instead, after you start the utility, the commands are read from standard input/output (I/O). You can direct these commands to any disk, partition, or volume.
Back to the top
Comparison with Disk Management
Diskpart enables a superset of the actions that are supported by the Disk Management snap-in. The Disk Management snap-in prohibits you from inadvertently performing actions that may result in data loss. It is recommended that you use the Diskpart utility cautiously because Diskpart enables explicit control of partitions and volumes.

You can use Diskpart to convert a basic disk to a dynamic disk. The basic disk can either be empty or contain either primary partitions or logical drives. The basic disk can be a data disk or system or boot drive. The basic disk cannot have fault-tolerant disk driver (FtDisk) sets such as stripes or mirrors. To convert basic disks that have FtDisk driver sets, use Disk Management on Windows 2000 or convert the disk before you upgrade to Windows XP.

You can use Diskpart to convert a dynamic disk to a basic disk. You must delete any dynamic volumes before the conversion process. It is not recommended that you delete partitions on a dynamic disk except in emergency situations. It is recommended that you delete all volumes on the drive, and then convert the disk to basic. You must delete all dynamic data partitions. Also, never mix the basic primary and dynamic partitions on the same drive. If you do so, the computer may be unable to restart.

You can use Diskpart to create a partition at an explicit disk offset. The Disk Management snap-in places the partition at the end of any occupied area or on the first sufficiently large area. On master boot record (MBR) disks, the partition offset and the size are rounded to preserve the required cylinder alignment. Offsets are rounded to the closest valid value, and the size is always rounded up to the next valid value. Diskpart does not assign a drive letter to a newly created partition. Use the assign command to assign either a mount point or a drive letter.

Diskpart follows the same policy as the snap-in. Dynamic disks can only be created on fixed disks. You cannot convert removable disks, such as 1394 or universal serial bus (USB) drives, to dynamic disks.

Diskpart permits certain partition deletion operations that are blocked by the snap-in. For example, you can use Diskpart to delete MBR OEM partitions. However, these partitions often contain files that are important to the platform operation. Diskpart blocks the deletion of the current system, boot, or paging volumes and partitions. Also, Diskpart blocks deletion of the partitions that underlie dynamic disks.

You cannot use Diskpart to create a partition on removable media. Windows supports at most one MBR partition on removable media. If the media is manufactured with an MBR, that MBR cannot be altered, but the MBR is followed even if multiple partitions or logical drives are configured. If the media is manufactured without an MBR, the media is treated as a "superfloppy" and no partition structure is written to the media.

The drive letter for a removable drive is associated with the drive, and not with the media. You can use Diskpart to change the drive letter.

Diskpart causes disk signatures, GUID partition table (GPT) disk globally unique identifiers (GUIDs), and GPT partition GUIDs to be generated. You cannot explicitly set these items by using Diskpart.

The Diskpart utility (like the snap-in) includes support for the new Itanium disk partition scheme called GPT. You cannot use GPT disks on any x86-based Windows XP-based or Windows 2000-based computers. Diskpart enables the conversion of GPT partitioning to MBR partitioning only for empty disks.

You can use Diskpart to delete missing dynamic disks. Dynamic disks contain a shared database; all of the dynamic disks on a computer have knowledge of all other dynamic disks on that computer. When dynamic disks are moved, the original computer considers theses disks as "missing".

Drive letters are not automatically assigned when you use Diskpart. To ensure that a given partition or volume has a drive letter, you must explicitly assign a drive letter. You can either assign the drive letter or allow the next available drive letter to be allocated.

No comments: