Posts tagged ·

device

·...

Redefining TSM Library and Drives for UNIX OS

Comments Off

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  ==>   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  <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.

 

 

Comments Off

Running ‘cu’ to modem tty results in device locked error

Comments Off

 Technote (FAQ)
 
Question
I have a modem attached to tty0 and am trying to run this command:
# cu -ml tty0

Which results in this error:
0835-028 device locked

How can I resolve this issue?
 
Answer
Check the permissions of the /var/locks file.

# ls -ld /var/locks
drwxrwxrwt 3 root system 256 Feb 23 20:05 /var/locks

The default permission and ownership should look like above.

To set the permissions as above (rwxrwxrwt ), use this command:
# chmod 1777 /var/locks

 
 
 
Comments Off

Locating and Moving I/O Devices Dynamically on System p

Comments Off

 Technote (FAQ)
 
Question
Where can one find the procedures needed to locate I/O slots that can be moved dynamically between logical partitions (LPAR) on a HMC managed system p server?
 
Cause
One of the most common devices that administrations want to move is a tape controller or a DVD drive controller so they can install or backup software.
 
Answer
The procedures one would need to follow for removing and adding an I/O slot dynamically can be found in the references listed below, but the basic steps are as follows:
- Identify the owner of the I/O slot for the device you need to managed.
- Logically remove the PCI device from the owning operating system.
-- ID the PCI device associated with the physical slot
--- In AIX
lsslot -c slot
--- In IOS (virtual I/O server)
lsdev -slots
-- Removed the PCI device and all child devices
--- In AIX
rmdev -Rdl pci#
--- In IOS
rmdev -dev pci# -recursive
- Perform the dynamic logical partition operation from the HMC
- Configure the new device on the gaining partition
-- In AIX
cfgmgr
-- In IOS
cfgdev

More detail about the typical dynamic logical partition procedures are available in the following references:

Partitioning Implementations
for IBM Eserver p5 Servers
http://www.redbooks.ibm.com/redbooks/pdfs/sg247039.pdf

Extract follows:

5.3.2 Internal activity for I/O slots in a DLPAR event

Dynamic removal and addition of I/O adapters has been provided by AIX
prior to DLPAR support, utilizing the PCI adapter Hot Plug capability on the IBM RS/6000 and IBM pSeries server models. To allow for the dynamic addition and removal of PCI I/O slots, AIX 5L Version 5.2 provided enhancements to the lsslot command have been made.

PCI slots and integrated I/O devices can be listed using the new
connector type slot in the lsslot command, as shown in the following
example:

# lsslot -c slot
The output of this command looks similar to the following:
#Slot Description Device(s)
U1.5-P1-I1 DLPAR slot pci13 ent0
U1.5-P1-I2 DLPAR slot pci14 ent1
U1.5-P1-I3 DLPAR slot pci15
U1.5-P1-I4 DLPAR slot pci16
U1.5-P1-I5 DLPAR slot pci17 ent2
U1.5-P1/Z1 DLPAR slot pci18 scsi0

Before the I/O slot removal, you must delete the PCI adapter device and all its child devices from AIX. Given that ent2 in the slot U1.5-P1-I5 in the previous example is not used, the devices could be removed using the following command as the root user on the partition.

# rmdev -l pci17 -d -R

After the devices have been removed from AIX, the I/O slot can be
removed from the partition using the graphical user interface or command line interface on the HMC.

Note: Any PCI slots defined as required are not eligible for the DLPAR operation.

Procedures to use the HMC GUI to dynamically manage I/O slots can be found at following URL:

Dynamically managing physical I/O devices and slots
http://publib.boulder.ibm.com/infocenter/eserver/v1r3s/index.jsp?topic=/iphbl/iphbldlpariop.htm
 
 
 
Comments Off