| United States-English |
|
|
|
![]() |
VERITAS Volume Manager 3.1 Administrator's Guide: for HP-UX 11i and HP-UX 11i Version 1.5 > Chapter 8 RecoveryMiscellaneous RAID-5 Operations |
|
Many operations exist for manipulating RAID-5 volumes and associated objects. These operations are usually performed by other commands, such as the vxassist command and the vxrecover command, as part of larger operations, such as evacuating disks. These command line operations are not necessary for light usage of the Volume Manager. RAID-5 logs are represented as plexes of RAID-5 volumes and are manipulated using the vxplex command. To a RAID-5 log can be added, use the following command:
The attach (att) operation can only proceed if the size of the new log is large enough to hold all of the data on the stripe. If the RAID-5 volume already contains logs, the new log length is the minimum of each individual log length. This is because the new log is a mirror of the old logs. If the RAID-5 volume is not enabled, the new log is marked as BADLOG and is enabled when the volume is started. However, the contents of the log are ignored. If the RAID-5 volume is enabled and has other enabled RAID-5 logs, the new log has its contents synchronized with the other logs through ATOMIC_COPY ioctls. If the RAID-5 volume currently has no enabled logs, the new log is zeroed before it is enabled. Log plexes can be removed from a volume using the following command:
When removing the log leaves the volume with less than two valid logs, a warning is printed and the operation is not allowed to continue. The operation must be forced by using the -o force option. As with other subdisks, subdisks of the RAID-5 plex of a RAID-5 volume are manipulated using the vxsd command. Association is done by using the assoc keyword in the same manner as for striped plexes. For example, to add subdisks at the end of each column in the vxprint output for a RAID-5 volume on “Disk Failures” page 247, use the following command:
If a subdisk is filling a "hole" in the plex (that is, some portion of the volume logical address space is mapped by the subdisk), the subdisk is considered stale. If the RAID-5 volume is enabled, the association operation regenerates the data that belongs on the subdisk by using VOL_R5_RECOVER ioctls. Otherwise, it is marked as stale and is recovered when the volume is started. To remove subdisks from the RAID-5 plex, use the following command:
Subdisks can be moved to change the disks which a RAID-5 volume occupies by using the vxsd mv utility. For example, if disk03 is to be evacuated and disk22 has enough room by using two portions of its space, use the following command:
While this command is similar to that for striped plexes, the actual mechanics of the operation are not similar. To do RAID-5 subdisk moves, the current subdisk is removed from the RAID-5 plex and replaced by the new subdisks. The new subdisks are marked as STALE and then recovered using VOL_R5_RECOVER operations. Recovery is done either by the vxsd utility or (if the volume is not active) when the volume is started. This means that the RAID-5 volume is degraded for the duration of the operation. Another failure in the stripes involved in the move makes the volume unusable. The RAID-5 volume can also become invalid if the parity of the volume becomes stale. To avoid these situations, the vxsd utility does not allow a subdisk move if:
Only the third case can be overridden by using the -o force option. Subdisks of RAID-5 volumes can also be split and joined by using the vxsd split command and the vxsd join command. These operations work the same way as those for mirrored volumes.
When a RAID-5 volume is started, it can be in one of many states. After a normal system shutdown, the volume should be clean and require no recovery. However, if the volume was not closed, or was not unmounted before a crash, it can require recovery when it is started, before it can be made available. This section describes actions that can be taken under certain conditions. Under normal conditions, volumes are started automatically after a reboot and any recovery takes place automatically or is done through the vxrecover command. A RAID-5 volume is unusable if some part of the RAID-5 plex does not map the volume length:
When this occurs, the vxvol start command returns the following error message:
At this point, the contents of the RAID-5 volume are unusable. Another possible way that a RAID-5 volume can become unstartable is if the parity is stale and a subdisk becomes detached or stale. This occurs because within the stripes that contain the failed subdisk, the parity stripe unit is invalid (because the parity is stale) and the stripe unit on the bad subdisk is also invalid. This situation is shown in Figure 8-1 “Invalid RAID-5 Volume” which shows a RAID-5 volume that has become invalid due to stale parity and a failed subdisk. This example shows four stripes in the RAID-5 array. All parity is stale and subdisk disk05-00 has failed. This makes stripes X and Y unusable because two failures have occurred within those stripes. This qualifies as two failures within a stripe and prevents the use of the volume. In this case, the output display from the vxvol start command is as follows:
This situation can be avoided by always using two or more RAID-5 log plexes in RAID-5 volumes. RAID-5 log plexes prevent the parity within the volume from becoming stale which prevents this situation (see “System Failures” for details). You can start a volume even if subdisks are marked as stale. For example, if a stopped volume has stale parity and no RAID-5 logs and a disk becomes detached and then reattached. The subdisk is considered stale even though the data is not out of date (because the volume was in use when the subdisk was unavailable) and the RAID-5 volume is considered invalid. To prevent this case, always have multiple valid RAID-5 logs associated with the array. However, this is not always possible. To start a RAID-5 volume with stale subdisks, you can use the -f option with the vxvol start command. This causes all stale subdisks to be marked as nonstale. Marking takes place before the start operation evaluates the validity of the RAID-5 volume and what is needed to start it. Also, you can mark individual subdisks as nonstale by using the command vxmend fix unstale subdisk. Several operations can be necessary to fully restore the contents of a RAID-5 volume and make it usable. Whenever a volume is started, any RAID-5 log plexes are zeroed before the volume is started. This is done to prevent random data from being interpreted as a log entry and corrupting the volume contents. Also, some subdisks may need to be recovered, or the parity may need to be resynchronized (if RAID-5 logs have failed). The following steps are taken when a RAID-5 volume is started:
You can change several attributes of RAID-5 volumes. For RAID-5 volumes, the volume length and RAID-5 log length can be changed by using the vxvol set command. To change the length of a RAID-5 volume, use the following command:
The length of a volume cannot exceed the mapped region (called the contiguous length, or contiglen) of the RAID-5 plex. The length cannot be extended so as to make the volume unusable. If the RAID-5 volume is active and the length is being shortened, the operation must be forced by using the -o force usage type option. This is done to prevent removal of space from applications using the volume. The length of the RAID-5 logs can also be changed using the following command:
Remember that RAID-5 log plexes are only valid if they map the entire length of the RAID-5 volume log length. If increasing the log length makes any of the RAID-5 logs invalid, the operation not allowed. Also, if the volume is not active and is dirty (not shut down cleanly), the log length cannot be changed. This avoids the loss of any of the log contents (if the log length is decreased) or the introduction of random data into the logs (if the log length is being increased). This section describes the write process for RAID-5 arrays. When you write to a RAID-5 array, the following procedure is used for each stripe involved in the I/O:
This process is known as a read-modify-write cycle, which is the default type of write for RAID-5. If a disk fails, both data and parity stripe units on that disk become unavailable. The disk array is then said to be operating in a degraded mode. See Figure 8-2 “Read-Modify-Write” When large writes (writes that cover an entire data stripe) are issued, the read-modify-write procedure can be bypassed in favor of a full-stripe write. A full-stripe write is faster than a read-modify-write because it does not require the read process to take place. Eliminating the read cycle reduces the I/O time necessary to write to the disk. A full-stripe write procedure consists of the following steps:
When 50 percent or more of the data disks are undergoing writes in a single I/O, a reconstruct-write can be used. A reconstruct-write saves I/O time by XORing. XORing does not require a read of the parity region and only requires a read of the unaffected data. Unaffected data amounts to less than 50 percent of the stripe units in the stripe. A reconstruct-write procedure consists of the following steps:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||