Wednesday, September 8, 2010

Redefining TSM Library and Drives for UNIX OS

Have you experienced problem with offline path of drive and library in TSM server?
Have you received these errors?
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
or
ANR3512E RECLAIM STGPOOL: Error encountered in accessing data storage - insufficient number
of mount points available for removable media.
ANR1463E RUN: Command script BCK_RECLAIM completed in error.
ANS8001I Return code 14.
or
ANR8840E      Unable to open device /dev/smc0 with error
ANR8840E      Unable to open device /dev/rmt0 with error
ANR8840E      Unable to open device /dev/rmt1 with error
or
UPDATE PATH source destination SRCTYPE=SERVER AUTODetect=Yes DESTTYPE=DRIVE LIBRARY=name DEVICE=/dev/rmt0 ONLINE=YES
ANR8420E UPDATE PATH: An I/O error occurred while accessing drive .
ANS8001I Return code 15.


IBM guys have made nice "How to redefine TSM Library and Drives for UNIX OS"
http://www-01.ibm.com/support/docview.wss?uid=swg21376419&myns=swgtiv&mynp=OCSSGSG7&mync=E

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 "")
  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  ==>   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#

4a) First the drives and drive paths must be deleted. From a TSM Server admin commandline, for all the drives:
   DELETE PATH      SRCTYPE=SERVER  DESTTYPE=DRIVE  LIBRARY=

4b) Then delete all the TSM drive definitions:
   DELETE DRIVE    

5a) Next, delete the path for the tape library:
   DELETE PATH      SRCTYPE=SERVER  DESTTYPE=LIBR

5b) And finally delete the TSM library definition:
   DELETE LIBRARY  

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    LIBTYPE=  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      SRCTYPE=SERVER AUTODetect=Yes DESTTYPE=LIBRARY  DEVICE=

7a) Redefine the drives and drive paths. Redefine all the drives using names from "Step 1" for example:
   DEFINE DRIVE      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      SRCTYPE=SERVER AUTODetect=Yes  DESTTYPE=DRIVE  LIBRARY=  DEVICE=

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 "" 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    FORMAT=DETAIL
  QUERY DRIVE    *  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    SEARCH=Y STATUS=SCR CHECKL=BARC
  CHECKIN LIBVOL    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.

No comments:

Post a Comment