HP OpenVMS Systems Documentation
Volume Shadowing for OpenVMS
5.3 Using $MOUNT to Mount Volume Sets
When mounting volume sets, always list the volume with the largest storage capacity first. You should name the largest volume first because the volume set and directory information goes on the first volume listed in a MOUNT command line. A small-capacity disk may not have adequate storage for the volume and directory information.
Example 5-3 shows the MACRO-32 statements required to produce a $MOUNT system service item to mount a volume set that contains two shadow sets.
The following list describes the elements in Example 5-3:
5.4 Using $DISMOU to Dismount Shadow Sets
You can use the $DISMOU system service to perform the following three shadow set operations:
The call to the $DISMOU system service has the following format:
The action that $DISMOU takes depends in part on whether you specify a shadow set virtual unit or a shadow set member in the devnam argument.
For a complete description of the $DISMOU service and its arguments,
see the OpenVMS System Services Reference Manual.
If you want to remove a single member from a shadow set, you must make a call to $DISMOU. In the devnam argument, you should specify the name of the shadow set member you want to remove. The specified member is spun down unless you specify the DMT$M_NOUNLOAD option in the flags argument.
The MACRO-32 code in Example 5-4 demonstrates a call to $DISMOU that removes the member $2$DUA9 from a shadow set.
5.4.2 Dismounting and Dissolving Shadow Sets
If you want to dismount a shadow set on a single node, you must make a call to $DISMOU. In the devnam argument, you should specify the name of the virtual unit that represents the shadow set you want to dismount. If you want to dismount the shadow set clusterwide, specify the DMT$M_CLUSTER option in the flags argument of the call.
When you dismount a shadow set on a single node in an OpenVMS Cluster system, and other nodes in the OpenVMS Cluster still have the shadow set mounted, none of the shadow set members contained in the shadow set are spun down, even if you have not specified the DMT$M_NOUNLOAD flag. After this call completes, the shadow set is unavailable on the node from which the call was made. The shadow set is still available to other nodes in the cluster that have the shadow set mounted.
If the node on which the shadow set is being dismounted is the only node that has the shadow set mounted, the shadow set dissolves. The shadow set member devices are spun down unless you specify the DMT$M_NOUNLOAD flag.
The MACRO-32 code in Example 5-5 demonstrates how to use the $DISMOU system service to dismount the shadow set represented by the virtual unit DSA23.
When a shadow set is dissolved:
The MACRO-32 code in Example 5-6 demonstrates a call to the $DISMOU system service to perform a dismount across the cluster. When the shadow set is dismounted from the last node, the shadow set is dissolved.
You must specify the DMT$M_CLUSTER option with the
flags argument if you want the shadow set dismounted
from every node in the cluster. When each node in the cluster has
dismounted the shadow set (the number of hosts having the shadow set
mounted reaches zero), the volume shadowing software dissolves the
Table 5-2 lists the options for the $DISMOU flags argument and describes the shadow set operations that use these options. For a full description of each of these flag options, see the description of the $DISMOU service in the OpenVMS System Services Reference Manual.
5.5 Evaluating Condition Values Returned by $DISMOU and $MOUNT
This section discusses the condition values returned by the $DISMOU and $MOUNT system services that pertain to mounting and using shadow sets. For a complete list of the condition values returned by these services, see the OpenVMS System Services Reference Manual.
If $MOUNT returns the condition value SS$_BADPARAM, your item list probably contains one of the following errors:
See also Appendix A for shadowing-related status messages.
The $GETDVI system service is useful for obtaining information about the shadow set devices on your system. Through the use of the shadow set item codes, you can determine the following types of information:
The call to $GETDVI has the following format:
For a complete description of the $GETDVI and $GETDVIW services and their arguments, see the OpenVMS System Services Reference Manual.
5.6.1 $GETDVI Shadow Set Item Codes
Table 5-3 lists the information returned by the $GETDVI shadow set item codes.
1Because shadow set device names can include up to 64 characters, the buffer length field of this item descriptor should specify 64 (bytes).
5.6.2 Obtaining the Device Names of Shadow Set Members
To obtain the device names of all members of a shadow set, you must
make a series of calls to $GETDVI. In your first call to $GETDVI, you
can specify either the virtual unit that represents the shadow set or
the device name of a member of the shadow set.
If your first call specifies the name of the virtual unit, the item
list should contain a DVI$_SHDW_NEXT_MBR_NAME item descriptor into
which $GETDVI returns the name of the lowest-numbered member of the
shadow set. The devnam argument of the next call to
$GETDVI should specify the device name returned in the previous call's
DVI$_SHDW_NEXT_MBR_NAME item descriptor. This second call's item list
should contain a DVI$_SHDW_NEXT_MBR_NAME item descriptor to receive the
name of the next-highest-numbered unit in the shadow set. You should
repeat these calls to $GETDVI until $GETDVI returns a null string,
which means that there are no more members in the shadow set.
If your first call specifies the device name of a shadow set member, you must determine the name of the virtual unit that represents the shadow set before you can obtain the device names of all members contained in the shadow set. Therefore, if your first call specifies a member, it should also specify an item list that contains a DVI$_SHDW_MASTER_NAME item descriptor. $GETDVI returns to this descriptor the name of the virtual unit that represents the shadow set. You can now make the series of calls to $GETDVI described in Section 22.214.171.124. The devnam argument of each call specifies the name of the device returned in the previous call's DVI$_SHDW_NEXT_MBR_NAME item descriptor. You repeat these calls until $GETDVI returns a null string, indicating that there are no more members in the shadow set.
|Volume label||Identifies a unique name for the volume. Every member of a shadow set must use the same volume label.|
|BACKUP revision number||A BACKUP/IMAGE restoration rearranges the location of data on a volume and sets a revision number to record this change. The Mount utility (MOUNT) checks the revision number of the proposed shadow set member against the numbers on current or other proposed shadow set members. If the revision number differs, the shadowing software determines whether a copy or merge operation is required to bring the data on the less current members up to date.|
|Volume shadowing generation number||When a member joins a shadow set, it is marked with a volume shadowing generation number. You can zero the generation number by using the /OVERRIDE=SHADOW_MEMBERSHIP qualifier with the MOUNT command.|
|Mount and dismount status||The SCB mount status field is used as a flag that is set when a volume is mounted and cleared when it is dismounted. There is also a count of the number of nodes that have mounted the shadow set write-enabled. The MOUNT command checks this field when a disk is mounted. If the flag is set, this indicates that the disk volume was incorrectly dismounted. This will occur in the event of system failure. When mounting shadow sets that were incorrectly dismounted, or where the write count field is not correct, the shadowing software automatically initiates merge operations.|
Upon receiving a command to mount a shadow set, the volume shadowing software immediately determines whether a copy or a merge operation is required; if either is required, the software automatically performs the operation to reconcile data differences. If you are not sure which disks might be targets of copy operations, you can specify the /CONFIRM or /NOCOPY qualifiers when you use the MOUNT command. To disable performing any copy operations, use the /NOCOPY qualifier. If you mount a shadow set interactively, use the /CONFIRM qualifier to instruct MOUNT to display the targets of copy operations and request permission before the operations are performed.
When you dismount an individual shadow set member, you produce a situation similar to a hardware disk failure. Because files remain open on the virtual unit, the removed physical unit is marked as not being properly dismounted.
After one of the devices is removed from a shadow set, the remaining shadow set members have their generation number incremented, identifying them as being more current than the former shadow set member. This generation number aids in determining the correct copy operation if you remount the member into a shadow set.