Managing RAID and Recovering from Failure

 < Day Day Up > 



You don’t manage mirrored drives and stripe sets in the same way as you manage other types of volumes. If a mirrored drive or stripe set fails, it must be recovered in a specific way. If you want to stop using disk mirroring, you must break the mirrored set. If you want to stop using RAID-5, you must delete the entire volume set.

Breaking a Mirrored Set

Breaking a mirrored set is a standard procedure that you’ll use when you want to stop using drive mirroring or when you need to rebuild the mirrored set. If you no longer want to mirror your drives, you can break the mirror and use the data on only one drive. This allows you to use the space on the other drive for a different purpose. If one of the mirrored drives in a set fails, disk operations continue using the remaining disk drive. To fix the mirror, you must first break the mirror set and then re-establish it.

Tip

Although breaking a mirror doesn’t delete the data in the set, you should always back up the data before breaking a mirrored set. This ensures that if you have problems, you can recover your data.

You can break a mirrored set by following these steps:

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

  2. List the disks on the computer to determine which disks are part of the mirrored set, as follows:

    DISKPART> list disk
  3. Break the mirror on the designated disk. The disk that you specify when breaking the mirror does not retain the drive letter or mount point. For example, if disks 0 and 1 are mirrored and you want users to continue using disk 0, you can break the mirror by typing

    DISKPART> break disk=1

    Once you break the mirror, you have two drives containing the same information. Only disk 0, however, has a usable drive letter or mount point. If you want to break the mirror and discard the duplicate information on the second disk, you can do this by adding the nokeep parameter, such as

    DISKPART> break disk=1 nokeep

Resynchronizing and Repairing a Mirrored Set

When one of the drives in a mirrored set fails, the mirrored set will need to be repaired before mirroring can be restored. You do this by breaking the mirrored set and then re-establishing mirroring on a new drive, or the newly recovered drive if you’ve recovered the failed drive. Sometimes, however, you won’t have an outright failure; rather, you’ll have a case in which data is out of sync. In such a situation, one of the drives in the set has probably gone offline for some reason and as a result, data was written to only one of the drives.

To recover the mirrored set, you need to get both drives in the mirrored set online and the corrective action you take depends on the failed volume’s status, as follows:

  • If the status is “Missing” or “Offline,” make sure that the drive has power and is connected properly. Afterward, start DiskPart and use the RESCAN command to attempt to detect the volume. Then use ONLINE to resynchronize the mirrored volume. The drive status should change to “Regenerating” and then to “Healthy.” If the volume doesn’t return to “Healthy” status, try breaking the mirror and then adding the recovered disk to reestablish the mirror.

  • If the status is “Online” (Errors), use ONLINE to resynchronize the mirrored volume. The drive status should change to “Regenerating” and then to “Healthy.” If the volume doesn’t return to “Healthy” status, use BREAK to stop mirroring and then use ADD to re-establish the mirror on the recovered disk or a new disk.

  • If one of the drives shows as “Unreadable,” use RESCAN to rescan the drives on the system. If the drive status doesn’t change, you might need to reboot the computer.

  • If one of the drives still won’t come back online, break the mirror, designating the failed disk as the one to remove. Replace or repair the disk, and then use ADD to reestablish the mirror.

Real World

The failure of a mirrored drive might prevent your system from booting. This usually happens when you’re mirroring the system or boot volume, and the primary mirror drive has failed. In this case, you need to edit the boot.ini file so that the secondary drive in the mirror set is used for startup. See Chapter 12 of the Microsoft Windows Server 2003 Administrator’s Pocket Consultant.

Repairing a RAID-0 Striped Set Without Parity

As discussed previously, there is no fault tolerance when you use RAID-0. If a drive that’s part of a RAID-0 set fails, the entire striped set is unusable. Before you try to restore the striped set, you should repair or replace the failed drive. Once you do this, you will need to recreate the RAID-0 set and then recover the data it contained from backup.

Regenerating a RAID-5 Striped Set with Parity

RAID-5 allows you to recover the striped set if a single drive fails. You’ll know that a drive has failed because the set’s status will change to “Failed Redundancy” and the corrective action you take depends on the failed volume’s status:

  • If the status is “Missing” or “Offline,” make sure that the drive has power and is connected properly. Afterward, start DiskPart and then use ONLINE to resynchronize the volume set. The drive’s status should change to “Regenerating” and then to “Healthy.” If the drive’s status doesn’t return to “Healthy,” you’ll need to use the REPAIR command.

  • If the status is “Online” (Errors), use ONLINE to resynchronize the RAID-5 volume. The drive’s status should change to “Regenerating” and then to “Healthy.” If the drive’s status doesn’t return to “Healthy,” you’ll need to use the REPAIR command.

  • If one of the drives shows as “Unreadable,” use RESCAN to rescan the drives on the system. If the drive status doesn’t change, you might need to reboot the computer.

  • If one of the drives still won’t come back online, you need to use the REPAIR command.

You can repair RAID-5 using the REPAIR command. If possible, you should back up the data before you perform this procedure. This ensures that if you have problems, you can recover your data. Follow these steps to resolve problems with the RAID-5 set:

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

  2. List the disks on the computer to confirm that the RAID-5 set failed, as follows:

    DISKPART> list disk
  3. Remove and replace the failed drive if necessary and possible. Then specify the new drive that should be part of the RAID set using the REPAIR command as follows:

    DISKPART> repair disk=N 

    where N specifies the dynamic disk that will replace the failed RAID-5 drive. Keep in mind the specified disk must have free space equal to or larger than the total size used on the failed RAID disk.



 < 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