24 September 2013

Useful AIX commands used for Tivoli Storage Manager (TSM)

1) How to start TSM B/A Client schedule services in AIX in background? 


# cd /usr/tivoli/tsm/client/ba/bin

# nohup dsmc sched  &     


2) How to start TSM web client services in AIX ?


nohup dsmcad &   

3) How to start B/A client in web-browser ?


 http://ip.address.of.server>:1581


4) How to start the TSM LANFree storage agent services in AIX ?


# cd  /usr/tivoli/tsm/StorageAgent/bin

# nohup ./dsmsta &        

5) How to check the TSM services are running in AIX ?


ps -ef | grep -i  dsmserv    

6) How to start the TSM services in AIX ?


For TSM 5.5 --> # cd /usr/tivoli/tsm/server/bin
For TSM 6.X --> # cd /opt/tivoli/tsm/server/bin

and then run below command to start in background


./dsmserv &

7) How to kill the TSM services in AIX ?

First check the services by using ---- > ps -ef | grep -i dsmserv

It will list out the process id's, then cancel the process id by using below command


kill -9 <PID no>

8) How to check the tape devices list in AIX ?


lsdev -Cc tape

9) How to check the adapters in AIX ?


lsdev -Cc adapter

10) How to check the errors in OS level in AIX ?


errpt -a 



11) How to check the tape serial number in AIX ?


lscfg -vpl <devicename> (Ex- rmt1)

12) How to create the new file in AIX ?


cat>file name   OR
touch <filename>    OR
vi <filename>

13) How  to read last 200 lines in any file ?


tail -200 <filename>


14) How to check the file size in AIX ?


df -k <filesystemname> (To check in kbs)

df -m <filesystemname>(To check in mbs)

df -g <filesystemname> (To check in gbs)


15) How to verify the list of files in a directory ?


ls -ltr

16) How to change the ownership of the file ?


chown username:groupname <filename>


17) How to copy the file from one dir to another dir ?


cp <filename> /dir/dir/<filename>


18) How to check  the IP address in AIX ?


ifconfig -a

19) How to check the hostname of the server ?


# hostname

20) How to check the communication b/w from one server to another server in AIX ?


ping ipaddress

21) How to check if the port number is working or not in AIX ?


netstat -an <portnumber>

exnetstat -an 1500

22) How to create a new directory in AIX ?


mkdir <directoryname>


23) how to move (cut/paste) the files form one directory to another directory in AIX?


mv   /dir1/dir2<filename>  /dir4/dir5/dir6/<filename>

24) To remove/delete the directory and files in AIX ?


rmdir -r <dirname>       -r --> deletes subdirectories also

25) To check which software applications are installed in AIX ?


To check TSM, run ------- >   lslpp - l tivoli.tsm*


26) How to edit any file, for example dsm.sys file ?


vi dsm.sys


use i to go to insert mode, a to append mode , x to delete letters

27) How to change permissions of a file/directory ?


 # chmod 777 <file/dirname>

28) How to configure tape devices in AIX ?

Running cfgmgr command will scan all the devices attached to the AIX machine


# cfgmgr

29) How to install any software packages in AIX ?


using # smitty installp OR

# installp -agXd /softwares/install.bin
Ex: # installp -agXd .tsmsoft/install.bin

30) How to uninstall software packages for example all the tsm client softwares ?


# smitty remove tivoli.tsm.*

# installp -ug tivoli.tsm.*

Go to /opt/tivoli/tsm/_uninst and run  ./Uninstall_Tivoli_Storage_Manager -i console command 


Tivoli Storage Manager Server on AIX Video Tutorial




23 September 2013

Latest Tivoli Storage Manager TSM interview questions by IBM

Below are some of the latest IBM Tivoli Storage Manager Interview Questions asked by IBM  team for L2 and L3 Level TSM administrator positions. Interview was conducted in mid September 2013 and all are Face-Face Interviews. we have tried to answer most of the questions, I recommend you to also to prepare your own answers from IBM Redbooks. Each Interview went for about an hour with 30-40 questions to each person. I am only posting 25 questions here, please follow my next posts for more question and answers.....

TSM L3 Interview Questions and Answers:

  • How to check the number of client node counts?
                    select count(*) from nodes
  • How to check the scheduled associations ?
            q assoc
           select * from associations where SCHEDULE_NAME='<schname>' 


  • How to take the sql log backup?
          tdpsqlc backup <dbname> log
  • If you have multiple nodes on tdpsql, how will you take particular node log backup ?
         Login to particular node and take backup, or associate a schedule to that node.   
  • In single AIX machine I need to store 10 nodes data for different servers,  tell me the process?
         create 10 stanzas in dsm.sys and choose those stanzas by mentioning particular                     servername in dsm.opt file.
  • How will you take particular node backup ?
       associate a schedule to that node.   
  • What is offsite reclamation ?
    offsite reclamation is done by updating the dbreferences of the copy volumes that are present in the vault.

Ex:- if a copy vol consist of 10% valid data the server fetches the primary stg volume which consists of this valid data and takes a backup to a copy volume and update the references to a copy volume.
  • Tell me the TSM Server up-gradation process?
   ->  First take backup of db, volhist, devconfig, dsmserv.opt, dsmserv.dsk.
   ->  Install upgrage tool, go to the path and give the cmd dsmupgrd preparedb, uninstall 5.5. 

   -> Install 6.x, go to up-gradation wizard there it will extract the old db and insert it into new db, dsmupgrd extractdb, dsmupgrd insertdb
  • Tell me the server installation process ?
         Go through the TSM Server Installation Document.
  •  Why we are creating a group & users ?
    To monitor the privileges & permissions of each user in a group on the TSM server instance.
  • Which AIX versions you are using?
         6.1
  • Which library you are using?
         IBM 3584 Tape Library

  • What is tapeutil command and its uses ?
     Read   for more Tapeutility and Mtlib Commands
 
    By using tapeutil we can manage libr and drives from os level,it act as tape diagonastic tool, (list cleaning tapes, moving tapes b/w slots, mounting, dismounting, eject).

tapeutil -f /dev/smc0 elementinfo     Displays element information - library information
tapeutil -f /dev/smc0 inventory     Displays the element status information
tapeutil -f /dev/smc0 inventory -i     Display only the import/export element status information
tapeutil -f /dev/smc0 inventory |grep -p Import     Display only the import/export element status information
tapeutil -f /dev/smc0 inventory |sed -n '/Import/,/^$/p'     Display only the import/export element status information
tapeutil -f /dev/smc0 inventory -i |awk '/Tag/ {if ( $4 != "" ) print $4; else print "IO_SLOT_EMPTY"}'     Display tapes in the I/O door
tapeutil -f /dev/smc0 move X Y     Move tape from slot element number X to slot element number Y
tapeutil -f /dev/smc0 devids     Display device ID element status information for all drives
tapeutil -f /dev/rmt1 status     Query drive status
tapeutil -f /dev/rmt1 vpd     Display drive Vital Product Data (VPD)
tapeutil -f /dev/rmt1 devinfo     Show device information
tapeutil -f /dev/rmt1 path     Check tape and path SCSI information
tapeutil -f /dev/rmt1 fuser     Display which process is using the drive
tapeutil -f /dev/rmt1 mount <element number>     Mount tape from element number on drive rmt0
tapeutil -f /dev/rmt1 unmount <element number>     Dismount tape from element number on drive rmt0
tapeutil -f /dev/rmt1 inqpage 83     Show drive serial


mtlib
mtlib -l /dev/lmcp0 -qL     Library status
mtlib -l /dev/lmcp0 -A     Library address information
mtlib -l /dev/lmcp0 -qS     Library information and statistical data
mtlib -l /dev/lmcp0 -DE     Display drives information
mtlib -l /dev/lmcp0 -qM     Show mounted tapes
mtlib -l /dev/lmcp0 -vqI     Category codes for tapes - tapes information
mtlib -l /dev/lmcp0 -qV -V VolName     Information about tape
mtlib -l /dev/lmcp0 -vqV -V VolName     Information about tape (verbose)
mtlib -l /dev/lmcp0 -qI     List tapes
mtlib -l /dev/lmcp0 -qD -f /dev/rmt1     Drive status
mtlib -l /dev/lmcp0 -a -V VolName     Barcode, examine tape to assure that it is physically in library
mtlib -l /dev/lmcp0 -vqK -s FFFD     Number of 3590 cleaning tapes
mtlib -l /dev/lmcp0 -qC -s FFFD     List 3590 cleaning tapes
mtlib -l /dev/lmcp0 -qC -s FFF4     List 3592 cleaning tapes
mtlib -l /dev/lmcp0 -C -V VolName -s<current category> -t<new category>     Change volume category
mtlib -l /dev/lmcp0 -vC -V VolName -t FFFB     Remove tape from 3494 inventory
mtlib -l /dev/lmcp0 -vC -V VolName -t FF10     Eject tape
mtlib -l /dev/lmcp0 -f /dev/rmt0 -m -V VolName     Mount tape
mtlib -l /dev/lmcp0 -m -x drive_serial -V VolName     Mount tape
mtlib -l /dev/lmcp0 -f /dev/rmt0 -d     Dismount tape
mtlib -l /dev/lmcp0 -x device_serial -d     Dismount tape

  • How to move volume from one slot to another slot using tapeutil ?
         tapeutil -f /dev/smc0 move x y
  • How will you do cartridge cleaning?
    ->checkin libvolume Lib_Name Clening_tape_name status=cleaner cleanings=10 checklabel=no

    ->update drive Library_name drive_name cleanfrequency=100 (cleanfrequency parameter Gigabytes / ASNEEDED / NONE)

   -> clean drive librname drivename

  • How to define a  client schedule & what is the first line in shell script?
    Define sched domainname schedname  action= incre/full startdate=today     starttime=now+2:00   
    firstline in shell script:-    #!/bin/sh
   

  • How will you check the drm copy storage pool ?
        q drmst
  • Today I need to send tapes to offsite how ?
    move drm *  wherestate=mountable tostate=vault
  • How to move volumes from vault to vaultretrieve?
    after expiration and reclamation the tapes automatically changes from vault to vaultretrieve
  • What is the process to do  if you get 100 new scratch volumes?
    -> Insert the tapes in the library slots
   ->  Label libvol <libr name> search=yes checkin=scratch labelsource=barcode

  • While labeling why you are giving labelsource=barcode?
    For writing the barcode name on the tape
  • In which command will you create the devconfig.out in Lanfree?
       dsmsta setstorageserver myname=.........
 

IBM Tivoli Storage Manager TSM L2 support interview question and answers

Below are some of the latest IBM Tivoli Storage Manager Interview Questions asked by IBM  team for L2 and L3 Level TSM administrator positions. Interview was conducted in mid September 2013 and all are Face-Face Interviews. we have tried to answer most of the questions, I recommend you to also to prepare your own answers from IBM redbooks. Each Interview went for about an hour with 30-40 questions to each person. I am only posting 25 questions here, please follow my next posts for more question and answers.....

   TSM L3 Level Interview Question and Answers:                                          

1) How to create a policy set ?
    

    def dom <domname>
    def pol <dom> <polname>

2) How to create a copy group?


    def copyg <dom> <polname> <mgmtname> vere=2 verd=1 rete=30 reto=60 dest=<stg pool> 


    def copyg <dom> <polname> <mgmtname> dest=<stg pool> t=archive retv=365


3) What is serialization? How many types?


    It specifies how the tsm server to act when the file is in open state.


    SHRSTatic:- the tsm will try for 4  time and finaly it does not take backup if it is still in open
    STatic :- the tsm will try only one time, if the file is open it will not take backup
    SHRDYnamic:- the tsm will try for 4  time and finaly it does not take backup if it is still in open
    DYnamic:- the tsm will backup up at the first attempt even if the file is open.

4) What is version exists ?what is version delete ?What is retextra ?what is retonly ?

 
    vere:- how many versions of file has to be maintained (default 2 Versions)
    verd:- how many inactive versions are to be maintained after the source file has been deleted.(1V)
    rete:- how many day the inactive versions are to be maintained(30Days)
    reto:- how many day the last inactive file is be maintained after source file deleting(60Days)

5) What is diff b/w version delete & retextra?


verd:- how many inactive versions are to be maintained after the source file has been deleted. (1)
rete:- how many day the inactive versions are to be maintained (30)
 
 6) How to check the last completed db backup?

    q db f=d, q volhist t=dbb, q act se="backup db" begind=-1

7) How to check the storage pool volumes?
   

     q vol stg=<stgpoolname>

8) If I run q libvol, what will it show?

 
    library volumes names, elementary no., library name, owner, status (private or scratch)

9)In which scenario we will do move data?
    

When there is shortage of scratch volumes and also when there are errors in volumes.
   
10) How will you know whether your tsm server is properly working or not?


    health monitoring ( dbspace, scratch, logspace, dbbackup, libr status)
   
11) Where will you check the tsm server side errors?
  

  q act se=anr????e (server)

12) Where will you check the tsm client side errors?
  

  q act se=ans????e (client), for schedule errors check dsmsched.log and dsmerror.log
   
13) What is the procedure to do server to server communication?


    def server <servername> serverpa=<pass> hla=192.168.25.45 lla=1500 crossdef=yes

14) What does crossdefine will do?

 
    To define the server on target server

15) Do you have any knowledge on backupset?


    It contains only the active data of a node,and can be restored without server intervention.

16) What is TXNgroupmax ?

 
    It is the number of files that can send or receive in a group in one transaction b/w server or client, default 4096

17) What is TXNbytelimit?


    txnbytelimit:-   The txnbytelimit option specifies the number of kbs the client program buffers before it sends a transaction to the server. default 25600, range is 300 - 2 GB;

18) What are the required copygroup parameters for tdporacle?


   Verdeleted and Retonly should be zero because TDPO will provide a function to delete the unwanted backup objects from TSM Server. 
Versionexist and Retextra can be any number.

19) Who will take care about retentions for TDPoracle?
    

      Through RMAN
   
20) Who will take care about retentions for TDPsql ?


    TSM Server

21) How to check dbbackup processes details ?


    q volhist t=dbb
    q db f=d
    q act se="databasebackup" begind=-1

22) How to delete last 7th day db backup ?


    del volhist t=dbb todate=-7


23) What are the copy group parameters for TDPsql ?
  

  VersionExist, VersionDeleted, RetentionExtra and RetentionOnly

24) In one storagepool, how many deviceclasses are defined?

    1


25) Interviewer ran Q mount command and asked to find out where that tapevolume is used ?

    q act se=volname 

    q pr, 
    q mount f=d

19 September 2013

How to Configure TSM Library Manager and TSM Library Clients in SAN Environment

Using Single Tape Library for multiple TSM Servers in a SAN environment will allow efficient use of Tape Library resources. Single tape library can perform the backup/restore requests for multiple TSM servers if it is configured properly by meeting all the requirements. The functionality of sharing tape library is split into two components  the Library Manager and the Library Client. You can know more about library manager, library client and it operations in this page What is TSM Library Manager and Library clients.

The Library manager receives the requests from the library clients and physically controls the library operations like mount/dismount, checkin/checkout and labelling tape volumes. The Library Manager has the ability to control the status, ownership and location of all the tape volumes inside the tape library.

To send requests from the library client to the library manager, and to send the response from the manager to the client, the server-to-server communication protocol is used. That means that a TCP/IP connection is necessary and the two Tivoli Storage Manager servers must be configured to each other

The following steps are required for Tivoli Storage Manager servers to share library resources on a SAN:

  • Ensure the server that will be defined as the library manager is at the same or higher version as the TSM servers that will be defined as library clients.
  • Set up server-to-server communications between Library clients and Library Manager.
  • Configure the library on the Tivoli Storage Manager server that is going to act as the library manager.
  • Configure the library on the Tivoli Storage Manager servers that are going to act as the library clients.

In this example I have taken 2 TSM Servers (PROD & DEV) where PROD acts as Library Manager and DEV acts as Library client. You should make sure that Library manager is having same or higher version compared to all the library clients.


How to Setup Server-to Server Communication

  • First, we have to set the Server name and server password for communication on the PROD Server & DEV server separately by using set server commands as below.

On PROD Server

set servername PROD
Set serverpassword PASSWORD
set serverhladdress 192.168.0.240
set serverlladdress 1864
Set crossdefine

similarly on DEV Server

set servername DEV
Set serverpassword PASSWORD
set serverhladdress 192.168.0.243
set serverlladdress 1864

  • Now we have to define all the library clients as servers in Library manager. In our case we have only one library client.
define server DEV serverpassword=PASSWORD hladdress=192.168.0.243 lladdress=1864 crossdefine=yes

Configuring Library on TSM Server which is a Library Manager:

1. To configure any library to a TSM server, you have to follow these prerequisites.
  • Physically attach the devices to the SAN.
  • On each server system that will access the library and drives, install and configure the appropriate device drivers for the devices.
  •  Determine the device names that are needed to define the devices to Tivoli Storage Manager
2. Now, configure the library on a TSM server which acts as a Library Manager. In our case PROD Server is our desired library manager.

  • Define a shared SCSI library named TSMLIB

                       define library TSMLIB libtype=scsi shared=yes

  • Define a path from the server to the library

              define path PROD TSMLIB srctype=server desttype=library device=/dev/smc0

  • Define the drives in the library

                      define drive TSMLIB Drive01
                     define drive TSMLIB Drive02

  • Define a path from the server to each drive

          define path PROD Drive01 srctype=server desttype=drive library=TSMLIB                                 device=/dev/rmt0
         define path PROD Drive02 srctype=server desttype=drive library=TSMLIB                                 device=/dev/rmt1

  • Define all the device classes that are associated with the shared library.

                   define devclass LTO4 library=TSMLIB devtype=LTO

  • Check in the library inventory. Check in volumes that are already labeled:

          checkin libvolume TSMLIB search=yes status=scratch checklabel=barcode
  • Label and check in volumes:

           label libvolume TSMLIB search=yes labelsource=barcode checkin=scratch
  •  Define required storage pools for the shared library with a maximum number of scratch volumes.

                    define stgpool tapepool LTO4 maxscratch=77


Configuring Library on TSM Server which is a Library Client

  • Define the server that is the library manager:

    define server PROD serverpassword=PASSWORD hladdress=192.168.0.240                             lladdress=1864 crossdefine=yes

  • Define the shared library named TSMLIB, and identify the library manager server's name as the primary library manager.

          define library TSMLIB libtype=shared primarylibmanager=PROD

Perform this step from the library manager

Define a path from the library client server to each drive that the library client server will be allowed to access. The device name should reflect the way the library client system sees the device. it is best practice for any library sharing setup to have all drive path definitions created for the library manager also created for each library client.

define path DEV Drive01 srctype=server desttype=drive library=TSMLIB device=/dev/rmt4

define path DEV Drive02 srctype=server desttype=drive library=TSMLIB device=/dev/rmt5

You have to do this step similarly for all the library clients 

Return to the library client for the remaining steps.

  • Define all the device classes that are associated with the shared library.

            define devclass LTO4 library=TSMLIB devtype=LTO

  •  Define the storage pool, tapepool, which will use the shared library.

               define stgpool tapepool LTO4 maxscratch=77

Similarly, Repeat this procedure to define additional servers as library clients.

Set the parameters for the device class the same on the library client as on the library manager. A good practice is to make the device class names the same on both servers, but this is not required.

If you want to define seperate device classes on library clients, then follow these steps.
  1. Create an additional device class on the library manager server. Specify the parameter settings you want the library client to use.
  2. Create a device class on the library client with the same name and device type as the new device class you created on the library server.

After doing all these steps, you can store the clients data by either of these two procedures. 
  1. Have clients back up data directly to tape.
  2. Have clients back up data to disk and then migrate it to tape

TSM Library Manager, TSM Library Clients and Storage Agent Compatibilities


TSM Server (Library Manager) Versions
TSM Library Clients and Storage Agent Versions
6.3
6.3, 6.2, 6.1 and 5.5 *
6.2
6.2, 6.1 and 5.5
6.1
6.1 and 5.5
5.5
5.5

* = Tivoli Storage Manager 5.5 Storage Agent and Library Client will be supported with Tivoli Storage Manager 6.3.x servers during the upgrade of Tivoli Storage Manager 5.5 servers to Tivoli Storage Manager 6.3.x.


18 September 2013

What are the Tivoli Storage Manager library manager and library clients in TSM SAN environment

TSM Library Manager and TSM Library Client methods are used in the Tivoli Storage Manager environment where a single Tape Library has to be shared among 2 or more TSM Servers and Storage Agents in a SAN environment. Sharing a tape library means that multiple TSM Servers will use the tape drives of a library for their operations at the same time. Because only one drive can be used by one server at a time, there has to be someone who controls the access to the physical devices.

This is done by serializing the access to the devices. In addition to the control of the devices the library manager also has to control the status, ownership and location of the tape volumes inside the tape library. The library manager is the only Tivoli Storage Manager server with the inventory information of the shared tape library. The library manager is the only Tivoli Storage Manager server who knows all volumes that are inside a library. To learn how to configure Library Manager and Library Client visit this page How to Configure TSM Library Manager and TSM Library Clients in SAN Environment


Tivoli Storage Manager(TSM) Library Manager in SAN Environment:

The library manager is the only Tivoli Storage Manager server which performs operations to the library. The task of the library manager is to physically control the library. All the communication with the library is done by this server. The library manager will also serialize the access to the tape drives, so that only one server is using a tape drive at the same time.

The checkin and checkout of volumes will be performed by the library manager only. This server is the only server with a library inventory table for that library. The ownership is added to the inventory table to keep track which tape belongs to a certain library client. This is the only server in the environment that knows all the volumes. The library manager can also use the library for its own purposes, without being a library client at the same time.

TSM Library Manager Operations:

Library initialization 
Since the library manager is the only Tivoli Storage Manager server which interacts with the library, the initialization will be done by this server during the start-up process of the server.

Volume mount/dismount
The library manager can be contacted by the clients which send mount and unmount requests. These requests will be carried out, and afterwards, a response will be sent to the clients.

 Checkin/Checkout Volumes
Only the library manager can checkin and checkout out tape volumes. The clients do not have the right to perform a checkin or checkout command.

 Auditing Library
The library inventory is maintained only on the library manager. The audit process on the library manager checks the presence of the volumes and the actual slot locations.

What is Tivoli Storage Manager(TSM) Library clients in SAN Environment:

The library client uses the Library Manager for the handling of the physical hardware. The client send the requests to the library manager, and afterwards reads or writes to the tape drive it was given access to.

To send requests from the library client to the library manager, and to send the response from the manager to the client, the server-to-server communication protocol is used. That means that a TCP/IP connection is necessary and the two Tivoli Storage Manager servers must be configured to each other. In an environment with multiple library clients, there is no need to have each Tivoli Storage Manager server configured to every other Tivoli Storage Manager server, 
because the communication has always been done directly with the library manager.

TSM Library Client Operations:

  • No library client has access to the library in the same way that it can control the gripper to mount a volume. The library client has to send a request to the library manager, which controls the library and mounts volumes.
  • If a new volume is needed the library client sends a request to the library manager. The library manager chooses a scratch tape and updates the ownership of the tape. After doing this a response is send to the client, and the client then can issue a mount request in order to use the volume. 
  • If a volume is not used any more, the library client sends a release request to the library manager and the tape will be returned to the scratch pool.
  • The audit library operations is used to update the library manager’s inventory information. The library client sends the library manager the name of the tapes it is using, so that the ownership of the tape volume can be updated in the library inventory table of Library Manager.
  • The library client has no library inventory table for a shared library. Even so, storage pool volumes can be seen with the query volume command, and database backup volumes can be seen with the query volhistory command. The DRM volumes table can also be queried.


Steps to Follow to Configure TSM Library Manager and TSM Library Clients:

Below table describes the high-level steps involved to configure Tape Library sharing in a Multiple TSM Server Environment. You can get detailed steps in TSM Administrator Guide Book. The most important prerequisites to use this feature is that the library manager must be at a higher Tivoli Storage Manager version than the library clients. For example, a Tivoli Storage Manager 6.3 server cannot be a library client to a Tivoli Storage Manager 6.1 library manager.




TSM Library Manager Configuration
TSM Library Client Configuration


1) Define a shared library

9) Define the server that is the library manager. Make sure to use the "crossdefine=yes" option of the DEFINE SERVER command.



2) Define the library path.


10) Define a shared library using the same name as the library defined on the library manager. Specify the library manager server name for the PRIMARYLIBMANAGER option.


3) Define the drive(s).


12) Define the device class, making sure to specify the shared library name from step 10.


4) Define the path for the drive(s).


13) Define the storage pool

5) Define device class.



6) Check in your volumes into the library



7) Define a storage pool.



8) Issue the "query status" command to verify "crossdefine "is set ON



11) Define a path between the library client server to each drive using the server definitions that were created as a result of executing step one of the library client configuration.