![]() |
![]() |
Mirroring can be crucial in the recovery process. Consider the following scenario: Because of a sudden power outage, a partial page write occurs. The recovery log is corrupted and not completely readable. Without mirroring, recovery operations cannot complete when the server is restarted. However, if the recovery log is mirrored and a partial write is detected, a mirror volume can be used to construct valid images of the missing data.
This section explains how to:
Task | Required Privilege Class |
---|---|
Define database and recovery log volumes | System or unrestricted storage |
Query mirrored volumes | Any administrator |
By separating volume copies on different physical devices, you protect the
server from media failure and increase the availability of the database and
recovery log. If you cannot assign each volume copy to its own physical
disk, allocate them as shown in Table 31.
Table 31. Separating Volume Copies
Physical Disk | Database Volume | Recovery Log Volume |
---|---|---|
Physical Disk 1 | Database volume copy 1 | Recovery log volume copy 3 |
Physical Disk 2 | Recovery log volume copy 1 | Database volume copy 2 |
Physical Disk 3 | Database volume copy 3 | Recovery log volume copy 2 |
Mirrored volumes must have at least the same capacity as the original volumes.
To mirror the database or recovery log, define a volume copy for each volume in the database or recovery log.
For example, the database consists of five volumes named VOL1, VOL2, VOL3, VOL4, and VOL5. To mirror the database, you must have five volumes that match the original volumes in size. Figure 79 shows a mirrored database in which VOL1-VOL5 are mirrored by VOLA-VOLE.
Use the DSMFMT command to format the space. For example, to format VOLA, a 25MB database volume, enter:
./dsmfmt -m -db vola 25
Then define the group of mirrored volumes. For example, you might enter the following commands:
define dbcopy vol1 vola define dbcopy vol2 volb define dbcopy vol3 volc define dbcopy vol4 vold define dbcopy vol5 vole
After a volume copy is defined, the volume copy is synchronized with the original volume. This process can range from minutes to hours, depending on the size of the volumes and performance of your system. After synchronization is complete, the volume copies are mirror images of each other.
Four server options let you specify the level of protection, recoverability, and performance for mirrored volumes:
DBPAGESHADOW and DBPAGESHADOWFILE coordinate with the MIRRORWRITE server option and its specifications of DB and SEQUENTIAL or PARALLEL like this:
You can request information about mirrored database or recovery log volumes by using the QUERY DBVOLUME and QUERY LOGVOLUME commands. For example:
query dbvolume
The following type of information is displayed:
+--------------------------------------------------------------------------------+ |Volume Name Copy Volume Name Copy Volume Name Copy | |(Copy 1) Status (Copy 2) Status (Copy 3) Status | |----------- ------ ------------- ------ ------------- ------ | |VOL1 Sync'd VOLA Sync'd Undef- | |VOL2 Sync'd VOLB Sync'd ined | |VOL3 Sync'd VOLC Sync'd | |VOL4 Sync'd VOLD Sync'd | | | |VOL5 Sync'd VOLE Sync'd | | | +--------------------------------------------------------------------------------+