SHARE (Shared Family)

The SHARE command specifies whether a disk family is to be shared between multiple hosts, and specifies that the current host is the master host. The system limits the actions that programs and operators can perform on shared disk families. Programs running on the master host can perform more actions on the shared disk family than programs running on other hosts.

Programs on all hosts sharing a disk family can perform the following actions:

  • Read data from files on the disk family and rewrite data in existing files on the disk family.

  • Initiate programs on the shared disk family or invoke procedures in libraries on the shared disk family.

  • Read the attributes of files on the shared disk family.

Programs running on the master host can perform the following additional actions:

  • Create new files or copy files to the shared disk family.

  • Expand existing files by writing new data beyond the old end-of-file marker or allocating new areas of the file.

  • Retitle or modify the attributes of files on the shared disk family.

Regardless of the host they are running on, programs are restricted from performing the actions listed under Restrictions on Programs later in this topic.

To be shared, a disk family must have a local system access directory. Refer to the FAMILYACCESS (Directory Location) command.

Syntax

── SHARE ─┬─ + ──<family name>──LEVEL─┬─────┬─<number>─┬──┤
          │                           └─ = ─┘          │
          ├─ - ──<family name>─────────────────────────┤
          └─ TAKEOVER ─<family name>───────────────────┘
                  

<number>

Currently, the only supported level number is 1.

Other share levels can be used by system software. Their use is documented in the appropriate product documentation and should be used only as described in that documentation.

Explanation

SHARE + <family name> LEVEL = <number>

Marks the labels of all the disk volumes in a family as shared disks and also establishes the host where this command was entered as the master host for the shared disk family.

 Caution

Before using the SHARE +  command, verify that all disks within the family are freed from all connected hosts. If you issue a SHARE + command, and one or more of the disks were already in the acquired state on any other host, you run the risk of data corruption and system failures. To remedy the situation, you must perform one of the following actions:

  • Halt/load the other host.

  • Use the FREE PK <unit number> and ACQUIRE PK <unit number> commands on the other host for each pack in the shared family.

  • Use the CLOSE PK <unit number> and READY PK <unit number> commands on the other host for each pack in the shared family.

To process the SHARE + system command, the system starts an independent runner named SHARE + <family name>. This process performs the following actions:

  • Checks whether the disk family is already shared and, if so, rejects the request with a corresponding error message.

  • Checks the disk family for the presence of a local system access directory and rejects the request with a corresponding error message if one is not found. For information about local system access directories, refer to the FAMILYACCESS (Directory Location) command.

  • Checks the disk family for CM (Change MCP), DN (Dump Name), DL (Disk Location), memory disk, mirrored or cached status and rejects the request with a corresponding error message if the family has such a status.

If there are no errors, the process proceeds as follows:

  • Updates the disk label of each disk family member with the host name and system serial number of the host that the command was executed from, thus designating that host as the master host for the family. The date and time the shared disk family was created and the specified share level is written to each family member's label. This action makes the current host the master host for the disk family.

  • The system generates a message to indicate that the disk family is now shared.

Note: Use the SHARE + command only on the master host. After a disk has been marked as shared, any other host that executes an ACQUIRE (Acquire Resource) command for that disk automatically becomes a nonmaster host. The host that executes the ACQUIRE command must have the same LONGFILENAMES setting as the master host, otherwise the system returns the following error message: 'FAST' BLOCK SIZE OR VERSION MISMATCH. For further information and restrictions on using LONGFILENAMES, refer to the SYSOPS (System Options) command.

SHARE − <family name>

Removes the shared status of a disk family.

To process this command, the system starts an independent runner named SHARE − <family name>. If the disk family is not shared, the process generates an error message. If there are no errors, the process issues an RSVP asking you to free all the disk family members from all other hosts. You can make either of the following replies.

Reply

Action

DS

 Aborts the SHARE − <family name> process.

OK

Erases the shared status in the disk label and the in-memory unit information for each member in the specified disk family. The disk family no longer has a master host assigned to it.

SHARE TAKEOVER <family name>

Designates the host where the command is entered as the new master host for a shared disk family.

To process the SHARE TAKEOVER system command, the system starts an independent runner named SHARE TAKEOVER <family name>. If the disk family is not shared or the host that the command was executed on is already the master host, a corresponding error message is generated.

If there are no errors, the process issues an RSVP requesting that you free all the disk family members from the current master host before proceeding. If you reply with DS, the SHARE TAKEOVER <family name> process is aborted. If you reply with OK, the process performs the following actions:

  • Updates the disk label of each family member with the host name and system serial number of the host that the command was executed from. This action designates the host as the master host for the family. The process writes the date and time of when the shared disk family was created and the specified share level to the label of each family member. These actions make the current host the master host for the disk family.

  • Marks any open file headers on the disk family as being open on the master host.

  • Recovers the system access directory of the disk family or rebuilds the system access directory if necessary.

  • Performs a directory complement to determine the available space on the disk family.

  • Generates a message to indicate that the host is now the master host.

Examples

Example 1

This example marks the disk family named WORK as a shared family with level 1 sharing capabilities:

SHARE + WORK LEVEL = 1

Example 2

This example erases the shared status of a disk family named WORK:

SHARE - WORK

Example 3

This example changes the master host for the disk family named WORK to the host that the command was executed from:

SHARE TAKEOVER WORK

Considerations for Use

Prerequisites

  • The shared disk feature can be used with MCP physical disks, but is not supported for emulated disk units.

  • The shared disk must have a local system access directory. For information about local system access directories, refer to the FAMILYACCESS (Directory Location) command.

  • Shared disk functionality is packaged with the Continuous Service Platform (CSP) feature of the Business Continuity Accelerator (BCA) product, so it requires the BCA license keys.

  • All hosts must have the SYSOPS LONGFILENAMES option established to the same value, either SET or RESET.

Restrictions on Disks

A disk of any of the following types cannot be marked as a level 1 shared disk family:

  • A disk selected by the CM (Change MCP) system command

  • A disk selected by the DN (Dump Name) system command

  • A disk selected by the DL (Disk Location) system command

  • A memory disk, mirrored disk, or cached disk family

Restrictions on Programs

Programs cannot perform the following actions:

  • Remove or replace existing files on a shared disk family.

  • Use the row exchange intrinsic to swap rows of files residing on a shared disk family.

  • Use certain GETSTATUS calls that make copies of disk directories (if the copy would be made to a shared disk family).

  • Take checkpoints to a shared disk family. Do not use families with the name DISK or PACK as shared families.

  • Open files with any of the following file attribute values:

EXCLUSIVE = TRUE
BUFFERSHARING = SHARED or EXCLUSIVELYSHARED

Additionally, programs running on non-master hosts cannot create a new file (temporary or permanent) on the shared disk family.

Note: Although programs can use Direct I/O recording locking, the locking applies only to processes that are accessing a file from the same MCP host.

Restrictions on WFL Statements

WFL jobs, operators, and users of MARC and CANDE can use various WFL statements that affect disk files. Following are partial lists of the statements that are allowed and disallowed on a shared disk family.

You can use the following WFL statements:

  • RUN and PROCESS statements to run code files resident on a shared disk family and the COMPILE statement to run compilers resident on a shared disk family.

  • COPY, ARCHIVE, and other library maintenance statements to copy files from a shared disk family to tape or other disks. If these statements are executed on the master host, they can also copy files to a shared disk family.

  • CHANGE and SECURITY statements (but only if they are executed on the master host).

Do not use the following WFL statements:

  • MOVE or ARCHIVE ROLLOUT statements to copy files from a shared disk family.

  • Certain library maintenance statements (such as MOVE, REPLACE, ARCHIVE RESTORE, or ARCHIVE RESTOREADD) that attempt to copy files to a shared disk family.

  • REMOVE or ARCHIVE RELEASE statements.

  • Statements related to cataloging: VOLUME ADD statements, CATALOG statements, and COPY or ADD statements with the BACKUP option.

Restrictions on System Commands

Operators, users of MARC, and programs that call GETSTATUS, DCKEYIN, and SETSTATUS can issue various commands that affect disks. The following are partial lists of the system commands that are allowed and disallowed on shared families.

You can use the following system commands:

  • PER, OL, SV, RY, CLOSE, FREE, and ACQUIRE

  • PD, PDRES, and SHOWOPEN

  • SL, SI, and CS

  • MP, RP, and XD (allowed only on the master host for the disk family).

  • RC, LB, and PG. Note that the system does not proceed with the action until the operator replies to an RSVP that the FREE system command has been used to release the disk from use on all hosts sharing the disk family.

  • The RC PK <unit number> ...  BP = <serial number> command, which adds disks to a shared disk family (allowed only on the master host for the disk family).

Do not use the following system commands:

  • REPLACE, if the source or destination disk family is shared

  • RES and SQUASH

  • DD − and FAMILYACCESS CENTRAL

Other Considerations

 Caution

If one of the hosts sharing a disk family is halt loaded to an MCP that does not support shared disk families, that host does not recognize the shared status of the family. Therefore, programs and operators on that host can perform actions that are not allowed in a shared environment, and that can compromise the integrity of the shared disk family. This caution applies also to the use of the LOADER utility.

Before you create a shared disk family, make sure it has a family name that does not conflict with the names of any families on any of the hosts that will have access to it. Also, ensure the serial numbers of all the members of the disk family do not conflict with the serial numbers of any of the disks on hosts that will be sharing the disk family.

If it is necessary later to remove existing files on a shared disk family, and proceed as follows:

  1. Use the following system command to release all the members of the shared disk family from all hosts except the master host:

    FREE PK <unit number>

    Note that the system rejects a FREE command for a disk if a program on that host is using that disk when you enter the command.

  2. Use the following system command to cancel the shared status of the disk family:

    SHARE - <family name>
  3. Make the necessary changes to the files on the disk family.

  4. Use the following system command to restore shared status to the disk family:

    SHARE + <family name> LEVEL = 1
  5. Use the following system command on all the members of the shared disk family on all the hosts that need to share the disk family:

    ACQUIRE PK <unit number>

When a program or job that is not running on the master host opens, updates, executes, or copies a file from a shared disk family, the system does not update the ALTERDATE, COPYSOURCEDATE, EXECUTEDATE, ACCESSDATE, and READDATE dates, or the times or timezone values of the file.

The "in use" counts displayed by the PER PK and PD system commands show only the usage counts for the host on which the command is executed. They do not show the usage by other hosts sharing the disks. Similarly, the display for the SHOWOPEN system command shows only the usage for the host on which the command is executed.

The system does not use any form of structure caching for shared disk families. None of the following are cached: directories, headers, or code stacks. However, the system continues to use the structure caching specifications for other, non-shared disk families. For information on structure caching, refer to the STRUCTURECACHE (Cache Maintenance) command.