Example: Manage tape resources

This topic provides an example of how to manage tape resources.

Each system in the following example reports two tape subsystems, or resources. These tape resources are connected to the tape library resource. In this example, the tape library resource is the 3494 Data Server. The 3494 Data Server then generates an automatic configuration of a device description for a media library device (MLD) . In this situation, any request to the tape library device (the 3494 Data Server) results in the tape library resource manager allocating which tape resource to use. This simplifies tape management tasks for most users because the system is responsible for the majority of those tasks.

Note: Users with multiple systems and limited attachment capabilities might still need to force the use of specific resources.

The Work with Media Library Status (WRKMBLSTS) command allows you to view the tape libraries and associated tape resources from a configuration standpoint. Using this command on each of the three systems in the example results in the following displays:

Figure 1. View of tape library TAPMLB01 from System A
View of tape library TAPMLB01 from System A. The system recognizes both TAPE01 and TAPE02. They are in an UNPROTECTED state.
Figure 2. View of tape library TAPMLB01 from System A
View of tape library TAPMLB01 from System A. The system recognizes both TAPE01 and TAPE02. They are in an UNPROTECTED state.
Figure 3. View of tape library TAPMLB01 from System A
View of tape library TAPMLB01 from System A. The system recognizes both TAPE01 and TAPE02. They are in an UNPROTECTED state.
Related reference
Work with Media Library Status (WRKMBLSTS)
Related information
Backup Recovery and Media Services for iSeries

View of tape library TAPMLB01 from System B


View of tape library TAPMLB01 from System B. The system only recognizes TAPE01. TAPE01 is in an UNPROTECTED state.

View of tape library TAPMLB01 from System C


View of tape library TAPMLB01 from System C. The systm only recognizes TAPE02. TAPE02 is in an UNPROTECTED state.

There are three possible values for the allocation of each resource. Each value assumes that the tape library is varied on. The values are:

ALLOCATED
An allocated resource is assigned to a particular system and no other system can access it. The allocated state is analogous to a stand-alone device that is varied on with the value ASSIGN(*YES).)
UNPROTECTED
An unprotected tape resource is not assigned to a particular system and is available to respond to requests to its tape library device. This unprotected state is analogous to a stand-alone device that is varied on with the value ASSIGN(*NO). If a request is made to the tape library device and the tape resource is selected by the tape library device resource manager, the tape resource is assigned while it is being used.
DEALLOCATED
A deallocated tape resource is not assigned to a particular system and is unavailable to respond to requests to its tape library device. If the tape library is varied off, all of its tape resources are deallocated. The deallocated state allows the use of a tape resource in stand-alone mode. It also allows temporary use of a tape resource if a malfunction occurs with the robotic components of the tape library.

When a tape resource that is shared between systems is not in use, it should remain in an unprotected state with the tape library device varied on. If the tape resource is left in an allocated or deallocated state, a command request to use the resource might result in an error stating that no resources are available.

If you are using backup and recovery media services (BRMS), you should not use SHARED *YES for media libraries. Use UNPROTECTED to share your resources. You can also use a combination of UNPROTECTED and ALLOCATED on the network to ensure that each system has the correct device that is required for backup operations. Leave the tape libraries varied on at all times, and use the allocation status to control use.

Force use of specific resources

One problem to consider in the example is the problem of cable limitations. One system can potentially prevent another from accessing tape resources even when one is available. The difference is in how a user can force a system to use a specific resource. The ways to force a system to use a specific resource are:

Schedule jobs based on time

One method of resolving this problem is to manipulate the start times of save operations on each system. In the example, system A and system B are contending for tape resource TAP01. Start the save operation on system B to ensure that system B has access to a tape resource.

The following table shows how the strategy chart appears if this method is used in the example.

Table 1. Schedule to meet system and device constraints using time management
Start time Approximate complete time Backup group System Device Tape resource forced
10:05 p.m. 1:00 a.m. 2 A TAPMLB01 TAP01 (TAP02 is busy on system C)
10:00 p.m. 11:00 p.m. 5 C TAPMLB01 TAP02
11:00 p.m. 1:00 a.m. 6 C TAPMLB01 TAP02
1:05 a.m. 6:00 a.m. 1 A TAPMLB01 TAP02 (TAP01 is busy on system B)
1:00 a.m. 4:00 a.m. 3 B TAPMLB01 TAP01
4:00 a.m. :00 a.m. 4 B TAPMLB01 TAP01

Use the resource selection sequence

Because ALLOCATED resources are selected for use before UNPROTECTED resources, you can use this aspect to your advantage. A user exit (the *EXIT special value) is a user-defined CL command that permits automatic processing of predefined user routines. On system A in the example, you can use the *EXIT special value in the BRMS control group to change TAP02 from UNPROTECTED to ALLOCATED. The next save request then attempts to access TAP02 first. When the save operation is completed, you use the *EXIT special value at the end of the control group to change the resource back from ALLOCATED to UNPROTECTED. For more information about the *EXIT special value, see Backup Recovery and Media Services for iSeries™.

In order to accomplish this in the example, keep all the resources in UNPROTECTED status and change two backup groups. In this situation, you are only concerned about systems that are attached to more than one resource. Only systems that are attached to more than one resource can produce a resource access conflict. In this example, the system that is attached to more than one resource is System A, in Table 1. System A belongs to backup group 1 and backup group 2.

  1. Change Save backup group 2:
    1. Change TAP01 from *UNPROTECTED to *ALLOCATED by specify the following command for the *EXIT special value:
       VRYCFG CFGOBJ(TAPMLB01) CFGTYPE(*MLBRSC) STATUS(*ALLOCATE) RSRCNAME(TAP01)
    2. Perform the save operation.
    3. Change TAP01 from *ALLOCATED to *UNPROTECTED by specifying the following command for the *EXIT special value:
      VRYCFG CFGOBJ(TAPMLB01) CFGTYPE(*MLBRSC) STATUS(*UNPROTECTED) RSRCNAME(TAP01)
  2. Change Save backup group 1:
    1. Change TAP02 from *UNPROTECTED to *ALLOCATED by specifying the following command for the *EXIT special value:
        VRYCFG CFGOBJ(TAPMLB01) CFGTYPE(*MLBRSC) STATUS(*ALLOCATE) RSRCNAME(TAP02)
    2. Perform the save operation.
    3. Change TAP02 from *ALLOCATED to *UNPROTECTED by specifying the following command for the *EXIT special value:
      VRYCFG CFGOBJ(TAPMLB01) CFGTYPE(*MLBRSC) STATUS(*UNPROTECTED) RSRCNAME(TAP02)

The following table shows how the strategy table appears if this method is used in the example.

Table 2. Schedule to meet system and device constraints using ALLOCATE before UNPROTECT
Start time Approximate complete time Backup group System Device Tape resource forced
10:00 p.m. 1:00 a.m. 2 A TAPMLB01 TAP01
10:00 p.m. 11:00 p.m. 5 C TAPMLB01 TAP02
11:00 p.m. 1:00 a.m. 6 C TAPMLB01 TAP02
1:00 a.m. 6:00 a.m. 1 A TAPMLB01 TAP02 (TAP01 is busy on system B)
1:00 a.m. 4:00 a.m. 3 B TAPMLB01 TAP01
4:00 a.m. 6:00 a.m. 4 B TAPMLB01 TAP01

Use multiple tape library device descriptions

You can also use the multiple tape library device descriptions that are created when a tape library is configured. As each tape resource in a tape library reports to the iSeries server, a separate tape library description might be created. Typically, you should use one TAPMLB xx and assign all the tape resources to it. However, system A in the example differs from this. The following display shows the configuration that is generated on system A.


Both TAPMBL01 and TAPMLB02 are varied off

After the command CFGDEVMLB(TAPMLB01) is completed, you can see both resources under TAPMLB01, even though TAP02 actually generated TAPMLB02. Both resources are set to UNPROTECTED.


You can see both resources under TAPMLB01, even though TAP02 actually generated TAPMLB02. Both resources are set to UNPROTECTED.

If you varied on TAPMLB02, it also recognizes TAP01 and TAP02. However, because only one tape library can use a resource, TAP01 and TAP02 must to be set to DEALLOCATED in TAPMLB02, as is shown on the following display.


TAPMLB02 is varied on. It recognizes TAP01 and TAP02. Because only one tape library can use a resource, TAP01 and TAP02 must to be set to DEALLOCATED in TAPMLB02.

In order to use the TAPMLB02 device description, you set TAP01 to UNPROTECTED in TAPMLB01 and you set TAP02 to UNPROTECTED in TAPMLB02, as is shown in the following display.


TAP01 is set to UNPROTECTED in TAPMLB01 and TAP02 is set to UNPROTECTED in TAPMLB02.

The following table shows how the strategy chart appears if you use this method in the example.

Table 3. Schedule to meet system and device constraints using multiple tape library descriptions
Start time Approximate complete time Backup group System Device Tape resource forced
10:00 p.m. 1:00 a.m. 2 A TAPMLB01 TAP01
10:00 p.m. 11:00 p.m. 5 C TAPMLB02 TAP02
11:00 p.m. 1:00 a.m. 6 C TAPMLB02 TAP02
1:00 a.m. 6:00 a.m. 1 A TAPMLB02 TAP02
1:00 a.m. 4:00 a.m. 3 B TAPMLB01 TAP01
4:00 a.m. 6:00 a.m. 4 B TAPMLB01 TAP01
Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.