User Tools

Site Tools


tsm:tsm_libr_error

Redefining TSM Library and Drives

on UNIX server

Question

Frequently when hardware or firmware has changed it is necessary to remove the tape library and drive definitions from the (IBM Tivoli Storage Manager) TSM Server, then re-define them. Cause

Sometimes there are specific errors, such as: ANR0523W Transaction failed - error on output storage device ANR8300E I/O error on library (OP=xx, CC=xx, KEY=xx, ASC=xx, ASCQ=xx, SENSE=xx) ANR8301E I/O Error on library ANR8355E I/O error reading label for volume NNNNNN on drive XXXXX ANR8359E Media fault detected on volume NNNNNN in drive XXXXX ANR8441E Initialization failed for SCSI library ANR8779E Unable to open drive XXXXX, error number=ZZZ ANR8944E Hardware or media error on drive ANR8963E Unable to find path to match the serial number defined for drive

Frequently the TSM Server can automatically rediscover devices when using “SANDISCOVERY ON” or by using “UPDATE PATH” with “AUTODETECT=YES” to refresh the values.

However, there are times when that may not be successful. For example, if a tape drive, tape library, fibre/SCSI HBA, or SAN has experienced changes (such as hardware, firmware or device drivers) it may require rebuilding the TSM “special files” to re-establish connectivity to the library and drives. To rebuild the “special files,” we must delete and re-define the hardware devices to the TSM Server (UPDATE does not rebuild).

Answer

Perform these tasks in this sequence to totally re-define the tape devices to TSM. These steps should be taken only if attempts to update the devices/paths using the autodetect features have failed:

1) Before deleting anything, gather the output from these commands, so you can use the same naming conventions when re-defining the tape devices:

QUERY STATUS (get SERVERNAME value for "<tsm_server>")
QUERY DEVCLASS
QUERY LIBRARY FORMAT=DETAIL
QUERY DRIVE FORMAT=DETAIL
QUERY PATH FORMAT=DETAIL

2) Run the appropriate OS command to produce a list of the configured HW 'special file' device names.

    AIX   ==>   lsdev -Cc tape           (-or- 'cfgmgr')
                lsdev -Cc adsmtape       (for TSM devices)
                lsdev -Cc library
 Solaris  ==>   ls -l /dev/rmt/*st       (-or- 'sysdef')
                ls -l /dev/rmt/*smc
   HP-UX  ==>   /usr/sbin/ioscan -funC tape
                (-or  'ioscan -kfn')
   Linux  ==>   lsscsi -g
                ls -l /dev/IBM*
                ls -l /dev/tsmscsi/*
                (-or- 'more /etc/sysconfig/hwconf')

If the tape devices are not defined to the OS, please work with your OS or SCSI/SAN hardware support to configure them. Until the OS can use the drives (can write to them, for example using 'tar' or 'dd') the tape devices cannot be defined to TSM.

3) From the '/dev' directory, write down the OS-level device definitions for the library and drives:

                AIX     Linux         Solaris    HP-UX
TSM Drives      mt#     tsmscsi/mt#   rmt/#      rmt/tsmmt#
IBM Drives      rmt#    IBMtape#      rmt/#st    rmt/#m
TSM Library     lb#     tsmscsi/lb#   rmt/#lb    tsmchgr#
358x Library    smc#    IBMchanger#   rmt/#smc   rmt/#chng
3494 Library    lmcp#   3494lib       libmgrc#   libmgrc#

3a) Drives and library identification:

  On Linux check the files /proc/scsi/IBMtape for the drives index and serial number Ex: /dev/IBMtape0 
  The file /proc/scsi/IBMchanger contain the index and serial number for the library
  
  On Windows, the command tsmdlst.exe /xinquiry (into directory C:\Program Files\Tivoli\TSM\console\) will 
  give you the name and serial number of drives and  library
  
  On AIX use the command lscfg -vpl rmt<x> or smc<x> to identify tape drives and libraries
  

4a) First the drives and drive paths must be deleted. From a TSM Server admin commandline, for all the drives:

 DELETE PATH  <tsm_server>  <drive_name>  SRCTYPE=SERVER  DESTTYPE=DRIVE  LIBRARY=<library_name>

4b) Then delete all the TSM drive definitions:

 DELETE DRIVE  <library_name>  <drive_name>

5a) Next, delete the path for the tape library:

 DELETE PATH  <tsm_server>  <library_name>  SRCTYPE=SERVER  DESTTYPE=LIBR

5b) And finally delete the TSM library definition:

 DELETE LIBRARY  <library_name>

If the OS cannot access the tape drives at this point, stop. Check hardware, device drivers, update firmware, swap cables; consider power-cycling the tape library then deleting and re-defining to the OS. There is no point attempting to get TSM to write to the devices if they are not recognized by the OS; work with OS and/or hardware vendors to resolve HW issues before proceeding.

6a) Now the tape library and library path can be re-defined. Use the TSM QUERY outputs from “Step 1” as a guide for the library name and LIBTYPE; no additional parameters are necessary in the syntax below. Redefine the library:

 DEFINE LIBRARY  <library_name>  LIBTYPE=<library_type>  SERIAL=AUTODETECT

Note: If this TSM Server is hosting a tape library for other systems, for example any “TSM Server Library Clients” or “TSM Storage Agents” then you also need “SHARED=YES” on the “DEFINE LIBRARY”.

6b) Redefine the path to the library. For SCSI libraries, confirm the DEVICE value matches the latest OS-level info gathered from “Step 2”. For 3494, ACSLS, and other types of libraries using software configuration files, use the previous values from “Step 1” to redefine the DEVICE or ACSID, and so on:

 DEFINE PATH  <tsm_server>  <library_name>  SRCTYPE=SERVER  DESTTYPE=LIBRARY  DEVICE=</dev/lb#>

7a) Redefine the drives and drive paths. Redefine all the drives using names from “Step 1” for example:

 DEFINE DRIVE  <library_name>  <drive_name>  SERIAL=AUTODETECT  ELEMENT=AUTODETECT

7b) Redefine paths to all drives, using the OS-level info gathered from “Step 2” for the DEVICE values. Keep in mind the OS-level DEVICE values may have changed since the they were previously defined.

 DEFINE PATH  <tsm_server>  <drive_name>  SRCTYPE=SERVER  DESTTYPE=DRIVE  LIBRARY=<library_name>  DEVICE=</dev/mt#>

Note: If this TSM Server is hosting a tape library for other systems, for example any “TSM Server Library Clients” or “TSM Storage Agents” then in addition to the “TSM Server Library Manager” DRIVE PATH, you also need to define a new PATH for each drive for those systems, substituting the SERVERNAME (shown by “Q SERVER”) for the value of “<tsm_server>” and the local DEVICE value for the drive as seen by that other system.

8) Verify the library, drives, and paths are online:

QUERY LIBRARY  <library_name>  FORMAT=DETAIL
QUERY DRIVE   <library_name>  *  FORMAT=DETAIL
QUERY PATH  *  *  FORMAT=DETAIL

9) Since the library is “new” to TSM, the volumes must be checked in again to re-create the inventory (AUDIT LIBRARY does not CHECKIN). Use *this* sequence, first SCRATCH, then PRIVATE:

CHECKIN LIBVOL  <library>  SEARCH=Y STATUS=SCR CHECKL=BARC
CHECKIN LIBVOL  <library>  SEARCH=Y STATUS=PRIV CHECKL=BARC

NOTE: For ACSLS libraries, use “CHECKLABEL=NO” on the CHECKIN commands, because “CHECKLABEL=BARCODE” is not supported for an ACSLS Library.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

If that doesn't resolve the issue, the tape drive problem seems beyond the control of the TSM Server (software). Review the output from the OS-level logs for additional hardware error information:

                        Remove OS    Install
    OS   Diagnostics    Devices      OS Devices

——- ———— ——— ————

   AIX   errpt –a       rmdev        cfgmgr
 Linux   dmesg                       /dev/MAKEDEV

Solaris mbin/prtdiag rem_drv drvconfig

 HP-UX   dmesg          rmsf         insf -e

If you cannot reach HW support immediately, you could take the additional action of power-cycling in this order: 1) Tape library. 2) SAN switch (if any). 3) Consider updating to latest device drivers and/or firmware. 4) Halt TSM and reboot system with TSM Server. 5) Re-define the tape device to the OS (see commands above). 6) If tape device definitions have changed, DELETE & re-DEFINE to TSM.

And that is all we can do from a software perspective, if errors persist it points to an issue at a layer which TSM cannot repair.

on Windows server

Problem(Abstract)

Drives not working after system, library or cabling reconfiguration. Cause

There are times, especially when a system has been rebuilt, that it is necessary to remove & redefine the library & the drive(s). Sometimes there are specific errors associated with this as well (see Problem Abstract for example). Resolving the problem

Common errors that may be encountered after a library or recabling configuration may be: ANR8300E I/O error on library (OP=xx CC=xx KEY=xx ASC=xx ASCQ=xx SENSE=xx) ANR8441E Initialization failed for SCSI library ANR8301E I/O Error on library

NOTE: These steps apply to libraries of LIBTYPE=SCSI or (with the library path definition step removed) LIBTYPE=MANUAL. For libraries of LIBTYPE=ACSLS or LIBTYPE=EXTERNAL, refer to the TSM Server Administrator's Guide and the Storagetek (in the case of ACSLS) or External Media Management software vendor (in the case of EXTERNAL, e.g. Gresham) documentation for configuration information. This technote does not account for library client servers or storage agents in a library sharing environment. Additional steps will be needed to redefine drive paths for the library client servers and/or storage agents to the same drive definitions for which the library manager server's drive paths point to the same physical device.

This is specific to Microsoft Windows Operating Systems. These steps should only be used, after attempts to update the drive and paths using autodetect features have been exhausted.

1) Run the 'TSMDLST' command to produce a list of the configured OS devices. This command is located in the following directory of a standard install and should be run from a MS-DOS prompt: C:\program files\tivoli\tsm\console\

This information is usually (although not always) also viewable from the TSM Management Console's “Device Information” window under TSM Device Driver for the machine on which the TSM server is running.

2) Write down the 'TSM Name' for the library and drives: Library=lb#.#.#.# Drives=mt#.#.#.#

3) Gather the output of the following for a reference: QUERY LIBRARY <LIBRARY NAME> QUERY DRIVE <LIBRARY NAME> F=D QUERY PATH F=D

4) First the drive and library paths must be deleted.

Do this for all drives: DELETE PATH <SERVER NAME> <DRIVE NAME> SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=<LIBRARY NAME>

Do the following for the library: DELETE PATH <SERVER NAME> <LIBRARY NAME> SRCTYPE=SERVER DESTTYPE=LIBRARY

5) Now the device reference must be deleted. Do the following for all drives: DELETE DRIVE <LIBRARY NAME> <DRIVE NAME>

Then for the library: DELETE LIBRARY <LIBRARY NAME>

6) Now the devices can be redefined to TSM. Use the query outputs from step 3 as a guide for the device names. First, redefine the library: DEFINE LIBRARY <LIBRARY NAME> LIBTYPE=<LIBRARY TYPE> (NOTE: If this is a shared library, add SHARED=YES to the above definition)

7) Next, redefine the path to the library. Often, drive and drive path definitions cannot be created until the TSM server is able to communicate with the library in which the drives exist.

Redefine path to library using the library device value from step 2: DEFINE PATH <SOURCE NAME> <DESTINATION NAME> SRCTYPE=SERVER DESTTYPE=LIBRARY DEVICE=lb#.#.#.#

8) Redefine the drives: DEFINE DRIVE <LIBRARY NAME> <DRIVE NAME>

9) Redefine the paths to the drives. Use the information gathered from the 'tsmdlst' in step 2 for the device parameter. Use the query outputs from step 3 as a guide for the device names.

Redefine paths to all drives: DEFINE PATH <SOURCE NAME> <DESTINATION NAME> SRCTYPE=SERVER DESTTYPE=DRIVE LIBRARY=<LIBRARY NAME> DEVICE=mt#.#.#.# AUTODETECT=YES

NOTE: For multivendor libraries (as in libraries whose drives are not from the same vendor, e.g. a Dell Powervault 136T with IBM LTO drives), the autodetect feature may not function in such a way to automatically detect the drive's element and serial numbers. In that event, refer to the device's worksheet (often found by going to www.ibm.com/support and searching on the make & model of the library itself) to obtain a list of valid drive element numbers. This information may also be available through the use of vendor-specific library querying utilities (the vendor equivalent of the IBMTape utility “ntutil.exe”).

8) Check all of the Scratch volumes back in. IMPORTANT - you MUST check in the Scratch volumes first or ALL volume will be marked as “Private.” CHECKIN LIBVOL <lib_name> SEARCH=YES CHECKLABEL=BARCODE STATUS=SCRATCH

9) Check in the Private volumes as well. CHECKIN LIBVOL <lib_name> SEARCH=YES CHECKLABEL=BARCODE STATUS=PRIVATE

tsm/tsm_libr_error.txt · Last modified: 2021/01/01 21:25 (external edit)