HP Volume Shadowing for OpenVMS: OpenVMS Version 8.4 > Chapter 4 Creating and Managing Shadow Sets Using DCL Commands Displaying Information About Shadow SetsYou can use the DCL command SHOW DEVICE or the F$GETDVI lexical function to get information about a shadow set virtual unit and the physical volumes that make up the members. You can also use the System Dump Analyzer (SDA) to get more information about shadow sets. The following sections describe how to use these tools to examine volume shadowing virtual units and shadow set members. See also the HP OpenVMS DCL Dictionary for a full description of how to use the SHOW DEVICE command and the F$GETDVI lexical function. See the OpenVMS Alpha System Analysis Tools Manual and the OpenVMS VAX System Dump Analyzer Manual for more information about how to use SDA on OpenVMS Alpha. You can use any of the SHOW DEVICE qualifiers when you examine shadow sets (by specifying a shadow set's virtual unit name) or shadow set members.
Use SHOW DEVICE in the following format to display information about shadow sets:
The variable virtual-unit-name replaces device-name as the SHOW DEVICE command parameter for shadow sets. Use the virtual unit naming format DSAn:. As with any SHOW DEVICE command, the colon is optional. Note also that you can specify a complete virtual unit name (or a portion of a virtual unit name) just as you can with device names. If you omit the virtual unit number, SHOW DEVICE lists all the shadow set virtual units that represent shadow set member disks of the type specified. If you truncate a device name (for example, if you specify D), SHOW DEVICE lists all the devices and all the virtual units that begin with the letters you entered (in this case, D). When you specify the virtual unit number, SHOW DEVICE displays the names of the shadow set members it represents. If you use the /FULL qualifier, SHOW DEVICE displays full information about the shadow set and all the associated shadow set members. Because individual shadow set members that are mounted for systemwide or clusterwide access are not allocated or mounted in the traditional sense, a SHOW DEVICE command with the /ALLOCATED or /MOUNTED qualifiers displays only virtual units. Use the same format for the SHOW DEVICE command with shadow set members as you use with other physical devices. The command lists all shadow set members of the device name you specify. Because shadow set members are not mounted in a traditional sense and they all have the same device characteristics, SHOW DEVICE displays most of the relevant data with the associated virtual unit. Listings of shadow set members include information about current membership status. If a shadow set is undergoing a copy or a merge operation, the display resulting from the SHOW DEVICE command includes the percentage of the disk that has been copied or merged. The SHOW DEVICE information is available on all nodes that have the shadow set mounted. The SHOW DEVICE display indicates the exact percentage of the disk that has been copied. The node that is managing the copy operation knows precisely how far the copy or merge operation has progressed, and periodically notifies the other nodes in the OpenVMS Cluster of the progress. Thus, the other nodes in the cluster know approximately the percentage copied. When you enter the SHOW DEVICE command from a node other than the one where the copy or merge operation is taking place, the number indicating the percentage copied in the SHOW DEVICE output lags (by a small percentage) the actual percentage copied. Note that if a copy and a merge operation are occurring at the same time in the same shadow set, the number indicating the percentage merged remains static until the copy completes. Then the merge operation proceeds to completion. The following examples of output from the SHOW DEVICE command illustrate the types of shadow set information you can obtain, such as shadow set membership and the status of each shadow set member during copy and merge operations. For examples of output for write bitmaps used with the minicopy operation, see “Managing Bitmaps With DCL Commands”.
By truncating the device name, you cause the SHOW DEVICE command to list all the devices and all the virtual units on the local node that begin with the letters you entered (in this case, D). This example shows that two virtual units, DSA0 and DSA9999, are active. Both shadow sets are in a steady state. The device status “ShadowSetMember” indicates that the shadow set is in a steady state—the shadow set members are consistent with each other.
This example shows the membership and status of the shadow set represented by the DSA8 virtual unit. The SHOW DEVICE display provides information not only about the virtual unit DSA8, but also about the physical devices $11$DUA8 and $11$DUA89 that are members of the shadow set. The device status “ShadowSetMember” indicates that the shadow set is in a steady state—the shadow set members are consistent with each other. The shadow set members are being served by OpenVMS Cluster nodes SYSTMX and SYSTMY.
You might specify DSA on the SHOW DEVICE command to request information about all the shadow sets on the local node. Entering a generic virtual unit name, such as DSA, as a parameter produces a display of all virtual units representing shadow sets mounted on the local system. This example shows that two shadow sets are mounted on the local node, represented by the virtual units DSA7 and DSA8.
Although the SHOW DEVICE command specifies the name of a single device, the resulting display includes information about the membership and status of the shadow set represented by the DSA8 virtual unit to which the $11$DUA8 device belongs. The device status “ShadowSetMember” indicates that the shadow set is in a steady state---the shadow set members are consistent with each other. The shadow set members are accessed through the node named HSJ001.
The output from this SHOW DEVICE command shows a shadow set that is in a transient state. The device status “ShadowCopying” indicates that the physical device $11$DUA89 is the target of a copy operation, and 48% of the disk has been copied. The device $11$DUA8 is the source member for the copy operation.
This example shows how the SHOW DEVICE command displays a shadow set during a copy operation after a node in an OpenVMS Cluster system fails. In this example, the shadow set members are located on different nodes in the cluster, and one node on which the shadow set is mounted fails. At the time of the failure, the shadow set was in a transient state, with the $11$DUA8 device undergoing a copy operation. The SHOW DEVICE command shows the state of the shadow set during the copy operation, before the merge operation occurs. At the same time the $11$DUA89 shadow set member is acting as the source member for the copy operation, $11$DUA89 also accepts and performs I/O requests from applications running on the OpenVMS Cluster system. Once the copy operation completes, a merge operation automatically starts. See Chapter 6 for more information about merge operations. The next example shows how the SHOW DEVICE command display looks during the merge operation.
The SHOW DEVICE command produces a display similar to this example when a shadow set is in a transient state because of a merge operation. The merge operation is 78% complete.
This example shows how the SHOW DEVICE command displays remote shadow set members. In this display, the device $11$DUA7, whose description is “remote shadow member,” is a member of a shadow set that is not mounted on this system.
This example shows how the SHOW DEVICE/FULL command displays detailed information about the shadow set and its members. Notice that both members, $255$DUA56 and $255$DUA58, are merge members. “Displaying Shadow Set Information With SDA ” shows what this shadow set looks like when it is examined using the System Dump Analyzer. The /SHADOW qualifier for the ANALYZE/DISK utility can be used to compare either a specified range of blocks in a shadow set or the entire contents of a shadow set. The ANALYZE/DISK/SHADOW command is useful if the INITIALIZE/SHADOW command was used without the /ERASE qualifier to initialize a shadow set. Another use of ANALYZE/DISK/SHADOW is to exercise the I/O subsystem. In the unlikely event a discrepancy is found, the shadowset's clusterwide write lock is taken on the shadow set, and the blocks are reread. If a discrepancy is still present, the file name is displayed and the data block containing the discrepancy is dumped to the screen or to a file if /OUTPUT was specified. If no discrepancy is found on the second read, then the error is considered transient (a write was in flight to that disk block). Although the transient error is logged in the summary, verification that all members contained the same information is considered a success. Differences outside the file system are expected if INITIALIZE/SHADOW was used without the /ERASE qualifier to initialize a shadow set. This is not disk corruption. The blocks that are reported as different have not been written to, but they may contain stale data. The blocks reported as inconsistent may even be allocated to a file, because there may be unwritten space between the file’s end-of-data location and the end of the allocated space. To eliminate such inconsistencies, perform a full merge. To initiate a full merge, execute the DCL command SET SHADOW/DEMAND_MERGE DSAxxx. If the devices are served by controllers that support controller-based minimerge (for example, HSJ50s), this command should be issued while the shadow set is mounted on only one node within the cluster. Otherwise, a minimerge occurs, and the discrepancy may not be resolved. When you are adding members to a single member shadow set, a full copy operation also ensures that the disk is consistent both within and outside of the file system. If errors are reported on an ANALYZE/DISK/SHADOW command after a full merge has been executed, they should be investigated. Differences are also expected in the following system files: Table 4-4 describes the qualifiers for the ANALYZE/DISK/SHADOW command. Table 4-4 ANALYZE/DISK/SHADOW Command Qualifiers
Example 4-9 shows the use of the ANALYZE/DISK/SHADOW command with the /BRIEF and /BLOCK qualifiers. Example 4-9 ANALYZE/DISK/SHADOW Sample Output
If a member of the shadow set experiences connectivity problems for any reason after you have issued the ANALYZE/DISK/SHADOW command, an error is displayed, and the DCL prompt is displayed. To correct the connectivity problem and run the utility again on the same shadow set, you might need to create a temporary file on the virtual unit before reissuing the ANALYZE/DISK/SHADOW command. An ANALYZE/DISK/SHADOW command may also report explainable discrepancies if a full merge has not occurred since the shadow set was logically expanded after a new member was added. The following example illustrates this problem:
At this point, if the SET VOLUME/SIZE DSA1: command is executed, the shadow set virtual unit DSA1: increases to 36 GB. Then,ANALYZE/DISK/SHADOW reports discrepancies because only the first 18 GB of the shadow set contents were copied to $1$DGA22:. The discrepancies reported by ANALYZE/DISK/SHADOW are harmless because the space in question has not yet been written to by applications. The System Dump Analyzer (SDA) is a utility provided with the OpenVMS operating system. Although the main function of SDA is for crash dump analysis, it is also a useful tool for examining a running system, including the shadow sets. You can also use SDA to determine whether or not a third-party SCSI device supports the shadowing data repair (disk bad block errors) capability.An example is included in “Using SDA to Obtain Information About Third-Party SCSI Devices”. The SDA command SHOW DEVICE displays information from the system data structures that describe the devices in the system configuration. To examine a shadow set, first enter ANALYZE/SYSTEM at the DCL prompt to invoke the System Dump Analyzer. Then, at the SDA> prompt, enter the SHOW DEVICE command followed by the virtual unit name. The following example shows how to obtain information about the shadow set represented by the virtual unit DSA80. Compare the SDA output in the following example with the DCL SHOW DEVICE output shown in the last example in “SHOW DEVICE Examples for Shadow Set Information”.
The SDA utility's SHOW DEVICE command first displays device characteristics of the DSA80 virtual unit and the addresses of data structures. SDA then displays the DSA80 virtual unit status and the status of the individual shadow set members. Notice how the device status for each member reflects that the unit is in a merge state. For example, $255$DUA56 is shown with the following device status:
This information translates to the following:
Notice also how both devices $255$DUA56 and $255$DUA58 show that, at the time the SDA took this “snapshot” of the shadow set, the merge operation is merging at LBN 0004B94D. The following example shows an SDA display of the same shadow set when $255$DUA56 is a merge member and $255$DUA58 is the recipient of a copy operation. A shadow set can be in this merge/copy state when a node that has the shadow set mounted crashes while a member in the shadow set is undergoing a copy operation. Volume shadowing automatically marks the member undergoing the copy operation so that it receives a merge operation after the copy operation completes. This ensures consistency across the shadow set. The example first shows output for one shadow set member, using the DCL command SHOW DEVICE $255$DUA58; then the example shows the output for the entire shadow set, using the SDA command SHOW DEVICE DSA80. (SDA is invoked by the ANALYZE/SYSTEM command.)
In this example, in the SHAD Device summary for Virtual Unit DSA80 display, the device status (fcpy) for $255$DUA58 shows that it is the target of a full copy operation. The source of the operation is $255$DUA56; notice that the Merge LBN line for $255$DUA56 shows a series of Fs (FFFFFFFF). This notation indicates that a merge operation must be done after the copy operation completes. The Copy LBN line for the target disk $255$DUA58 shows that the copy operation is currently copying at LBN 00033671. When you mount a SCSI disk, the SCSI disk class driver, DKDRIVER, checks the device-specific parameters to see whether the disk supports READL/WRITEL commands. If a SCSI disk does not support READL and WRITEL commands, DKDRIVER sets a NOFE (no forced error) bit to indicate that the disk cannot support the shadowing data repair (disk bad block errors) capability. You can use the SDA command SHOW DEVICE to check for the NOFE flag in the Characteristics field of the SDA display. For SCSI devices that support READL and WRITEL operations, SDA displays a Characteristics field that does not contain the NOFE flag, similar to the following example: Example 4-10 SDA Display of Third-Party SCSI Device
The Characteristics field does not show a NOFE bit set; therefore, device DKA200 can support shadowing data repair. The F$GETDVI lexical function provides another method for obtaining information about devices mounted in shadow sets. Using F$GETDVI, you can obtain general device and volume information and specific information about the shadow set status of the device or volume. For example, you can determine the following types of information:
You can use the F$GETDVI lexical function interactively at the DCL command level or in a DCL command procedure. You can also use the $GETDVI system service with volume shadowing (see “Using $GETDVI to Obtain Information About Shadow Sets”). The format for the F$GETDVI lexical function is as follows:
You supply two arguments to the F$GETDVI lexical function: a physical device name and the name of an item that specifies the type of information you want to obtain. Table 4-5 lists the items specific to volume shadowing that you can supply as arguments to the F$GETDVI lexical function. It shows the type of information returned by each item and the data types of the return values. (The HP OpenVMS DCL Dictionary lists all the item codes that you can supply as an argument to F$GETDVI.) Table 4-5 F$GETDVI Item Codes for Volume Shadowing
To check a device for possible shadow set membership, you can include the following DCL command in a command procedure:
If WRKD$ (a logical name for a disk) is a shadow set member, then F$GETDVI returns the string TRUE and directs the procedure to the volume labeled SHADOW_MEMBER. See the HP OpenVMS DCL Dictionary for additional information about the F$GETDVI lexical function. |