Creating and Managing Simple Volumes

 < Day Day Up > 



With dynamic disks, you can use DiskPart to create simple volumes, which is the most basic type of dynamic volume. Unlike partitions, a simple volume can fill an entire disk, or you can size a simple volume as appropriate for the computer you’re configuring.

Creating Simple Volumes

Before you add a simple volume to a disk, you should assess the amount of free space on the disk and also check the current volume configuration. Follow these steps to perform these tasks:

  1. Invoke DiskPart by typing diskpart at the command prompt.

  2. List the disks on the computer and check the free space, as follows:

    DISKPART> list disk

    Disk ### Status Size Free Dyn Gpt
    -------- ---------- ------- ------- --- ---
    Disk 0 Online 72 GB 0 B
    Disk 1 Online 29 GB 20 GB *
    Disk 2 Online 37 GB 37 GB *

In this example, Disk 1 and Disk 2 are formatted as dynamic disks (denoted by the asterisk in the Dyn column) using MBR partitioning (denoted by a blank entry in the Gpt column). Disk 1 has 20 gigabytes (GB) of free space and Disk 2 has 37 GB of free space available.

Once you identify the disk you want to work with, you can create the simple volume using the command

create volume simple size=N disk=N 

where size=N sets the size of the volume in megabytes (MB) and disk=N specifies the disk you want to work with.

After you create the volume, the volume will automatically have focus, meaning it will be selected. The volume will not yet have a drive letter or mount point. You must use the ASSIGN command to do this. Then to finalize the partition, you must also format it using the FORMAT command, which is a standard Windows external command, not a DiskPart subcommand. These tasks are performed in the same way for volumes and partitions. See the sections of Chapter 9, “Partitioning Basic Disks,” titled “Assigning Drive Letters or Mount Points” and “Formatting Partitions,” respectively.

Extending Simple Volumes

If you find that you need more space on a simple volume, you can extend it in two ways: First, you can extend a simple volume within the same disk, creating what is called an extended volume. Or you can extend a simple volume onto other disks, creating what is called a spanned volume. In either case, the volume must be formatted as NTFS.

The steps you follow to extend a simple volume are as follows:

  1. Invoke DiskPart by typing diskpart at the command prompt.

  2. List the disks on the computer and check the free space, as follows:

    DISKPART> list disk
  3. Lists the volumes on the computer, as follows:

    DISKPART> list volume
  4. Select the volume you want to extend, such as volume 5:

    DISKPART> select volume 5
  5. Extend the volume.

    • To extend the volume on the current disk, use the following command:

    DISKPART> extend size=N disk=N

    where size=N is the amount of space to add in megabytes and disk=N is the disk on which the volume is currently located. For example, if the volume were on disk 2, you could extend it by 1004 MB using the command

    DISKPART> extend size=1004 disk=2
    Note

    The size is rounded to the nearest cylinder boundary, which typically results in a slightly larger or smaller disk space being added.

    • To extend the volume onto another dynamic disk, use the following command:\

    DISKPART> extend size=N disk=N 

    where size=N is the amount of space to add in megabytes and disk=N sets the disk onto which the volume should be extended. For example, if the volume were on disk 0 and you wanted to extend it onto disk 1, you could use the command

    DISKPART> extend size=2008 disk=1

    Here, you extend disk 0 onto disk 1. The size of the extended area on disk 1 is 2008 MB.

    Caution

    When extending volume sets, there are many things you cannot do. You can’t extend boot or system volumes. You can’t extend volumes that use mirroring or striping. You can’t extend a volume onto more than 32 disks, either. Additionally, you can’t extend FAT or FAT32 volumes; you must first convert them to NTFS.

Bringing Dynamic Disks Online

Dynamic disks are much more versatile than basic disks. You can easily resolve errors and return drives that have gone offline to service. You can also check for drive configuration changes and import disks moved from one computer to another.

As discussed in Chapter 8, “Configuring and Maintaining Hard Disk Drives,” the LIST DISK command shows the status of each disk available on a system. If the status of a dynamic disk displays as Online (Errors) or Offline, you can often use the ONLINE command to correct the problem. Using DiskPart, simply designate the disk you want to work with, such as by typing select disk 0, and then by typing online. If the drive status doesn’t change, you might need to reboot the computer. If a reboot still doesn’t resolve the problem, check the drive, its controller, cables, and power supply to make sure everything is connected properly. ONLINE also resynchronizes mirrored or RAID-5 volumes.

If the drive configuration has changed or a disk has been added to the computer, you can use the RESCAN command to rescan all drives on the computer and to check for updates to the drive configuration. A rescan can sometimes resolve a problem with drives that show a status of Unreadable.

If you moved a dynamic disk from one computer to another, the disk might be marked as Foreign. A disk can also be marked as Foreign if it failed and you brought it back online. To bring the disk online using DiskPart, select the disk you want to work with, by typing select disk 0 for example, and then typing import.

Deleting Volumes

You should not use the DELETE PARTITION command on a dynamic disk, because this could delete all the dynamic volumes on the disk. If you want to delete a volume with focus on a dynamic disk, use the DELETE VOLUME command. As with DELETE PARTITION, you cannot use this command to delete the system or boot volume, or any volume that contains the active paging file or crash dump (memory dump).

To see how DELETE VOLUME is used, consider the following example:

  1. Invoke DiskPart by typing diskpart at the command prompt.

  2. List the volumes on the computer, as follows:

    DISKPART> list volume
  3. Select the volume to delete and then delete it as follows:

    DISKPART> select volume 5 DISKPART> delete volume 
More Info

By default, DiskPart allows you to delete only known data volumes. As with partitions, you can override this behavior by adding the Override parameter to the DELETE VOLUME command.



 < Day Day Up > 



Microsoft Windows Command-Line Administrator's Pocket Consultant
MicrosoftВ® WindowsВ® Command-Line Administrators Pocket Consultant
ISBN: 0735620385
EAN: 2147483647
Year: 2004
Pages: 114

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net