Configuring Storage

When you install disks, you must configure them for use by choosing a partition style and a storage type to use. After you configure drives, you prepare them to store data by partitioning them and creating file systems in the partitions. Partitions are sections of physical drives that function as if they were separate units. This allows you to configure multiple logical disk units even if a system has only one physical drive and to apportion disks appropriately to meet the needs of your organization.

Using the Disk Management Tools

When you want to manage storage, the primary tool you use is Disk Management, as shown in Figure 19-3. Disk Management is a snap-in included in Computer Management and can be added to any custom MMC you create. As long as you are a member of the Administrators group, you can use Disk Management to configure drives and software RAID.

Disk Management is the primary tool for managing storage

Figure 19-3. Disk Management is the primary tool for managing storage

Disk Management makes it easy to work with any available internal and external drives on both local and remote systems. You can start Disk Management by clicking Start, pointing to Programs or All Programs as appropriate, selecting Administrative Tools, Computer Management. You're automatically connected to the local computer on which you're running Computer Management. In Computer Management, expand Storage, and then select Disk Management. You can now manage the drives on the local system.

To use Disk Management to work with a remote system, right-click the Computer Management entry in the left pane, and select Connect To Another Computer on the shortcut menu. This displays the Select Computer dialog box (shown in the following screen). Type the domain name or IP address of the system whose drives you want to view, and then click OK.

image with no caption

Disk Management has three views:

  • Disk List Shows a list of physical disks on or attached to the selected system with details on type, capacity, unallocated space, and status. It is the only disk view that shows the device type, such as Small Computer System Interface (SCSI) or Integrated Device Electronics (IDE), and the partition style, such as Master Boot Record (MBR) or GUID Partition Table (GPT).

  • Graphical View Displays summary information for disks graphically according to disk capacity and the size of disk regions. By default, disk and disk region capacity are shown on a logarithmic scale, meaning the disks and disk regions are displayed proportionally.

    Note

    Change the scaling options to get different disk views

    You can also specify that you want all disks to be the same size regardless of capacity (which is useful if you have many disk regions on disks) or that you want to use a linear scale in which disk regions are sized relative to the largest disk (which is useful if you want to get perspective on capacity). To change the size settings for the Graphical View, click View, Settings, and then in the Settings dialog box, select the Scaling tab.

  • Volume List Shows all volumes on the selected computer (including hard disk partitions and logical drives) with details on volume layout, type, file system, status, capacity, and free space. It also shows whether the volume has fault tolerance and the related disk usage overhead. The fault tolerance information is for software RAID only.

Volume List and Graphical View are the default views. In Figure 19-3, the Volume List view is in the upper-right corner, and the Graphical View is in the lower-right corner. To change the top view, select View, choose Top, and then select the view you want to use. To change the bottom view, select View, choose Bottom, and then select the view you want to use.

Disk Management's command-line counterpart is the DiskPart utility. You can use DiskPart to perform all Disk Management tasks with the exception of formatting partitions, logical drives, and volumes. To format partitions, logical drives, and volumes from the command line, you use the FORMAT command, as discussed in the section entitled "Formatting a Partition, Logical Drive, or Volume" later in this chapter. DiskPart can also perform some tasks that Disk Management can't, such as configuring automount settings and extending disk partitions on basic disks.

DiskPart is a text-mode command interpreter that you invoke so that you can manage disks, partitions, and volumes. As such, DiskPart has a separate command prompt and its own internal commands. You invoke the DiskPart interpreter by typing diskpart at the command prompt. DiskPart is designed to work with physical hard disks installed on a computer, which can be internal, external, or a mix of both. Although it will list other types of disks, such as CD/DVD drives, removable media, and universal serial bus (USB)–connected flash random access memory (RAM) devices, and allow you to perform some minimal tasks, such as assigning a drive letter, these devices are not supported.

After you invoke DiskPart, you can list available disks, partitions, and volumes by using the following list commands:

  • LIST DISK Lists all internal and external hard disks on the computer

  • LIST VOLUME Lists all volumes on the computer (including hard disk partitions and logical drives)

  • LIST PARTITION Lists partitions, but only on the disk you've selected

Then you must give focus to the disk, partition, or volume you want to work with by selecting it. Giving a disk, partition, or volume focus ensures that any commands you type will act only on that disk, partition, or volume. To select a disk, type select disk N, where N is the number of the disk you want to work with. To select a volume, type select volume N, where N is the number of the volume you want to work with. To select a partition, first select its related disk by typing select disk N, and then select the partition you want to work with by typing select partition N.

If you use the list commands again after selecting a disk, partition, or volume, you'll see an asterisk (*) next to the item with focus. When you are finished working with DiskPart, type exit at the DiskPart prompt to return to the standard command line.

Example 19-1 shows a sample DiskPart session. As you can see, when you first invoke DiskPart, it shows the operating system and DiskPart version you are using as well as the name of the computer you are working with. When you list available disks, the output shows you the disk number, status, size, and free space. It also shows the disk partition style and type. If there's an asterisk in the Dyn column, the disk is a dynamic disk. Otherwise, it is a basic disk. If there's an asterisk in the Gpt column, the disk uses the GPT partition style. Otherwise, it is an MBR disk. You'll find more information on partition styles in the section entitled "Using the MBR and GPT Partition Styles" later in this chapter.

Example 19-1. Using DiskPart: An Example

Microsoft DiskPart version 5.2.3790
Copyright (C) 1999-2001 Microsoft Corporation.
On computer: CORPSVR02

DISKPART> list disk

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

DISKPART> list volume

  Volume ###     Ltr      Label       Fs      Type          Size       Status   Info
  ----------     ---      ---------       -----   ---------      --------------      -------
  Volume 0       F                            DVD-ROM         0 B
  Volume 1       G      W2PFPP_EN     CDFS    CD-ROM        361 MB
  Volume 2       C      Apps          NTFS    Partition      56 GB   Healthy      System
  Volume 3       D      Data          NTFS    Partition      29 GB   Healthy
  Volume 4       N      Data2         NTFS    Partition      28 GB   Healthy
  Volume 5       S                            Partition      47 MB   Healthy

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART>     list partition

  Partition ###         Type                  Size          Offset
  -------------         ----------------       -------      -------
  Partition 1           Primary               56 GB         32 KB

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART>     list partition

  Partition ###         Type                  Size          Offset
  -------------         ----------------       --------     ------
* Partition 1           Primary               56 GB         32 KB

DISKPART> exit

Leaving DiskPart...

C:>

Adding New Disks

Thanks to hot swapping and Plug and Play technologies—both supported by Windows Server 2003—the process of adding new disks has changed considerably from the days of Windows NT 4. If a computer supports hot swapping of disks, you can install new disks without having to shut down the computer. Simply insert the hard disk drives you want to use. If the computer doesn't support hot swapping, you will need to shut down the computer, insert the drives, and restart the computer.

Either way, after you insert the drives you want to use, log on and access Disk Management in the Computer Management tool. If the new drives have already been initialized, meaning they have disk signatures, they should be brought online automatically when you select Rescan Disks from the Action menu. If you are working with new drives that haven't been initialized, meaning they lack a disk signature, Windows Server 2003 will start the Initialize And Convert Disk Wizard when you select the Disk Management node in the Computer Management tool. As the name implies, this wizard initializes the disks you've added and allows you to convert them to dynamic disks.

When the Initialize And Convert Disk Wizard starts, follow these steps to configure the disks:

  1. Click Next to get to the Select Disks To Initialize page. The disks you added are selected for initialization automatically, but if you don't want to initialize a particular disk, you can clear the related option.

  2. Click Next to display the Select Disks To Convert page. The new disks aren't selected by default. Select the disks you want to convert to dynamic disks (if any), and then click Next.

  3. The final page shows you the options you've selected and the actions that will be performed on each disk. If the options are correct, click Finish. The wizard then performs the designated actions. If you've elected to initialize a disk, the wizard writes a disk signature to the disk. If you've elected to convert a disk, the wizard converts the disk to a dynamic disk after writing the disk signature.

  4. When the wizard finishes, the disk is ready for partitioning and formatting.

Using the MBR and GPT Partition Styles

The term partition style refers to the method that Windows Server 2003 uses to organize partitions on a disk. Two partition styles are available: MBR and GPT. The partition style you use really depends on whether the computer is an x86-based computer or an Itanium-based computer. x86-based computers can use only the MBR partition style. Itanium-based computers running 64-bit versions of Windows can use the MBR partition style as well as the GPT partition style. The GPT partition style is preferred, however, because it is optimized for 64-bit versions of Windows and is the only partition style from which you can boot Itaniumbased computers. The key difference between the MBR partition style and the GPT partition style has to do with how partition data is stored.

Note

For this discussion, I focus on the basic storage type and won't get into the details of the dynamic storage type. That's covered in the next section.

Working with MBR Disks

MBR uses a partition table that describes where the partitions are located on the disk. The first sector on a hard disk contains the MBR and a master boot code that's used to boot the system. The boot sector is unpartitioned and hidden from view to protect the system.

MBR disks support a maximum volume size of up to 4 TB unless they're dynamic disks and use RAID. MBR disks have two special types of partitions associated with them. The first partition type, called a primary partition, is used with drive sections that you want to access directly for file storage. You make a primary partition accessible to users by creating a file system on it and assigning it a drive letter or mount point. The second partition type, called an extended partition, is used when you want to divide a section of a disk into one or more logical units called logical drives. Here, you create the extended partition first, then create the logical drives within it. You then create a file system on each logical drive and assign a drive letter or mount point.

Each MBR drive can have up to four primary partitions or three primary partitions and one extended partition. It is the extended partition that allows you to divide a drive into more than four parts.

Note

These rules apply to MBR disks that use the basic storage type. There's also a storage type called dynamic. I discuss basic and dynamic storage types in the section entitled "Using the Basic and Dynamic Storage Types" later in this chapter.

Working with GPT Disks on 64-Bit Windows Editions

Instead of using BIOS, Itanium-based computers use the Extensible Firmware Interface (EFI). EFI acts as the interface between a computer's hardware and its operating system. It also defines the GPT style. GPT disks don't have a single MBR. With GPT disks, critical partition data is stored in the individual partitions, and there are redundant primary and backup partition tables. Further, checksum fields are maintained to allow for error correction and to improve partition structure integrity.

GPT disks support partitions of up to 18 exabytes (EB) and up to 128 partitions per disk. Itanium-based computers using GPT disks have two required partitions and one or more optional original equipment manufacturer (OEM) or data partitions. The required partitions are the EFI system partition (ESP) and the Microsoft Reserved (MSR) partition.

Although the optional partitions that you see depend on the system configuration, the optional partition type you see the most is the primary partition. Primary partitions are used to store user data on GPT disks.

If you install Windows Server 2003 64-bit edition on a new system with clean disks or an existing system with a clean disk, Setup will initialize the disk as a GPT disk. Setup will offer to create the ESP and then will automatically create the MSR partition. The ESP is formatted automatically using file allocation table (FAT). The ESP is required only on the first GPT disk, however. Additional GPT disks do not require an ESP. Further, a basic GPT disk might not contain primary partitions. For example, when you install a new disk and configure it as a GPT disk, the Windows operating system automatically creates the ESP and MSR partition, but does not create primary partitions.

Although GPT offers a significant improvement over MBR, it does have limitations. First, as discussed previously, only Itanium-based computers can have local disks formatted using GPT. You cannot use GPT with removable disks, disks that are direct-attached using USB or IEEE 1394 (FireWire) interfaces, or disks attached to shared storage devices on server clusters.

Caution

It is recommended that you don't use disk editing tools such as DiskProbe to make changes to GPT disks. Any change that you make using these tools renders the CRC32 checksums in the GPT headers invalid, and this can cause the disk to become inaccessible. To make changes to GPT disks, you should use only Disk Management or DiskPart. If you are working in the firmware environment, you'll find there's a version of DiskPart available as well—DiskPart.efi.

Using and Converting MBR and GPT Disks

Tasks for using MBR and GPT disks are similar but not necessarily identical. On an x86-based computer, you can use only MBR disks. On an Itanium-based computer, you can have both GPT and MBR disks, but you must have at least one GPT disk that contains the ESP and a primary partition or simple volume that contains the operating system.

Partitions and volumes on MBR and GPT disks can be formatted using FAT, FAT32, and NTFS. When you create partitions or volumes in Disk Management, you have the opportunity to format the disk and assign it a drive letter or mount point as part of the volume creation process. Although Disk Management lets you format the partitions and volumes on MBR disks using FAT, FAT32, and NTFS, you can format partitions and volumes on GPT disks using only NTFS. If you want to format GPT disks by using FAT or FAT32, you must use the FORMAT command at the command prompt.

You can change partition table styles from MBR to GPT or from GPT to MBR. Changing partition table styles is useful when you want to move disks between x86-based computers and Intel Architecture 64 (IA-64)–based computers or you receive new disks that are formatted for the wrong partition table style. You can convert partition table styles only on empty disks, however. This means the disks must either be new or newly formatted. You could, of course, empty a disk by removing its partitions or volumes.

Both Disk Management and DiskPart can be used to change the partition table style. To use Disk Management to change the partition style of an empty disk, start Computer Management from the Administrative Tools menu or by typing compmgmt.msc at the command line, expand the Storage node, and then select Disk Management. All available disks are displayed. Right-click the disk to convert in the Graphical View, and then click Convert To GPT Disk or Convert To MBR Disk as appropriate.

To use DiskPart to change the partition style of an empty disk, invoke DiskPart by typing diskpart, and then select the disk you want to convert. For example, if you want to convert disk 3, type select disk 3. Once the disk is selected, you can convert it from MBR to GPT by typing convert gpt. To convert a disk from GPT to MBR, type convert mbr.

Using the Basic and Dynamic Storage Types

The term storage type refers to the method that Windows Server 2003 uses to structure disks and their contents. Windows Server 2003 offers two storage types: basic disk and dynamic disk. Unlike partition style, which depends on whether the computer is x86based or Itanium-based, the storage type you use doesn't depend on the processor architecture. You can use either or both storage types on any edition of Windows Server 2003.

Working with Basic and Dynamic Disks

Basic disks use the same disk structure as earlier versions of the Windows operating system. When using basic disks, you are limited to creating four primary partitions per disk, or three primary partitions and one extended partition. Within an extended partition, you can create one or more logical drives. For ease of reference, primary partitions and logical drives on basic disks are known as basic volumes. Dynamic disks were introduced in Windows 2000 as a way to improve disk support by requiring fewer restarts after disk configuration changes and improved support for combining disks and fault tolerance using RAID configurations. All volumes on dynamic disks are known as dynamic volumes.

Windows Server 2003 systems can use both basic and dynamic disks. You cannot, however, mix disk types when working with volume sets. All disks, regardless of whether they are basic or dynamic, have three special types of drive sections:

  • System The system volume contains the hardware-specific files needed to load the operating system.

  • Boot The boot volume contains the operating system and its support files. The system and boot volume are usually the same.

  • Active The active volume, usually the system/boot volume, is the drive section from which the computer starts.

The system and boot volumes are set when you install the operating system. On an x86-based computer, you can mark a partition as active to ensure that it is the one from which the computer starts. You can do this only for partitions on basic disks. You can't mark an existing dynamic volume as the active volume, but you can convert a basic disk containing the active partition to a dynamic disk. Once the update is complete, the partition becomes a simple volume that's active.

You can mark a partition as active on a basic disk by using Disk Management. Right-click the primary partition you want to mark as active, and select Mark Partition As Active. Before you do this, however, make sure that the necessary startup files are on the primary partition that you want to make the active partition. Typically, these files are Boot.ini, Ntdetect.com, Ntldr, and Bootsect.dos. You might also need Ntbootdd.sys.

Using and Converting Basic and Dynamic Disks

Basic disks and dynamic disks are managed in different ways. For basic disks, you use primary and extended partitions. Extended partitions can contain logical drives. Dynamic disks allow you to combine disks to create spanned volumes, to mirror disks to create mirrored volumes, and to stripe disks using RAID 0 to create striped volumes. You can also create RAID-5 volumes for high reliability on dynamic disks.

You can change storage types from basic to dynamic and from dynamic to basic. When you convert a basic disk to a dynamic disk, existing partitions are changed to volumes of the appropriate type automatically and existing data is not lost. Converting a dynamic disk to a basic disk isn't so easy and can't be done without taking some drastic measures. You must delete the volumes on the dynamic disk before you can change the disk back to a basic disk. Deleting the volumes destroys all the information they contain, and the only way to get it back is to restore the data from backup.

You should consider a number of things when you want to change the storage type from basic to dynamic. To be converted successfully, an MBR disk must have 1 megabyte (MB) of free space at the end of the disk. This space is used for the dynamic disk database, which tracks volume information. Without this free space at the end of the disk, the conversion will fail. Because both Disk Management and DiskPart reserve this space automatically, primarily only if you've used third-party disk management utilities you will need to be concerned about whether this space is available. However, if the disk was formatted using another version of the Windows operating system, this space might not be available either.

A GPT disk must have contiguous, recognized data partitions to be converted successfully. If the GPT disk contains partitions that the Windows operating system doesn't recognize, such as those created by another operating system, you won't be able to convert a basic disk to a dynamic disk. When you convert a GPT disk, the Windows operating system creates LDM Metadata and LDM Data partitions as discussed in the section entitled "LDM Metadata and LDM Data Partitions" later in this chapter.

With either type of disk, you can't convert drives that use sector sizes larger than 512 bytes. If the disk has large sector sizes, you must reformat the disk before converting. You can't convert a disk if the system or boot partition uses software RAID. You must stop using the software RAID before you convert the disk.

Both Disk Management and DiskPart can be used to change the storage type.

Using Disk Management to Convert a Basic Disk to a Dynamic Disk. To use Disk Management to convert a basic disk to a dynamic disk, start Computer Management from the Administrative Tools menu or by typing compmgmt.msc at the command line, expand the Storage node, and then select Disk Management. In Disk Management, right-click a basic disk that you want to convert, either in Disk List View or in the left pane of Graphical View, and select Convert To Dynamic Disk.

In the Convert To Dynamic Disk dialog box (as shown in the following screen), select the disks you want to convert. If you're converting a RAID volume, be sure to select all the basic disks in the set because they must be converted together. Click OK when you're ready to continue.

image with no caption

Next, the Disks To Convert dialog box shows the disks you're converting along with details of the disk contents. To see the drive letters and mount points that are associated with a disk, select the disk in the Disks list, and then click Details. If a disk cannot be converted for some reason, the Will Convert column will show No and the Disk Contents column will provide a reason, as shown in the following screen. You must correct whatever problem is noted before you can convert the disk.

image with no caption

When you're ready to start the conversion, click Convert. Disk Management will then warn you that once you finish the conversion you won't be able to boot previous versions of the Windows operating system from volumes on the selected disks. Click Yes to continue. If a selected drive contains the boot partition, system partition, or a partition in use, you'll see another warning telling you that the computer will need to be rebooted.

Using DiskPart to Convert a Basic Disk to a Dynamic Disk. To use DiskPart to convert a basic disk to a dynamic disk, invoke DiskPart by typing diskpart, and then select the disk you want to convert. For example, if you want to convert disk 2, type select disk 2. Once the disk is selected, you can convert it from basic to dynamic by typing convert dynamic.

Using Disk Management to Change a Dynamic Disk Back to a Basic Disk. To use Disk Management to change a dynamic disk back to a basic disk, you must first delete all dynamic volumes on the disk. Then right-click the disk, and select Convert To Basic Disk. This changes the dynamic disk to a basic disk, and you can then create new partitions and logical drives on the disk.

Using DiskPart to Convert a Dynamic Disk to a Basic Disk. To use DiskPart to convert a basic disk to a dynamic disk, invoke DiskPart by typing diskpart, and then select the disk you want to convert. For example, if you want to convert disk 2, type select disk 2. If there are any existing volumes on the disk, you must delete them. You can do this by typing clean. However, be sure to move any data the disk contains to another disk prior to deleting the disk volumes.

After you delete all the volumes on the disk, you can convert the disk from dynamic to basic by typing convert basic. This changes the dynamic disk to a basic disk, and you can then create new partitions and logical drives on the disk.

Converting FAT or FAT32 to NTFS

On both MBR and GPT disks, you can convert FAT or FAT32 partitions, logical drives, and volumes to NTFS by using the CONVERT command. This preserves the file and directory structure without the need to reformat. Before you use CONVERT, you should check to see whether the volume is being used as the active boot volume or is a system volume containing the operating system. If it is, CONVERT must have exclusive access to the volume before it can begin the conversion. Because exclusive access to boot or system volumes can be obtained only during startup, you will see a prompt asking if you want to schedule the drive to be converted the next time the system starts.

As part of preparation for conversion, you should check to see if there's enough free space to perform the conversion. You'll need a block of free space that's about 25 percent of the total space used by the volume. For example, if the volume stores 12 GB of data, you should have about 3 GB of free space. CONVERT checks for this free space before running, and if there isn't enough, it won't convert the volume.

Caution

Conversion is one-way only. You can convert only from FAT or FAT32 to NTFS. You can't convert from NTFS to FAT or NTFS to FAT32 without deleting the volume and re-creating it using FAT or FAT32.

You run CONVERT at the command line. Its syntax is as follows:

convert volume /FS:NTFS

where volume is the drive letter followed by a colon, drive path, or volume name. So, for instance, if you want to convert the E drive to NTFS, type convert e: /fs:ntfs. This starts CONVERT. As shown in the following example, CONVERT checks the current file system type and then prompts you to enter the volume label for the drive:

The type of the file system is FAT32.
Enter current volume label for drive E:

Provided you enter the correct volume label, CONVERT will continue as shown in the following example:

Volume CORPDATA created 12/16/2004 7:41 PM
Volume Serial Number is 4BE3-234A
Windows is verifying files and folders...
File and folder verification is complete.
Windows has checked the file system and found no problems.
    9,717,848 KB total disk space.
    9,717,840 KB are available.

         8,192 bytes in each allocation unit.
    1,214,731 total allocation units on disk.
    1,214,730 allocation units available on disk.

Determining disk space required for file system conversion...
Total disk space:9727357 KB
Free space on volume:717840 KB
Space required for conversion:99904 KB
Converting file system
Conversion complete

Here, CONVERT examines the file and folder structure and then determines how much disk space is needed for the conversion. If there is enough free space, CONVERT performs the conversion. Otherwise, it exits with an error, stating there isn't enough free space to complete the conversion.

Several additional parameters are available as well, including /V, which tells CONVERT to display detailed information during the conversion, and /X, which tells CONVERT to force the partition or volume to dismount before the conversation if necessary. You can't dismount a boot or system drive—these drives can be converted only when the system is restarted.

On converted boot and system volumes, CONVERT applies default security the same as that applied during Windows setup. On other volumes, CONVERT sets security so the Users group has access but doesn't give access to the special group Everyone. If you don't want security to be set, you can use the /Nosecurity parameter. This parameter tells CONVERT to remove all security attributes and make all files and directories on the disk accessible to the group Everyone. In addition, you can use the /Cvtarea parameter to set the name of a contiguous file in the root directory to be a placeholder for NTFS system files.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset