HP Volume Shadowing for OpenVMS: OpenVMS Version 8.4 > Chapter 5 Creating and Managing Shadow Sets with System Services

Using $MOUNT to Create and Mount Shadow Sets

You can create and mount shadow sets using the $MOUNT system service in a user-written program. Program calls to $MOUNT that create, mount, or add devices to shadow sets use the same syntax. To direct the system to perform any mount operation, you construct a $MOUNT item list. The item list specifies the virtual unit that represents the shadow set and the members (physical devices) that the shadow set contains.

The call to the $MOUNT system service has the following format:

SYS$MOUNT itmlst

Example 5-1 illustrates MACRO-32 statements that produce a $MOUNT system service item list to create and mount a shadow set.

Example 5-1 Item List to Create and Mount a Shadow Set

DSA23:  .ASCID /DSA23:/
MEMBER001:   .ASCID /$4$DUA9:/
MEMBER002:   .ASCID /$4$DUA5:/

VOLUME_LABEL:  .ASCID /MYVOLUME/
VOLUME_LOGNM:  .ASCID /DISK$MYVOLUME/

        .MACRO   .ITEM, SIZE, CODE, BUFFER, RETURN=0
        .WORD    SIZE, CODE
        .ADDRESS BUFFER, RETURN
        .ENDM    .ITEM

ITMLST: .ITEM   6,  MNT$_SHANAM, DSA23 
        .ITEM   8,  MNT$_SHAMEM, MEMBER001 
        .ITEM   8,  MNT$_SHAMEM, MEMBER002

        .ITEM   8,  MNT$_VOLNAM, VOLUME_LABEL  
        .ITEM   13, MNT$_LOGNAM, VOLUME_LOGNM  
         .LONG   0

The following list describes the elements in Example 5-1:

  • Notice that the virtual unit item descriptor occurs first. This item descriptor specifies DSA23 as the name of the virtual unit. See “Creating a Shadow Set ” for the proper naming syntax for the virtual unit and shadow set members.

  • The virtual unit item descriptor is followed by two member-unit item descriptors. Because Volume Shadowing for OpenVMS automatically determines the type of operation (copy or merge) necessary before disks can join a shadow set, all of the devices are mounted with MNT$_SHAMEM item descriptors. These item descriptors specify that the physical devices, $4$DUA9 and $4$DUA5, are to join the shadow set represented by DSA23.

  • The member item descriptors are followed by an item descriptor that specifies MYVOLUME as the volume label for the shadow set.

  • The last item descriptor specifies DISK$MYVOLUME as the logical name for the shadow set.

.

Later, if you want to add another device to the shadow set, you make another call to $MOUNT that specifies an item list that contains the name of the virtual unit and the name of the device you want to add to the shadow set. Example 5-2 shows how to add the physical device $4$DUA10: to the shadow set created in Example 5-1.

Example 5-2 Item List to Add a Member to a Shadow Set

DSA23:  .ASCID /DSA23:/

MEMBER003:  .ASCID /$4$DUA10:/
VOLUME_LABEL:  .ASCID /MYVOLUME/
VOLUME_LOGNM:  .ASCID /DISK$MYVOLUME/

        .MACRO   .ITEM, SIZE, CODE, BUFFER, RETURN=0
        .WORD    SIZE, CODE
        .ADDRESS BUFFER, RETURN
        .ENDM    .ITEM

ITMLST: .ITEM   6,  MNT$_SHANAM, DSA23  

        .ITEM   9,  MNT$_SHAMEM, MEMBER003
        .ITEM   8,  MNT$_VOLNAM, VOLUME_LABEL 
        .ITEM   13, MNT$_LOGNAM, VOLUME_LOGNM 
        .LONG   0

“$MOUNT Shadow Set Item Codes” briefly describes the $MOUNT shadow set item codes and discusses how to construct a valid $MOUNT item list. For a complete description of the $MOUNT service and all its item codes, see the HP OpenVMS System Services Reference Manual.