Содержащиеся вНайти другие документыРесурсы поддержки | Загрузить это руководство в формате PDF (1051 КБ)
Chapter 9 RAID 1 (Mirror) Volumes (Overview)This chapter explains essential Solaris Volume Manager concepts related to mirrors and submirrors. For information about performing related tasks, see Chapter 10, RAID 1 (Mirror) Volumes (Tasks). This chapter contains the following information: Overview of RAID 1 (Mirror) VolumesA RAID 1 volume, or mirror, is a volume that maintains identical copies of the data in RAID 0 (stripe or concatenation) volumes. Mirroring requires an investment in disks. You need at least twice as much disk space as the amount of data you have to mirror. Because Solaris Volume Manager must write to all submirrors, mirroring can also increase the amount of time it takes for write requests to be written to disk. After you configure a mirror, it can be used just as if it were a physical slice. You can mirror any file system, including existing file systems. You can also use a mirror for any application, such as a database. Tip – Use Solaris Volume Manager's hot spare feature with mirrors to keep data safe and available. For information on hot spares, see Chapter 15, Hot Spare Pools (Overview) and Chapter 16, Hot Spare Pools (Tasks). Overview of SubmirrorsThe RAID 0 volumes that are mirrored are called submirrors. A mirror is made of one or more RAID 0 volumes (stripes or concatenations). A mirror can consist of up to three submirrors. Practically, a two-way mirror is usually sufficient. A third submirror enables you to make online backups without losing data redundancy while one submirror is offline for the backup. If you take a submirror “offline,” the mirror stops reading and writing to the submirror. At this point, you could access the submirror itself, for example, to perform a backup. However, the submirror is in a read-only state. While a submirror is offline, Solaris Volume Manager keeps track of all writes to the mirror. When the submirror is brought back online, only the portions of the mirror that were written while the submirror was offline (resynchronization regions) are resynchronized. Submirrors can also be taken offline to troubleshoot or repair physical devices which have errors. Submirrors can be attached or detached from a mirror at any time, though at least one submirror must remain attached at all times. Normally, you create a mirror with only a single submirror. Then, you attach a second submirror after you create the mirror. Scenario—RAID 1 (Mirror) VolumeFigure 9–1 illustrates a mirror, d2, that is made of two volumes (submirrors) d20 and d21. Solaris Volume Manager software makes duplicate copies of the data on multiple physical disks, and presents one virtual disk to the application. All disk writes are duplicated; disk reads come from one of the underlying submirrors. The total capacity of mirror d2 is the size of the smallest of the submirrors (if they are not of equal size). Figure 9–1 Mirror Example
Providing RAID 1+0 and RAID 0+1Solaris Volume Manager supports both RAID 1+0 (which is like having mirrors that are then striped) and RAID 0+1 (stripes that are then mirrored) redundancy, depending on the context. The Solaris Volume Manager interface makes it appear that all RAID 1 devices are strictly RAID 0+1, but Solaris Volume Manager recognizes the underlying components and mirrors each individually, when possible. Note – Solaris Volume Manager cannot always provide RAID 1+0 functionality. However, in a best practices environment, where both submirrors are identical to each other and are made up of disk slices (and not soft partitions), RAID 1+0 will be possible. For example, with a pure RAID 0+1 implementation and a two-way mirror that consists of three striped slices, a single slice failure could fail one side of the mirror. And, assuming that no hot spares were in use, a second slice failure would fail the mirror. Using Solaris Volume Manager, up to three slices could potentially fail without failing the mirror, because each of the three striped slices are individually mirrored to their counterparts on the other half of the mirror. Consider this example: Figure 9–2 RAID 1+ 0 Example
Mirror d1 consists of two submirrors, each of which consists of three identical physical disks and the same interlace value. A failure of three disks, A, B, and F can be tolerated because the entire logical block range of the mirror is still contained on at least one good disk. If, however, disks A and D fail, a portion of the mirror's data is no longer available on any disk and access to these logical blocks will fail. When a portion of a mirror's data is unavailable due to multiple slice errors, access to portions of the mirror where data is still available will succeed. Under this situation, the mirror acts like a single disk that has developed bad blocks. The damaged portions are unavailable, but the rest is available. Frequently Asked Questions About RAID 1 (Mirror) Volumes
RAID 1 Volume Configuration Guidelines
RAID 1 Volume OptionsThe following options are available to optimize mirror performance:
You can define mirror options when you initially create the mirror, or after a mirror has been set up. For tasks related to changing these options, see How to Change RAID 1 Volume Options. RAID 1 Volume Read and Write PoliciesSolaris Volume Manager enables different read and write policies to be configured for a mirror. Properly set read and write policies can improve performance for a given configuration. Table 9–1 Mirror Read Policies
Table 9–2 Mirror Write Policies
RAID 1 Volume (Mirror) ResynchronizationRAID 1 volume (mirror) resynchronization is the process of copying data from one submirror to another after submirror failures, system crashes, when a submirror has been taken offline and brought back online, or after the addition of a new submirror. While the resynchronization takes place, the mirror remains readable and writable by users. A mirror resynchronization ensures proper mirror operation by maintaining all submirrors with identical data, with the exception of writes in progress. Note – A mirror resynchronization is mandatory, and cannot be omitted. You do not need to manually initiate a mirror resynchronization. This process occurs automatically. Full ResynchronizationWhen a new submirror is attached (added) to a mirror, all the data from another submirror in the mirror is automatically written to the newly attached submirror. Once the mirror resynchronization is done, the new submirror is readable. A submirror remains attached to a mirror until it is explicitly detached. If the system crashes while a resynchronization is in progress, the resynchronization is restarted when the system finishes rebooting. Optimized ResynchronizationDuring a reboot following a system failure, or when a submirror that was offline is brought back online, Solaris Volume Manager performs an optimized mirror resynchronization. The metadisk driver tracks submirror regions and knows which submirror regions might be out-of-sync after a failure. An optimized mirror resynchronization is performed only on the out-of-sync regions. You can specify the order in which mirrors are resynchronized during reboot, and you can omit a mirror resynchronization by setting submirror pass numbers to 0 (zero). (See Pass Number for information.) A pass number of 0 (zero) should only be used on mirrors that are mounted as read-only. Partial ResynchronizationFollowing a replacement of a slice within a submirror, Solaris Volume Manager performs a partial mirror resynchronization of data. Solaris Volume Manager copies the data from the remaining good slices of another submirror to the replaced slice. Pass NumberThe pass number, a number in the range 0–9, determines the order in which a particular mirror is resynchronized during a system reboot. The default pass number is 1. Smaller pass numbers are resynchronized first. If 0 is used, the mirror resynchronization is skipped. A pass number of 0 should be used only for mirrors that are mounted as read-only. Mirrors with the same pass number are resynchronized at the same time. Background Information for RAID 1 Volumes
Background Information for Creating RAID 1 Volumes
Background Information for Changing RAID 1 Volume Options
How Booting Into Single-User Mode Affects RAID 1 VolumesIf a system with mirrors for root (/), /usr, and swap, the so-called “boot” file systems, is booted into single-user mode (by using the boot -s command), these mirrors and possibly all mirrors on the system will appear in the “Needing Maintenance” state when viewed with the metastat command. Furthermore, if writes occur to these slices, the metastat command shows an increase in dirty regions on the mirrors. Though this situation appears to be potentially dangerous, there is no need for concern. The metasync -r command, which normally occurs during boot to resynchronize mirrors, is interrupted when the system is booted into single-user mode. Once the system is rebooted, the metasync -r command will run and resynchronize all mirrors. If this is a concern, run the metasync -r command manually. Scenario—RAID 1 Volumes (Mirrors)RAID 1 volumes provide a means of constructing redundant volumes, in which a partial or complete failure of one of the underlying RAID 0 volumes does not cause data loss or interruption of access to the file systems. The following example, drawing on the sample system explained in Chapter 4, Configuring and Using Solaris Volume Manager (Scenario), describes how RAID 1 volumes can provide redundant storage. As described in Interlace Values for Stripes, the sample system has two RAID 0 volumes, each of which is approximately 27Gbytes in size and spans three disks. By creating a RAID 1 volume to mirror these two RAID 0 volumes, a fully redundant storage space can provide resilient data storage. Within this RAID 1 volume, the failure of either of the disk controllers will not interrupt access to the volume. Similarly, failure of up to three individual disks might be tolerated without access interruption. To provide additional protection against problems that could interrupt access, use hot spares, as described in Chapter 15, Hot Spare Pools (Overview) and specifically in How Hot Spares Work. |
||||||||||||||