How to configure Library Manager and Library Client in TSM (IBM Spectrum Protect)

What are the Library Manager and Library Client in Tivoli Storage Manager (TSM)? They allow multiple TSM servers to share a single tape library. Below are the steps to configure them using TSM servers in RedHat Linux with the non-IBM Tape library (HPE MSL6480). Before you begin, consider the following key points:

  • In this multi-TSM server environment for sharing a tape library, you need to designate one TSM server as the Library Manager. There will be one library manager, but you can have multiple Library Client TSM servers.
  • The Library Manager TSM server owns/controls the robotic arms, tape drives, and libvolume (library volumes).
  • Library Client TSM servers do not have ownership or control over the robotic arms, tape drives, and libvolume (library volumes). Instead, their role is limited to just using the tape drives and libvolumes that are released from the Library Manager TSM server.
  • In the Library Client TSM servers, you only need to execute the Define Library command, informing it about the designated Library Manager TSM server.
  • In the Library Client TSM servers, you also need to run IBM Spectrum Protect Autoconf Utility Program /opt/tivoli/tsm/devices/bin/autoconf -a to properly configure the tape device files of the tape library the same way the Library Manager TSM server configures the tape library.
  • An essential prerequisite is that all TSM servers, both Library Manager and Library Clients, should have Server-to-Server communication configured to facilitate successful communication between each other.
Step 1. Configure Tape Library on Library Manager TSM server

Refer to How to configure tape library on TSM (IBM Spectrum Protect). It’s the exact same procedure of configuring Library Manager TSM server. A critical point to consider when executing the define library command is to utilize the option “shared=yes.” This option designates the TSM server configuring the tape library as the Library Manager TSM server. By setting this option, the server gains control over the tape library and its resources, allowing it to manage robotic arms, tape drives, and libvolume (library volumes). Consequently, other TSM servers configured as Library Clients will be able to request and utilize tape resources from the designated Library Manager TSM server.

define library [LibraryName] libtype=scsi shared=yes
Step 2. Define Server (Server-to-Server Communication)

Create Server-to-Server communication between Library Manager and Library clients. For the detailed procedures, refer to How to exchange SSL certificate for TSM server to server communication(IBM Spectrum Protect) and the step 1 of TSM Node Replication Steps (IBM Spectrum Protect)

Step 3. Configure Library Client TSM server

Note the define library command below

define library [LibraryName] libtype=shared primarylibmanager=[TSMServerName]

In this example, tsmsvr01 is Library Manager TSM server, tsmsvr02 is Library Client TSM server.

Protect: TSMSVR02>define library MSL6480 libtype=shared primarylibmanager=tsmsvr01
ANR8400I Library MSL6480 defined.

Protect: TSMSVR02>

Protect: TSMSVR02>query library

Library Name     Library        AC-     Private      Scratch      WORM         External           Shared         LanFree        ObeyMountRetention
                 Type           S       Category     Category     Scratch      Manager
                                Id                                Category
------------     ----------     ---     --------     --------     --------     --------------     ----------     ----------     ------------------
MSL6480          SHARED                                                                           No

Protect: TSMSVR02>
Step 4. Run IBM Spectrum Protect Autoconf Utility Program and Create Mappings of Tape Drives/Device Files

Refer to the step 2 from How to configure tape library on TSM (IBM Spectrum Protect). This is the same procedure as Library Manager TSM server. It’s very important to create mappings of tape drive/device files on Library Manager TSM server.

Step 5. Define Path on Library Manager TSM server

Once the mappings of tape drives/device files for Library Client TSM server successfully created, then go to Library Manager TSM server and run Define Path. Note! Define Path should run on Library Manager TSM server not the Library Client TSM server.

define path [Library_Client_TSM Server] drive0n srctype=server desttype=drive library=[LibraryName]  device=/dev/tsmscsi/mtn online=yes
Protect: TSMSVR01>define path tsmsvr02 drive01 srctype=server desttype=drive library=MSL6480  device=/dev/tsmscsi/mt6 online=yes
ANR1720I A path from TSMSVR02 to MSL6480 DRIVE01 has been defined.

Protect: TSMSVR01>define path tsmsvr02 drive02 srctype=server desttype=drive library=MSL6480  device=/dev/tsmscsi/mt7 online=yes
ANR1720I A path from TSMSVR02 to MSL6480 DRIVE02 has been defined.

Protect: TSMSVR01>define path tsmsvr02 drive03 srctype=server desttype=drive library=MSL6480  device=/dev/tsmscsi/mt3 online=yes
ANR1720I A path from TSMSVR02 to MSL6480 DRIVE03 has been defined.

Protect: TSMSVR01>define path tsmsvr02 drive04 srctype=server desttype=drive library=MSL6480  device=/dev/tsmscsi/mt2 online=yes
ANR1720I A path from TSMSVR02 to MSL6480 DRIVE04 has been defined.

Protect: TSMSVR01>define path tsmsvr02 drive05 srctype=server desttype=drive library=MSL6480  device=/dev/tsmscsi/mt1 online=yes
ANR1720I A path from TSMSVR02 to MSL6480 DRIVE05 has been defined.

Protect: TSMSVR01>define path tsmsvr02 drive06 srctype=server desttype=drive library=MSL6480  device=/dev/tsmscsi/mt0 online=yes
ANR1720I A path from TSMSVR02 to MSL6480 DRIVE06 has been defined.

Protect: TSMSVR01>  

Run Query Path command to list the tape drives defined for both Library Manager and Library Client TSM servers.

Protect: TSMSVR01> query path

Source Name     Source Type     Destinatio-     Destinatio-     On-Line
                                n Name          n Type
-----------     -----------     -----------     -----------     ----------
TSMSVR01        SERVER          MSL6480         LIBRARY         Yes
TSMSVR01        SERVER          DRIVE01         DRIVE           Yes
TSMSVR01        SERVER          DRIVE02         DRIVE           Yes
TSMSVR01        SERVER          DRIVE03         DRIVE           Yes
TSMSVR01        SERVER          DRIVE04         DRIVE           Yes
TSMSVR01        SERVER          DRIVE05         DRIVE           Yes
TSMSVR01        SERVER          DRIVE06         DRIVE           Yes
TSMSVR02        SERVER          DRIVE01         DRIVE           Yes
TSMSVR02        SERVER          DRIVE02         DRIVE           Yes
TSMSVR02        SERVER          DRIVE03         DRIVE           Yes
TSMSVR02        SERVER          DRIVE04         DRIVE           Yes
TSMSVR02        SERVER          DRIVE05         DRIVE           Yes
TSMSVR02        SERVER          DRIVE06         DRIVE           Yes

Protect: TSMSVR01>
Step 6. Validation

The quick way to validate the functionality of Library Manager and Library Client is to perform a backup to to Library Client TSM server. You can observe how the Library Manager manages the allocation and release of tape resources, while the Library Client utilizes the shared tape drives and libvolumes provided by the Library Manager for the backup process. This test confirms that the setup is functioning as expected and that the Library Client is successfully leveraging the resources made available by the Library Manager.

Below is the output checking the Query Session and Query Mount on Library Manager TSM server. You’re noticing the session ID 18 is established from the Library Client TSMSVR02. This is the session that is communicating between Library Manager and Library Client for allocating the tape drive/libvolume to Library Client.

Protect: TSMSVR01>query session

 Sess      Comm.      Sess        Wait       Bytes       Bytes      Sess        Platform     Client Name
Number     Method     State        Time        Sent       Recvd     Type
------     ------     ------     ------     -------     -------     -------     --------     ------------------
    11     SSL        Run          0 S        2.1 K         602     Admin       Linux        YOONS
                                                                                 x86-64
    12     SSL        Run          0 S        5.4 K         229     Admin       Linux        YOONS
                                                                                 x86-64
    18     SSL        Run          0 S          121         282     Server      Linux/x-     TSMSVR02
                                                                                 86_64

Protect: TSMSVR01>query mount
ANR8330I LTO volume MC1436L7 is mounted R/W in drive DRIVE01 (/dev/tsmscsi/mt6), status: IN USE.
ANR8330I LTO volume MC1437L7 is mounted R/W in drive DRIVE02 (/dev/tsmscsi/mt7), status: IN USE.
ANR8330I LTO volume MC1439L7 is mounted R/W in drive DRIVE03 (/dev/tsmscsi/mt3), status: IN USE.
ANR8334I         3 matches found.

Protect: TSMSVR01>
 

Below is the output checking the Query session and Query Mount on Library Client TSM server. Backup is running onto this TSM server and Tape Drives and Tape Media is released from Library Manager TSM server.

Protect: TSMSVR02>query session

 Sess      Comm.      Sess        Wait       Bytes       Bytes      Sess        Platform     Client Name
Number     Method     State        Time        Sent       Recvd     Type
------     ------     ------     ------     -------     -------     -------     --------     ------------------
     3     SSL        Run          0 S        1.3 K         461     Admin       Linux        YOONS
                                                                                 x86-64
     4     SSL        IdleW      2.7 M       13.0 K       1.1 K     Node        Linux        TSMCLIENT02
                                                                                 x86-64
     5     SSL        Run          0 S        1.8 K       3.5 G     Node        Linux        TSMCLIENT02
                                                                                 x86-64
     8     SSL        Run          0 S        1.1 K       3.0 G     Node        Linux        TSMCLIENT02
                                                                                 x86-64
     9     SSL        IdleW       29 S        1.0 K       1.1 K     Node        Linux        TSMCLIENT02
                                                                                 x86-64
    12     SSL        Run          0 S          941     317.4 M     Node        Linux        TSMCLIENT02
                                                                                 x86-64

Protect: TSMSVR02>

Protect: TSMSVR02>query mount
ANR8330I LTO volume MC1436L7 is mounted R/W in drive DRIVE01 (/dev/tsmscsi/mt6), status: IN USE.
ANR8330I LTO volume MC1437L7 is mounted R/W in drive DRIVE02 (/dev/tsmscsi/mt7), status: IN USE.
ANR8330I LTO volume MC1439L7 is mounted R/W in drive DRIVE03 (/dev/tsmscsi/mt3), status: IN USE.
ANR8334I         3 matches found.

Protect: TSMSVR02> 

Now run Query Libvolume on Library Manager TSM server. You will observe the “Owner” column, indicating the TSM server to which each tape media is assigned. It is essential to understand that the Library Manager and Library Client roles are intended for sharing tape library resources, specifically tape drives and libvolumes, and not the individual tape media volumes. Once a tape media volume is assigned to a particular TSM server, it remains under the ownership of that server until all data on the tape expires, and it becomes a scratch tape media. Until then, the tape media will be utilized exclusively by the owning TSM server for data storage and retrieval purposes.

     
Protect: TSMSVR01>query libvolume

Library Name     Volume Name     Status               Owner          Last Use      Home        Devic-
                                                                                   Element     e Type
------------     -----------     ----------------     ----------     ---------     -------     ------
MSL6480          MC0828L7        Private              TSMSVR01       Data          1,042       LTO
MSL6480          MC0832L7        Private              TSMSVR01       Data          1,036       LTO
MSL6480          MC1436L7        Private              TSMSVR02       Data          1,048       LTO
MSL6480          MC1437L7        Private              TSMSVR02       Data          1,025       LTO
MSL6480          MC1439L7        Private              TSMSVR02       Data          1,024       LTO
MSL6480          MC1480L7        Scratch                                           1,051       LTO
MSL6480          MC1481L7        Scratch                                           1,052       LTO
MSL6480          MC1482L7        Scratch                                           1,053       LTO
MSL6480          MC1483L7        Scratch                                           1,023       LTO
MSL6480          MC1484L7        Scratch                                           1,055       LTO
MSL6480          MC1485L7        Scratch                                           1,056       LTO
MSL6480          MC1486L7        Scratch                                           1,057       LTO
MSL6480          MC1487L7        Scratch                                           1,058       LTO
MSL6480          MC1488L7        Scratch                                           1,059       LTO
MSL6480          MC1489L7        Scratch                                           1,060       LTO
MSL6480          MC1492L7        Scratch                                           1,063       LTO
.
.
.
.

Note!!! Occasionally, tape media fails to return to scratch status on the Library Client TSM server, even after all data has expired. This situation often leads to a discrepancy in the libvolume inventory database. To prevent the accumulation of orphaned tape media and optimize tape resources, it’s crucial to address this issue promptly. Here’s a step-by-step guide on how to fix the Libvolume Inventory Discrepancy on the TSM Library Manager server:

Refer to “How to Fix Libvolume Inventory Discrepancy on TSM Library Manager Server” for the detailed instructions to resolve this problem and ensure proper management of tape media resources.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top