Providing Fault Tolerance with RAID on Dynamic Disks

 < Day Day Up > 



With RAID, you can give important data increased protection from drive failures. RAID can be implemented at the hardware or software level. Hardware RAID is implemented and managed using the tools provided by the hardware vendor. Software RAID is implemented and managed by the operating system.

On dynamic disks, Windows XP Professional and Windows Server 2003 support three software RAID levels:

  • RAID-0 Disk striping. Here, two or more volumes, each on a separate drive, are configured as a stripe set. Data is broken into blocks, called stripes, and then blocks of data are sequentially written to all drives in the stripe set. RAID-0 gives a speed and performance enhancement but is not fault-tolerant.

  • RAID-1 Disk mirroring or duplexing. Here, two volumes on two drives are configured identically. Data is written to both drives. If one drive fails, there’s no data loss because the other drive also contains the data. RAID-1 gives redundancy and better write performance than disk striping with parity (RAID-5).

  • RAID-5 Disk striping with parity. Here, you use three or more volumes, each on a separate drive, to create a stripe set with parity error checking. In the case of failure, data can be recovered. RAID-5 gives fault tolerance with less overhead than mirroring and better read performance than disk mirroring.

Note

You can’t implement software RAID on basic disks. Windows XP Professional and Windows Server 2003 only support a minimum set of management features for working with basic disks that use RAID on systems that have been upgraded. This discussion, however, focuses entirely on dynamic disks.

Implementing RAID-0: Disk Striping

With RAID-0, also known as disk striping, two or more volumes—each on a separate drive—are configured as a striped set. Data written to the striped set is separated into blocks that are called stripes. These stripes are written sequentially to all drives in the striped set. Although you can place volumes for a striped set on up to 32 drives, in most circumstances sets with two to five volumes offer the best performance improvements and beyond this the performance improvement decreases significantly.

Using RAID-0

One of the key reasons for using RAID-0 is the speed improvement. Because data can be accessed on multiple disks using multiple drive heads, read performance improves considerably. However, it also increases the chances of catastrophic failure. If any hard disk drive in the striped set fails, the striped set can no longer be used and all data in the striped set is lost. To recover, you would need to recreate the striped set and restore the data from backups. Data backup and recovery is discussed in Chapter 15 of the Microsoft Windows Server 2003 Administrator’s Pocket Consultant (Microsoft Press, 2003).

When you create striped sets, you’ll want to keep the following in mind:

  • The boot and system volumes can’t be part of a striped set. Don’t use disk striping with these volumes.

  • The overall size of the stripe set is based on the smallest volume size. Because of this, you should use volumes that are approximately the same size.

  • You can maximize performance by using disks that are on separate disk controllers. This allows the system to simultaneously access the drives.

Running the LIST DISK or DETAIL DISK command on a disk with RAID-0 shows a volume type of STRIPED. If you run the DETAIL VOLUME command on the striped volume, DiskPart shows you all the simple volumes that are part of the striped set.

A disk status of “Missing” appears any time a striped volume is broken. You can use the DETAIL DISK command on one of the remaining drives, which should show a status of “Failed,” indicating that the redundancy has failed. If you see a status of “Failed” but don’t know which other disk was part of the striped set, you can track down the problem disk by running DETAIL DISK on all other disks on the computer. The status of the problem disk should appear as “Missing.”

Fixing the striped set typically involves removing the failed disk, replacing it with a new one and then configuring the new disk to be a part of a new striped set. To do this, you would run DiskPart, select the new disk, and then run CONVERT DYNAMIC to convert the disk type. Afterward, you would need to format the new disk and assign a drive letter. Then you would need to use DiskPart to remove the volumes on the drives that were part of the broken striped set and then create a striped set using the command CREATE VOLUME STRIPE. When the process completes, you should be able to select the striped volume and use LIST VOLUME to view its status. The status should show as “Healthy.”

Caution

All data is removed from the drives when you remove the volumes. You will need to recreate the data from backup. If you don’t have a backup of the disks, don’t overwrite the drives. You might be able to salvage some of the data using third-party recovery utilities.

Configuring the Stripe Set

To implement RAID-0, follow these steps:

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

  2. List the disks on the computer, check the free space, and ensure that the disks you want to work with are all configured as dynamic disks, as follows:

    DISKPART> list disk
  3. Create the stripe set as follows:

    DISKPART> create volume stripe size=N disk=N,N,N,... 

    where size=N is the amount of space in megabytes that the volume will use on each disk. If no size is given, DiskPart uses all the remaining free space on the smallest disk and then uses the same amount of space on the remaining disks. disk=N,N,N,... sets the disks onto which the volume should be striped. You need to use at least two dynamic disks.

Consider the following examples:

Create a striped volume on disks 0, 1, and 2 using all available space on the smallest disk and then using the same amount of space on the remaining disks:

create volume stripe disk=0,1,2

Create a striped volume on disks 0, 1, and 2 using 4 GB (4096 MB) of space on each disk:

create volume stripe size=4096 disk=0,1,2

Implementing RAID-1: Disk Mirroring and Duplexing

With RAID-1, also known as disk mirroring, you use identically sized volumes on two different drives to create a redundant data set. Here, the mirrored drives contain identical sets of information, which means you read data from the primary mirror only, but write data to both drives. Because it is necessary to write the data twice, each mirrored drive often is given its own disk controller, which allows the data to be written simultaneously to both drives. When you use two disk controllers, the drives are said to be “duplexed.” Thus, the difference between disk mirroring and disk duplexing lies in whether there is one disk controller or two (and for the remainder of this section, I won’t distinguish between the two).

Using RAID-1

One of the key reasons to use disk mirroring is that, if one of the disks fails, the other disk can be used automatically for reading and writing data. The working drive can also be used to regenerate the failed drive onto the same or another disk. You’ll need to break the mirror before you can fix it. To learn how, see the section of this chapter titled “Managing RAID and Recovering from Failure.”

As you probably guessed, there is a trade-off to be made with disk mirroring: Disk mirroring effectively cuts the amount of storage space in half. For example, to mirror an 80 GB drive, you need another 80 GB drive. That means you use 160 GB of space to store 80 GB of information.

Note

Unlike disk striping, with disk mirroring you can mirror any type of simple volume. This means that you can mirror the boot and system volumes if you choose.

Running the LIST DISK or DETAIL DISK commands on a disk with RAID-1 shows a volume type of “Mirrored.” If you run the DETAIL VOLUME command on the mirrored volume, DiskPart shows details on both volumes in the mirrored set.

A disk status of “Missing” appears any time a mirrored volume is broken. You can use the DETAIL DISK command on one of the remaining disks, which should show a status of “Failed Redundancy,” indicating that the redundancy has failed. If you see a status of “Failed Redundancy” but don’t know which other disk was part of the mirrored set, you can track down the problem drive by running DETAIL DISK on all other disks on the computer. The status of the problem disk should appear as “Missing.”

Fixing the mirrored set typically involves removing the failed disk, replacing it with a new one, and then configuring the new disk to be a part of the mirrored set. To do this, you would run DiskPart, select the new disk, and then run CONVERT DYNAMIC to convert the disk type. Afterward, you would need to break the existing mirror using the BREAK DISK command and then use the ADD DISK command, designating the new disk as the disk to add to the new mirrored set. When the process completes, you should be able to select the mirrored volume and use the LIST VOLUME command to view its status, which should appear as “Healthy.”

Configuring Mirroring or Duplexing

To create a mirrored set, you select the simple volume that you want to mirror and then add a disk to use as the second drive in the mirrored set. The secondary drive must have unallocated space at least as large as the size of the selected volume. Follow these steps:

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

  2. List the disks on the computer, check the free space, and ensure that the disks you want to work with are all configured as dynamic disks, as follows:

    DISKPART> list disk
  3. Select the disk you want to mirror. In this example, you select disk 0:

    DISKPART> select disk 0 
  4. Add a disk to use as the second drive in the mirrored set. In this example, you add disk 1:

    DISKPART> add disk=1

When you do this, the operating system begins the mirror creation process and you’ll see a status of “Resynching” on both volumes.

Implementing RAID-5: Disk Striping with Parity

With RAID-5, known as disk striping with parity, you use a minimum of three hard disk drives to set up fault tolerance using identically sized volumes. One of the key reasons to use RAID-5 is that it protects a computer from a single disk failure. If two disks fail, the parity information isn’t sufficient to recover the data, and you’ll need to rebuild the striped set from backup.

Using RAID-5

You can think of RAID-5 as an enhanced version of RAID-0, in which you gain the performance benefits of striping and add fault tolerance. Thus, unlike RAID-0, the failure of a single drive won’t bring down the entire drive set. Instead, the set continues to function with disk operations directed at the remaining volumes in the set. These remaining volumes can also be used to regenerate the striped set onto a new disk or the restored disk that you’ve recovered as discussed in the section of this chapter titled “Managing RAID and Recovering from Failure.”

Caution

The boot and system volumes cannot be part of a striped set. Don’t use disk striping with parity on these volumes.

Running the LIST DISK or DETAIL DISK command on a disk with RAID-5 shows a volume type of “RAID-5.” If you run the DETAIL VOLUME command on the RAID-5 volume, DiskPart shows you all the volumes that are part of the set.

A disk status of “Missing” appears whenever a RAID-5 volume is broken. You can use the DETAIL DISK command on one of the remaining drives, which should show a status of “Failed Redundancy,” indicating that the redundancy has failed. If you see a status of “Failed Redudancy, but don’t know which other disk was part of the RAID-5 set, you can track down the problem disk by running DETAIL DISK on all applicable disks in the RAID-5 set. The status on the problem disk should appear as “Missing.”

Fixing the RAID-5 set typically involves removing the failed disk, replacing it with a new one and then configuring the new disk to be a part of the RAID-5 set. To do this, you would run DiskPart, select the new disk, and then run CONVERT DYNAMIC to convert the disk type. Afterward, you would select the RAID-5 volume using SELECT DISK and then run REPAIR DISK, designating the new disk as the disk to use. This recreates the RAID-5 set and makes the new disk a member of the set. When the process completes, you should be able to select the RAID-5 volume and use LIST VOLUME to view its status. The status should appear as “Healthy.”

Configuring Disk Striping with Parity

To implement RAID-5, select three dynamic disks with enough unallocated space to create the RAID set of the desired size. Follow these steps:

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

  2. List the disks on the computer, check the free space, and ensure that the disks you want to work with are all configured as dynamic disks, as follows:

    DISKPART> list disk
  3. Create the RAID-5 set as follows:

    DISKPART> create volume raid size=N disk=N,N,N,... 

    where size=N is the amount of space in megabytes that the volume set will use on each disk. If no size is given, DiskPart uses all the remaining free space on the smallest disk and then uses the same amount of space on the remaining disks. disk=N,N,N,... sets the disks for the RAID-5 set. You need to use at least three dynamic disks.

Consider the following examples:

Create a RAID-5 set on disks 2, 3, and 4 using all available space on the smallest disk and then using the same amount of space on the remaining disks:

create volume raid disk=2,3,4

Create a RAID-5 volume on disks 2, 3, and 4 using 8 GB (8192 MB) of space on each disk:

create volume raid size=8192 disk=2,3,4
Note

You can’t expand a RAID-5 set once it’s created. Because of this, you should consider the setup carefully before you implement it.



 < 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