User Tools

Site Tools


tsm:tsm_install

TSM v8.1 installation on AIX / Linux

https://blog.thomasbaumann.com/blog/spectrum-protect-systemd-dsmserv-autostart

For fresh installations, issue the following command, to bypass prerequisites:

  • Installation wizard: ./install.sh -g -vmargs “-DBYPASS_TSM_REQ_CHECKS=true”
  • Console mode: ./install.sh -c -vmargs “-DBYPASS_TSM_REQ_CHECKS=true”
  • Silent mode: ./install.sh -s -acceptLicense -vmargs “-DBYPASS_TSM_REQ_CHECKS=true”

Disk design for TSM on UNIX / Linux

On linux

tsminst1 or instance_user's nofiles hard and soft limit is 65536

ulimit -Hn 65536
ulimit -Sn 65536

Add these limits into /etc/security/limit.conf

# cat /etc/security/limits.conf
tsminst1          soft   nofile     16192
tsminst1          hard   nofile     65536
Example for Redhat 8
[root@rhtsm01 ~]# cat /etc/sysctl.d/db2.conf
kernel.msgmax = 65536
kernel.msgmnb = 65536
kernel.msgmni = 131072
kernel.sem=250 1024000 32 4096
kernel.shmall = 18446744073692774399
kernel.shmmax = 18446744073692774399
kernel.shmmni = 32768
[root@rhtsm01 ~]# cat /etc/sysctl.d/tsm.conf
kernel.randomize_va_space = 2

vm.swappiness = 5
vm.overcommit_memory = 0
Example for Redhat 7

Tuning for linux (small config blueprint)

[root@rhtsm01 ~]# cat /etc/sysctl.d/db2.conf
kernel.msgmax = 65536
kernel.msgmnb = 65536
kernel.msgmni = 131072
kernel.sem=250 1024000 32 4096
kernel.shmall = 18446744073692774399
kernel.shmmax = 18446744073692774399
kernel.shmmni = 32768
[root@rhtsm01 ~]# cat /etc/sysctl.d/tsm.conf
kernel.randomize_va_space = 2
vm.swappiness = 5
vm.overcommit_memory = 0

As LVM is currently a standard, use it to split your datas on separate filesystems, it's easier to manage space.
Use multiple disks to increase performances, else queue_depth will be overloaded.
Setup the filesystems to be able to check space from OS and also from TSM, using q dirspace, q dbspace, q log f=d.
If everything in one filesystem, then TSM will create alerts on all components if the filesystem reach a certain threshold !!! <box 100% blue |Example of filesystems:> /opt/tivoli : binaries (slow disk)
/tsm/tsminst1/config : home dir for instance and user tsminst1 (medium disk)
/tsm/tsminst1/db01 : TSM database volume01 (use multiples volumes to prevent bottleneck on DB)
/tsm/tsminst1/db02 (minimum 2 disks for TSM database, commonly 4 are used high speed disks, up to 8 for large TSM servers)
…..
/tsm/tsminst1/archlog : archive logs for the TSM database (slow disk)
/tsm/tsminst1/alog : active logs for TSM database (high speed disk)
/tsm/tsminst1/stgpool01 : storagepool01 (use as much filesystems as stgpool) (slow disks with stripping)
/tsm/tsminst1/stgpool02
…..
</box>

Server preparation

On Linux

-K

  Keep, do not attempt to discard blocks at mkfs time (discarding blocks initially is useful on solid state devices and sparse / thin-provisioned storage). 
  

For IBM Spectrum Protect V8, format file systems with a command that is similar to the following example:

mkfs -t xfs -K /dev/mapper/3600507630081010578000000000002c3

For IBM Spectrum Protect V7, format a database file system by using a command that is similar to the

You must format file systems for each of the disk LUNs that the IBM Spectrum Protect server will use: • If you are planning to install an IBM Spectrum Protect V8 server, format database-related file systems and storage pool file systems with xfs.

For IBM Spectrum Protect V7, format a storage pool LUN by using a command that is similar to the following example:

mkfs -t xfs /dev/mapper/3600507630081010578000000000002c3
On AIX

IBM recommand 12GB of RAM, and 16 GB if you use deduplication. 4GB for little TSM server.

Define filesystems for TSM server:

[root@tsmsrv]/root# mklv -tjfs2 -ytsmbinlv tsmvg 2G        
[root@tsmsrv]/root# crfs -vjfs2 -m /opt/tivoli/tsm -d tsmbinlv -Ayes
[root@tsmsrv]/root# mount /opt/tivoli/tsm
[root@tsmsrv]/root# chfs –a size=+300M /usr

[root@tsmsrv]/root# df -g
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
….
/dev/hd9var        0.50      0.41   19%     5868     6% /var
/dev/hd3           1.00      1.00    1%       28     1% /tmp
/dev/hd1           2.00      1.73   14%    20130     5% /home
/dev/hd10opt       0.50      0.35   30%     3879     5% /opt
/dev/tsmbinlv      2.00      2.00    1%        4     1% /opt/tivoli/tsm

Enable the device iocp0 (device required to install DB2):

[root@tsmsrv]/root# lslpp -l | grep iocp
  bos.iocp.rte              6.1.6.16  COMMITTED  I/O Completion Ports API
[root@tsmsrv]/root# chdev -l iocp0 -a autoconfig='available’
[root@tsmsrv]/root# mkdev -l iocp0

Software installation

Note:To force the install without prerequisites: ./install.sh -c -vmargs “-DBYPASS_TSM_REQ_CHECKS=true”

First download the TSM server v6 installation package from IBM web site:

[root@tsmsrv]/soft# chmod a+x CZG6SML_TSMSRV_AIX64_6.2.1.0.bin
[root@tsmsrv]/soft# ./ CZG6SML_TSMSRV_AIX64_6.2.1.0.bin

[root@tsmsrv]/soft# export LICENSE_ACCEPTED=true

[root@tsmsrv]/soft/TSMSRV-AIX64_6.2.1.0# ./install.bin -i console
Preparing to install...
Extracting the JRE from the installer archive...
Unpacking the JRE...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
Launching installer...
Preparing CONSOLE Mode Installation...
===============================================================================
Choose Locale...
----------------
    1- Deutsch
  ->2- English
    3- Español
    4- Français
    5- Italiano
    6- Português  (Brasil)

CHOOSE LOCALE BY NUMBER: 

2

===============================================================================
Tivoli Storage Manager                           (created with InstallAnywhere)
-------------------------------------------------------------------------------
===============================================================================
Tivoli Storage Manager Install
------------------------------
Welcome
Tivoli Storage Manager 6.2
Licensed Materials - Property of IBM Corp. (c) IBM Corporation and other(s) 
1994, 2010.  All rights reserved.  US Government Users Restricted Rights -- 
Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM
Corp.
It is highly recommended that you stop all other programs before continuing 
with this installation.
PRESS <ENTER> TO CONTINUE:
===============================================================================
 
 
    International Program License Agreement
    
    Part 1 - General Terms
    
    BY DOWNLOADING, INSTALLING, COPYING, ACCESSING, CLICKING ON AN
    "ACCEPT" BUTTON, OR OTHERWISE USING THE PROGRAM, LICENSEE AGREES TO
    THE TERMS OF THIS AGREEMENT. IF YOU ARE ACCEPTING THESE TERMS ON
    BEHALF OF LICENSEE, YOU REPRESENT AND WARRANT THAT YOU HAVE FULL
    AUTHORITY TO BIND LICENSEE TO THESE TERMS. IF YOU DO NOT AGREE TO
    THESE TERMS,
    
    - DO NOT DOWNLOAD, INSTALL, COPY, ACCESS, CLICK ON AN "ACCEPT" BUTTON,
    OR USE THE PROGRAM; AND
    
    - PROMPTLY RETURN THE UNUSED MEDIA, DOCUMENTATION, AND PROOF OF
    ENTITLEMENT TO THE PARTY FROM WHOM IT WAS OBTAINED FOR A REFUND OF THE
    AMOUNT PAID. IF THE PROGRAM WAS DOWNLOADED, DESTROY ALL COPIES OF THE
    PROGRAM.
    
 
Press Enter to continue viewing the license agreement, or enter "1" to 
   accept the agreement, "2" to decline it, "3" to print it, "4" to read 
   non-IBM terms, or "99" to go back to the previous screen.: 

1

===============================================================================
Component Selection
-------------------

Select the components to install.
    1- Tivoli Storage Manager Server
    2- Tivoli Storage Manager Server Languages
    3- Tivoli Storage Manager License
    4- Tivoli Storage Manager Devices
    5- Tivoli Storage Manager Storage Agent

ENTER A COMMA-SEPARATED LIST OF NUMBERS REPRESENTING THE DESIRED CHOICES: 

1,3,4

===============================================================================
TSM Environment Check
---------------------

………….
===============================================================================
Deployment Engine Initialization
--------------------------------

Please Wait
... 
Step 1 of 15...... 
Step 2 of 15....... 
Step 3 of 15... 
Step 4 of 15... 
Step 5 of 15... 
Step 6 of 15.... 
Step 7 of 15..... 
Step 8 of 15............... 
Step 9 of 15.... 
Step 10 of 15... 
Step 11 of 15.... 
Step 12 of 15...... 
Step 13 of 15.... 
Step 14 of 15... 
Step 15 of 15..... 
Completed.
===============================================================================
Pre-Installation Summary
------------------------

Review the Following Summary Before You Continue:

Product Name:
    Tivoli Storage Manager

Install Folder:
    /opt/tivoli/tsm

Components:
    TSM Server,DB2 9.7,TSM Client API 32 bit,TSM Client API 64 bit,TSM License,TSM Devices

Disk Space Information (for Installation Target): 
    Required:  1,817,895,629 bytes
    Available: 2,132,967,424 bytes

PRESS <ENTER> TO CONTINUE:
===============================================================================
Installation Complete
---------------------

The following components were successfully installed:

TSM Server
DB2 9.7
TSM Client API 32 bit
TSM Client API 64 bit
TSM License
TSM Devices

See /var/tivoli/tsm/log.txt for details.

To continue, either configure a new server instance or upgrade an existing 
server instance.

To configure a new server instance, choose one of the following methods:

  Log in as root user or administrator and open the local new-instance wizard, 
dsmicfgx, located in the server installation directory.
  Log on to a Version 6.2 Tivoli Storage Manager Administration Center and 
start the Create New Instance wizard.
  Configure the new instance manually. See the Tivoli Storage Manager 
Information Center, or the Installation Guide.

To upgrade an existing server instance, log in as root user or administrator 
and start the upgrade wizard, dsmupgdx, located in the server installation 
directory.  You can also upgrade a server manually. See the Tivoli Storage 
Manager Information Center, or the Server Upgrade Guide.

For more information about any of these tasks, see the Tivoli Storage Manager 
Information Center at:
  http://publib.boulder.ibm.com/infocenter/tsminfo/v6r2

PRESS <ENTER> TO EXIT THE INSTALLER:

DB2 configuration

Here we will only explain manual method step by step to do the setup of TSM server

If you want an easier way to configure you TSM server, use the Wizard:

Enable X11
Start the local version of the wizard:
Open the dsmicfgx program in the /opt/tivoli/tsm/server/bin directory.
This wizard can only be run as a root user.
You must create the instance user, and all directories and filesystems

DB2 works with a database directory, active logs and also archivelogs. Best practice is to use 1 disk for active logs, one for archivelogs and 4 for the database.

You can start multiples TSM servers on the same machine, but for each instance you need another user. Each server has the same database name (TSMDB1), but different instance name.

Restriction: The user ID and group name must comply with thefollowing rules: In the user ID, only lowercase letters (a-z), numerals (0-9), and the underscore character ( _ ) can be used. The user ID must be 8 characters or less, and cannot start with ibm, sql, sys, or a numeral. In the group name, only lowercase letters (a-z), numerals (0-9), and the underscore character ( _ ) can be used. The group name must be 8 characters or less, and cannot start with ibm, sql, or a numeral.

Samples size for TSM server:

Environment sizeDB sizearchivelogsactive logs
small environment (20 TSM clients)30 GB30 GB10 GB
medium environment (50 TSM clients60 GB60 GB20 GB
big environment (200 TSM clients120 GB100 GB40 GB

Creating folders and filesystems for TSM server:

/tsm : filesystem (2GB contain the tsminst1 home directory)
/tsm/config : home directory from user tsminst1
/tsm/tsmdb001, /tsm/tsmdb002, /tsm/tsmdb003, /tsm/tsmdb004: filesystems for DB TSM (DB2)
/tsm/tsmlog: activelog pour DB2 (same size as previous activity log TSM 5)
/tsm/archlog: archivelog for DB2
[root@tsmsrv]/soft# mklv -tjfs2 -y tsmlv  tsmvg 2G
[root@tsmsrv]/soft# crfs -vjfs2 -m /tsm -d tsmlv -Ayes
[root@tsmsrv]/soft# mount /tsm
[root@tsmsrv]/soft# for i in tsmdb001lv tsmdb002lv tsmdb003lv tsmdb004lv tsmloglv tsmarchloglv
do
mklv -tjfs2 -y $i tsmvg 5G
done
[root@tsmsrv]/soft# crfs -vjfs2 -m /tsm/tsmdb001 -d tsmdb001lv  -Ayes
[root@tsmsrv]/soft# crfs -vjfs2 -m /tsm/tsmdb002 -d tsmdb002lv  -Ayes
[root@tsmsrv]/soft# crfs -vjfs2 -m /tsm/tsmdb003 -d tsmdb003lv  -Ayes
[root@tsmsrv]/soft# crfs -vjfs2 -m /tsm/tsmdb004 -d tsmdb004lv  -Ayes
[root@tsmsrv]/soft# crfs -vjfs2 -m /tsm/tsmlog -d tsmloglv  -Ayes    
[root@tsmsrv]/soft# crfs -vjfs2 -m /tsm/tsmarchlog -d tsmarchloglv -Ayes
[root@tsmsrv]/soft# mkdir /tsm/config
[root@tsmsrv]/soft# mount –a

Creating the user tsminst1

  This user needs to be owner of all the TSM directories (DB, logs, storage pool…)

[root@tsmsrv]/root# mkgroup id=1000 tsmsrvrs
[root@tsmsrv]/root# mkuser id=1000 pgrp=tsmsrvrs home=/tsm/config tsminst1
[root@tsmsrv]/root# chuser fsize='-1' data='-1' stack='-1' tsminst1 
[root@tsmsrv]/root# echo "tsminst1:tsminst1" | chpasswd 
[root@tsmsrv]/root# pwdadm -c tsminst1
[root@tsmsrv]/root# chown -R tsminst1.tsmsrvrs /tsm      
[root@tsmsrv]/root# su - tsminst1
[tsminst1@tsmsrv]/tsm/config# touch .profile

Creation of the DB2 instance:

tsminst1 home directory for user tsminst1 will contain the following files dsmserv.opt, dsmserv.v6lock ,defult directory for devconfig and volhist, traces in case of activation …

As root user start the creation of instance for tsminst1:

# /opt/tivoli/tsm/db2/instance/db2icrt -a SERVER –u instance_name instance_name
[root@tsmsrv]/root# /opt/tivoli/tsm/db2/instance/db2icrt -a SERVER -u tsminst1 tsminst1
DBI1070I  Program db2icrt completed successfully.
[root@tsmsrv]/root# /opt/tivoli/tsm/db2/instance/db2ilist
tsminst1

Or

# /opt/tivoli/tsm/db2/instance/db2icrt -a SERVER -s ese -u tsminst1 tsminst1

Remember: From this point on, use this new user ID when configuring your Tivoli Storage Manager server. Log out of the root user ID and log in under the new instance-user ID.

If you plan to use multiple instances (multiples TSM server on the same LPAR), then repeat the previous step for each instance

As tsminst1, change the DB2 path for the instance:

$ db2 update dbm cfg using dftdbpath instance_directory
[tsminst1@tsmsrv]/tsm/config# mkdir /tsm/config/tsminst1
[tsminst1@tsmsrv]/tsm/config# db2 update dbm cfg using dftdbpath /tsm/config/tsminst1
DB20000I  The UPDATE DATABASE MANAGER CONFIGURATION command completed 
successfully.
[tsminst1@tsmsrv]/tsm/config#  db2 get dbm cfg | grep DFTDBPATH
 Default database path                       (DFTDBPATH) = /tsm/config

Create option files for the server and for the client

Option file for the server (not required, else a minimum file will be generated): This is a sample, but you can adapt it to your wishes. If you have multiples instances, be carefull to use different ports for each instance.

[tsminst1@tsmsrv]/tsm/config# cp –p /opt/tivoli/tsm/server/bin/dsmserv.opt.smp /tsm/config/dsmserv.opt
[tsminst1@tsmsrv]/tsm/config#  cat dsmserv.opt | grep -v "^*"  
COMMmethod   SHAREDMEM
SHMPORT      1510

COMMmethod   TCPIP 
TCPPort      1700
TCPADMINPort 1750
SSLTCPPort      1800
SSLTCPADMINPort 1850


TCPWindowsize 2048
TCPNODELAY         YES
SHMPort 1710
MAXSessions 500
TXNGroupmax 65000
ADMINIDLETIMEOUT 30
COMMTimeout 4600
IDLETimmeout 60
RESSOURCETIMEOUT 180
LANGuage en_US
EXPInterval  0
EXPQUiet YES
VOLUMEHistory /tsm/config/volhist.lst
DEVCONFig /tsm/config/devconf.lst
MOVEBatchsize 1000
MOVESizethresh 2048
EVENTSERVer        NO
SANDISCOVERY ON
SANREFRESHTIME 100
* Database reorg
ALLOWREORGTABLE YES
ALLOWREORGINDEX YES
REORGBEGINTIME 13:00
REORGDURATION 6
DB_DB2_KEEPTABLELOCK NO
* Dedup on filepool 
SERVERDEDUPTXNLIMIT 1024 
DEDUPREQUIRESBACKUP NO
DEDUPDELETIONTHREADS 12     
* Allow oracle to backup as non-root
BACKUPINITIATIONROOT OFF
PROXYSESSIONROOT yes

At this step, if you haven't still install the TSM client, do it. On TSM v6, a 64 bit client is available, and v6.3, api32 will be removed if present. Directory for the binary has changed to bin64.

Option files for the client:

[root@tsmsrv]/usr/tivoli/tsm/client/ba/bin64# cat dsm.sys
************************************************************************
* Tivoli Storage Manager                                               *
*                                                                      *
* Sample Client System Options file for AIX and SunOS (dsm.sys.smp)    *
************************************************************************
*  This file contains the minimum options required to get started
*  using TSM.  Copy dsm.sys.smp to dsm.sys.  In the dsm.sys file,
*  enter the appropriate values for each option listed below and
*  remove the leading asterisk (*) for each one.

*  If your client node communicates with multiple TSM servers, be
*  sure to add a stanza, beginning with the SERVERNAME option, for
*  each additional server.
************************************************************************

SErvername      tsmsrv_prod
TCPSErveraddress tsmrsv
COMMmethod      TCPIP
Errorlogname    /usr/tivoli/tsm/client/ba/bin64/dsmerror.log
Errorlogret     7
Schedlogname    /usr/tivoli/tsm/client/ba/bin64/dsmsched.log
Schedlogret     7
TCPPort         1700
TCPADMINPORT    1750
Schedmode       prompted

[root@tsmsrv]/usr/tivoli/tsm/client/ba/bin64# cat dsm.opt
************************************************************************
* Tivoli Storage Manager                                               *
*                                                                      *
* Sample Client User Options file for AIX and SunOS (dsm.opt.smp)      *
************************************************************************

*  This file contains an option you can use to specify the TSM
*  server to contact if more than one is defined in your client
*  system options file (dsm.sys).  Copy dsm.opt.smp to dsm.opt.
*  If you enter a server name for the option below, remove the
*  leading asterisk (*).

************************************************************************

 Servername     tsmsrv_prod

Domain / /usr /var /home
subdir  yes

Format DB2 database and logs

If you want to format a new database, then use the word “format”, else to reload another TSM DB use “loadformat”.

[tsminst1@tsmsrv]/tsm/config# db2set -i tsminst1 DB2CODEPAGE=819
[tsminst1@tsmsrv]/tsm/config# db2start
[tsminst1@tsmsrv]/tsm/config# dsmserv format dbdir=/tsm/tsmdb001,/tsm/tsmdb002,/tsm/tsmdb003,/tsm/tsmdb004 activelogdir=/tsm/tsmlog activelogsize=16384 archlogdir=/tsm/tsmarchlog

ANR7800I DSMSERV generated at 11:08:03 on May 12 2010.

Tivoli Storage Manager for AIX
Version 6, Release 2, Level 1.0
Licensed Materials - Property of IBM
(C) Copyright IBM Corporation 1990, 2010.
All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corporation.

ANR7801I Subsystem process ID is 266468.
ANR0900I Processing options file /tsm/config/dsmserv.opt.
ANR7811I Using instance directory /tsm/config.
ANR4726I The ICC support module has been loaded.
ANR0152I Database manager successfully started.
ANR0152I Database manager successfully started.
ANR1380I The buffer pool monitor switch is enabled.
ANR1547W The server failed to update the DBDIAGLOGSIZE server option due to
insufficient available space.  Required space: 1024 megabytes;  available
space: 649 megabytes. The current value:2 megabytes.
ANR0992I Server's database formatting complete.
ANR0369I Stopping the database manager because of a server shutdown.
ANR2976I Offline DB backup for database TSMDB1 started. 
ANR2974I Offline DB backup for database TSMDB1 completed successfully.

TSM first start

Now you are ready to start TSM, but in forground, because you don't have any TSM user to connect

[tsminst1@tsmsrv]/tsm/config# dsmserv
ANR7800I DSMSERV generated at 11:08:03 on May 12 2010.
Tivoli Storage Manager for AIX
Version 6, Release 2, Level 1.0
Licensed Materials - Property of IBM

(C) Copyright IBM Corporation 1990, 2010.
All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corporation.

ANR7801I Subsystem process ID is 528468.
ANR0900I Processing options file /tsm/config/dsmserv.opt.
ANR7811I Using instance directory /tsm/config.
ANR4726I The ICC support module has been loaded.
ANR0990I Server restart-recovery in progress.
ANR0152I Database manager successfully started.
ANR1380I The buffer pool monitor switch is enabled.
ANR1636W The server machine GUID changed: old value (), new value (44.31.55.5c.4c.7e.11.df.8d.df.08.63.ac.13.1c.0e).
ANR2100I Activity log process has started.
ANR4726I The NAS-NDMP support module has been loaded.
ANR1811W HBAAPI returned zero FC adapters from the system.
ANR2200I Storage pool BACKUPPOOL defined (device class DISK).
ANR2200I Storage pool ARCHIVEPOOL defined (device class DISK).
ANR2200I Storage pool SPACEMGPOOL defined (device class DISK).
ANR2803I License manager started.
ANR8285I Shared Memory driver ready for connection with clients on port 1710
ANR8222W TCP/IP driver is unable to set the window size to 2097152 for the server master socket. The default value will be used.
ANR8222W TCP/IP driver is unable to set the window size to 2097152 for the server master socket. The default value will be used.
ANR8200I TCP/IP Version 4 driver ready for connection with clients on port 1700.
ANR8225I TCP/IP Version 4 administrative driver ready for connection with clients on port 1750.
ANR2560I Schedule manager started.
ANR0984I Process 1 for AUDIT LICENSE started in the BACKGROUND at 15:23:52.
ANR2820I Automatic license audit started as process 1.
ANR0993I Server initialization complete.
ANR0916I TIVOLI STORAGE MANAGER distributed by Tivoli is now ready for use.
ANR2841W Server is NOT IN COMPLIANCE with license terms.
ANR2825I License audit process 1 completed successfully - 0 nodes audited. 
ANR0985I Process 1 for AUDIT LICENSE running in the BACKGROUND completed with completion state SUCCESS at 15:23:52.
ANR2841W Server is NOT IN COMPLIANCE with license terms.
ANR8220W TCP/IP driver is unable to set the window size to 2097152 for client 127.0.0.1.  The default value will be used.
TSM:SERVER1> q admin
ANR2017I Administrator SERVER_CONSOLE issued command: QUERY ADMIN 

Administrator        Days Since       Days Since      Locked?       Privilege Classes      
Name                Last Access     Password Set                    
--------------     ------------     ------------     ----------     -----------------------
ADMIN_CENTER                 <1              (?)        Yes                                
SERVER_CONSOLE                                           No         System                 

TSM:SERVER1> reg admin admin password passe=0
ANR2017I Administrator SERVER_CONSOLE issued command: REGISTER ADMIN admin ?***? 
ANR2068I Administrator ADMIN registered.

TSM:SERVER1> set passexp 9999
ANR2092I Password expiration period set to 9999 days.

TSM:SERVER1> grant authority admin  classes=system
ANR2017I Administrator SERVER_CONSOLE issued command: GRANT AUTHORITY admin classes=system 
ANR2076I System privilege granted to administrator ADMIN.

tsm: SERVER1>q lic

                                 Last License Audit: 06/17/10   15:23:52
                    Number of TDP for Oracle in use: 0
           Number of TDP for Oracle in try buy mode: 0
             Number of TDP for MS SQL Server in use: 0
    Number of TDP for MS SQL Server in try buy mode: 0
               Number of TDP for MS Exchange in use: 0
...
     Is IBM System Storage Archive Manager in use ?: No
   Is IBM System Storage Archive Manager licensed ?: No
     Is Tivoli Storage Manager Basic Edition in use: Yes
   Is Tivoli Storage Manager Basic Edition licensed: No
  Is Tivoli Storage Manager Extended Edition in use: No
Is Tivoli Storage Manager Extended Edition licensed: No
                          Server License Compliance: FAILED

tsm: SERVER1>reg lic file=tsmee.lic
ANR2852I Current license information:
ANR2853I New license information:
ANR2828I Server is licensed to support Tivoli Storage Manager Basic Edition. 
ANR2828I Server is licensed to support Tivoli Storage Manager Extended Edition. 
tsm: SERVER1> set actlogretention 30

TSM start/stop

Start in foreground, as root user:

-u : user
-i : directory containing dsmserv.opt
# /opt/tivoli/tsm/server/bin/rc.dsmserv -u tsminst1 -i /tsm/config            

Start in background:

# /opt/tivoli/tsm/server/bin/rc.dsmserv -u tsminst1 -i /tsm/config -q &

Start as instance user “tsminst1”:

# su – tsminst1
# dsmserv

Automatically start at reboot, add the following enty into /etc/inittab:

tsm1:2:once:/opt/tivoli/tsm/server/bin/rc.dsmserv -u tsminst1 -i /tsm/config  -q >/dev/console 2>&1

Manually stop TSM server:

[root@tsmsrv]/opt/tivoli/tsm/server/bin# dsmadmc
IBM Tivoli Storage Manager
Command Line Administrative Interface - Version 6, Release 2, Level 1.0
(c) Copyright by IBM Corporation and other(s) 1990, 2010. All Rights Reserved.

Enter your user id:  admin

Enter your password:  

Session established with server SERVER1: AIX
  Server Version 6, Release 2, Level 1.0
  Server date/time: 06/18/10   17:09:32  Last access: 06/18/10   16:55:23

tsm: SERVER1>halt

Manually stop TSM server, if you can't connect to TSM server, kill -36 process_id :

[root@tsmsrv]/tsm/config# cat dsmserv.v6lock
dsmserv process ID 254084 started Fri Jun 18 17:04:17 2010
[root@tsmsrv]/tsm/config# ps -ef | grep 254084              
tsminst1 254084 311502   0 17:04:16  pts/0  0:02 /opt/tivoli/tsm/server/bin/dsmserv -u tsminst1 -i /tsm/config -q 
[root@tsmsrv]/tsm/config# kill -36 254084
[root@tsmsrv]/tsm/config# ps -ef | grep 254084
    root 659462 499914   2 17:13:00  pts/1  0:00 grep 254084

Start/stop script:

Linux

Spectrum Protect server with systemd systemctl

[tsminst1@tsmlinux]/tsm/config# cat /usr/lib/systemd/system/dsmserv@.service
[Unit]
Description=tiri TSM Server Instance: %I
After=network.target

[Service]
Type=simple
Environment=DSMI_DIR=/opt/tivoli/tsm/server/bin/dbbkapi DSMI_LOG=%I/cfg/%I DSMI_CONFIG=%I/cfg/%I/tsmdbmgr.opt LD_LIBRARY_PATH
LimitCORE=infinity
LimitDATA=infinity
LimitFSIZE=infinity
LimitNOFILE=65536
LimitCPU=infinity
LimitNPROC=16384
ExecStop=/usr/bin/dsmadmc -errorlogn=/dev/null -se=%I -id=admin -pa=Object00 -itemcommit 'halt'
ExecStart=/usr/bin/dsmserv -i /%I/cfg/%I 
ExecStartPost=/usr/bin/sleep 120
ExecStartPost=/usr/bin/dsmadmc -errorlogname=/dev/null -se=%I -id=analyst -pa=analyst0 -dataonly=yes "issue message i 'tiri:"
TimeoutStopSec=60
KillMode=control-group
User=%I
Group=tsmsrvrs

[Install]
WantedBy=multiuser.target
AIX
[tsminst1@tsmsrv]/tsm/config# cat rc.tsmh
#!/bin/ksh
#set -x
#
#@(#) TSM server start/stop
#
# version 1.0 10-12-2010 
#

instance=tsminst1
home_dir=`lsuser -f -a home $instance | grep home | cut -d= -f2-`
pid_file=$home_dir/dsmserv.v6lock 

# Set the language
export LANG=en_US

# Max out size of data area
ulimit -d unlimited
ulimit -f unlimited

# Allow the server to pack shared memory segments
export EXTSHM=ON

#------------------------------------------------
# usage ()
#------------------------------------------------
usage()
{
rep=$*
case "$rep" in
* )
        echo "Usage: "$0 "(start|stop|status)"
        echo "\tstart (or no parameter) : to start TSM server with instance: $instance"
        echo "\tstop : to stop TSM server with instance: $instance"
        echo "\tstatus : TSM server status"
        exit 1
        ;;
esac
}

#------------------------------------------------
# tsm_start ()
#------------------------------------------------
tsm_start()
{
logfile=$home_dir/tsm_$rep.log

if [ `ps -fu $instance | grep dsmserv | grep -v grep > /dev/null 2>&1; echo $?` -eq 0 ]
then
        echo "TSM server is Started"
        exit 1
fi


# Start the server in quiet mode.
print "$(date '+%D %T') Starting Tivoli Storage Manager Server"
print "$(date '+%D %T') Starting Tivoli Storage Manager Server" > $logfile

chown $instance.`lsuser -a pgrp $instance | cut -d= -f2-` $logfile

if [ `ps -fu $instance | grep dsmserv | grep -v grep > /dev/null 2>&1; echo $?` -ne 0 ]
then
   if [ `whoami` != "$instance" ]
   then
        /opt/tivoli/tsm/server/bin/rc.dsmserv -u $instance -i $home_dir  -q >> $logfile 2>&1 &
   else
        exec /opt/tivoli/tsm/server/bin/dsmserv -q >> $logfile 2>&1 &
   fi
fi

echo "Starting  .\c"

status=1
while [ "$status" != "0" ]
do
        tsm_status > /dev/null 
        sleep 5; echo ".\c"
done
echo "[OK]\c"
echo

}

#------------------------------------------------
# tsm_stop ()
#------------------------------------------------
tsm_stop()
{
# Stop the TSM server
if [ `ps -fu $instance | grep dsmserv | grep -v grep > /dev/null 2>&1; echo $?` -ne 0 ]
then
        echo "TSM server isn't Started"
        exit 1
fi

print "$(date '+%D %T') Stopping Tivoli Storage Manager Server"

PID=`cat $pid_file | awk -F'ID' '{print $2}' | awk '{print $1}'`
echo "$pid_file $PID"
kill -36 $PID

echo "Stopping  .\c"

status=0
while [ "$status" != "1" ]
do
        status=`ps -fu $instance | grep dsmserv | grep -v grep > /dev/null 2>&1; echo $?` 
        sleep 5; echo ".\c"
done
echo "[OK]\c"
echo

}

#------------------------------------------------
# tsm_status ()
#------------------------------------------------
tsm_status()
{
status=0
for port in $(cat $home_dir/dsmserv.opt | grep -v "^*" | grep -i PORT | egrep -vi "REPORT|CLIENT|SNMP" | awk '{print $2}' | sort | uniq)
do
        netstat -an | grep LISTEN | grep "\.$port " > /dev/null 2>&1
        let status="($status + $?)"
done
}


#
# Main
#
rep=$*
case "$rep" in
        stop)   logfile=$home_dir/tsm_$rep.log
                touch $logfile
                chown $instance.`lsuser -a pgrp $instance | cut -d= -f2-` $logfile
                tsm_stop 2>&1 | tee $logfile
                ;;
        status) tsm_status
                if [ $status -eq 0 ]
                then
                   echo "TSM server is Started"
                   exit 0
                else
                   if [ `ps -fu $instance | grep dsmserv | grep -v grep > /dev/null 2>&1; echo $?` -eq 0 ]
                   then
                        echo "TSM is Starting"
                        exit 1
                   else
                        echo "TSM server isn't Started"
                        exit 2
                   fi
                fi ;;
        -h|help|-help)
                usage ;;
        *)      rep=start
                tsm_start;;
esac

Optional: If you want to allow another user to start/stop the TSM server, you have to grant the DB2 rights for the user:

In the following example, user ID tsmuser1 is in the primary group TSMSRVRS, and tsmuser1 is used to create Tivoli Storage Manager server and DB2 instances. 
The SYSADM_GROUP of the instance is TSMSRVRS because it is the primary group of user ID tsmuser1. User ID tsmuser2 is also in the primary group TSMSRVRS.
It is best to use the instance user ID to start the server. However, if you want to allow another user ID to access the database, you must explicitly grant it authority.
Log in as the instance owner, connect to the database, and issue the DB2 GRANT
command. For example:
1. Log in from root or as the instance owner.
# su - tsmuser1
2. Start DB2.
$ db2start
3. Connect to the TSMDB1 database.
$ db2 connect to tsmdb1
4. Grant user tsmuser2 authority to the database.
$ db2 grant dbadm on database to user tsmuser2                   
5. Add the user tsmuser2  into the tsmsrvrs group

Configure the TSM backup DB

By default TSM v6 has to be configure to backup it own database (DB2 backup is not really supported even if it's possible : db2 backup db tsmdb1 to /dbbackup )

  • Check if environment is set into the home directory from instance, else add the following entry, on Linux use .bash_profile instead of .profile:
[tsminst1@tsmsrv]/tsm/config# cat /tsm/config/.profile 
if [ -f /tsm/config/sqllib/db2profile ]; then
. /tsm/config/sqllib/db2profile
fi
  • Add the following variables at begining of the file /tsm/config/sqllib/db2profile:
[tsminst1@tsmsrv]/tsm/config# cat /tsm/config/sqllib/userprofile
...
export DSMI_CONFIG=/tsm/config/tsmdbmgr.opt
export DSMI_DIR=/opt/tivoli/tsm/server/bin/dbbkapi
export DSMI_LOG=/tsm/config
...

:!: Be carefull these variable can disappear during TSM server upgrades !

  • Create a file tsmdbmgr.opt into directory /tsm/config, in uppercase, with the name TSMDBMGR_<instance_name>:
[tsminst1@tsmsrv]/tsm/config# cat /tsm/config/tsmdbmgr.opt
SERVERNAME TSMDBMGR_TSMINST1
  • As root user create a symbolic link for dsm.sys (not required, but easier to manage only one dsm.sys, else create one into /opt/tivoli/tsm/server/bin/dbbkapi), and add the content and adapt the tcpport to your TSM server settings:
[root@tsmsrv]/usr/tivoli/tsm/client/api/bin64# ln -s /usr/tivoli/tsm/client/ba/bin64/dsm.sys dsm.sys
[root@tsmsrv]/root# cat /opt/tivoli/tsm/server/bin/dbbkapi/dsm.sys
.....

servername TSMDBMGR_TSMINST1
commmethod tcpip
tcpserveraddr localhost
tcpport 1700
passworddir /tsm/config
errorlogname /tsm/config/tsmdbmgr.log
nodename $$_TSMDBMGR_$$

Change rights and owner, should be:

[root@tsmsrv]/opt/tivoli/tsm/server/bin/dbbkapi# ls -lsa
...
   4 -rw-r--r--    1 root     system          430 Sep 27 2016  dsm.sys
16792 -r-x------    1 root     system     17205496 Feb 05 2019  dsmcert

Create the log file with the right permissions, else backup DB will failed

[root@tsmsrv]/tsm # touch /tsm/config/tsmdbmgr.log
[root@tsmsrv]/tsm # chown tsminst1.tsmsrvrs /tsm/config/tsmdbmgr.log
  • Restart TSM and DB2 with new settings:
[root@tsmsrv]/usr/tivoli/tsm/client/api/bin64# su - tsminst1
[tsminst1@tsmsrv]/tsm/config# db2stop
06/17/2010 15:19:11     0   0   SQL1064N  DB2STOP processing was successful.
SQL1064N  DB2STOP processing was successful.
[tsminst1@tsmsrv]/tsm/config# db2start
06/17/2010 15:19:26     0   0   SQL1063N  DB2START processing was successful.
SQL1063N  DB2START processing was successful.
  • Start TSM server (needs to be started for this operation):
[tsminst1@sysr1]/tsmhnew/config # dsmserv

This section is no more required in TSM > 8.12 ot 7.1.8 Note that running the “dsmapipw” utility as part of the process for preparing the database manager for database backup or for changing the password of the $$_TSMDBMGR_$$ node used to backup the database, is not required anymore and should not be used because the password is automatically managed by the product itself.

  • As root set the password for the TSM hidden user $$_TSMDBMGR_$$ (3 times:old,new,new again), password is : TSMDBMGR
[root@tsmsrv]/root# .  /tsm/config/.profile
[root@tsmsrv]/root# /tsm/config/sqllib/adsm/dsmapipw

*************************************************************
* Tivoli Storage Manager                                    *
* API Version = 6.2.1                                       *
*************************************************************
Enter your current password:
Enter your new password:
Enter your new password again:

Your new password has been accepted and updated.
  • Now into TSM Set DBRECOVERY, affect a device class for the database backup:
tsm: SERVER1>def devc devcbkpdb devt=file mountl=20 maxcap=2G dir=/tsm/tsmbkpdb
ANR2203I Device class DEVCBKPDB defined.

tsm: SERVER1>set dbrecovery devcbkpdb
ANR2782I SET DBRECOVERY completed successfully and device class for automatic DB backup is set to DEVCBKPDB.
tsm: SERVER1>q db f=d

Database  Total     Space Used    Free       Total     Usable    Used      Free      Buffer    Total     Sort       Lock Esca-  Package   Last Database   Full       Incrementals  Last     
Name      Size of   by Database-  Space      Pages     Pages     Pages     Pages     Pool Hit  Buffer    Overflows  lation      Cache     Reorganization  Device     Since Last    Complete 
          File      (MB)          Available                                          Ratio     Requests                         Hit Rat-                  Class      Full          Backup   
          System                  (MB)                                                                                          io                        Name                     Date/Time
          (MB)                                                                                                                                                                     
--------  --------  ------------  ---------  --------  --------  --------  --------  --------  --------  ---------  ----------  --------  --------------  ---------  ------------  ---------
TSMDB1    20,480    480           19,995     34,832    34,288    26,868    7,420     98.5      101,777   0          0           71.0                      DEVCBKPDB  0                      


tsm: SERVER1>ba db devcl=DEVCBKPDB t=full

Minimum scripts for TSM server

Create a file /root/backup_db.txt

SERIAL
BACKUP DB DEVCLASS=DEVCBKPDB TYPE=FULL WAIT=YES
BACKUP DEVCONFIG
BACKUP VOLHISTORY
DELETE VOLHISTORY TODATE=TODAY-2 TYPE=DBBACKUP
EXPIRE INVENTORY DURATION=120 WAIT=YES
AUDIT LIC

Define the TSM script based on file:

tsm: SERVER1>def scr backup_db file=/root/backup_db.txt
ANR1454I DEFINE SCRIPT: Command script BACKUP_DB defined.

tsm: SERVER1>q scr backup_db f=r
SERIAL
BACKUP DB DEVCLASS=DEVCBKPDB TYPE=FULL numstreams=4 WAIT=YES
BACKUP DEVCONFIG
BACKUP VOLHISTORY
DELETE VOLHISTORY TODATE=TODAY-2 TYPE=DBBACKUP
EXPIRE INVENTORY DURATION=120 WAIT=YES
AUDIT LIC

Create the daily script to backup the DB:

tsm: SERVER1>def sched backup_db t=a cmd='run backup_db' active=yes STARTD=today startt=12:00
ANR2577I Schedule BACKUP_DB defined.

tsm: SERVER1>q sched * t=a

*     Schedule Name        Start Date/Time          Duration     Period     Day
-     ----------------     --------------------     --------     ------     ---
      BACKUP_DB            06/18/12   12:00:00          1 H        1 D      Any

tsm: SERVER1>q eve * t=a

Scheduled Start          Actual Start             Schedule Name     Status
--------------------     --------------------     -------------     ---------
06/18/12   12:00:00      06/18/12   12:32:58      BACKUP_DB         Started

Important additional files to save

The master encryption key is stored in a key database, dsmkeydb.kdb. Server certificates are still stored in the cert.kdb key database and accessed by the stash file cert.sth. You must protect both the key databases (cert.kdb and dsmkeydb.kdb) and the stash files (cert.sth and dsmkeydb.sth) that provide access to each of the key databases. By default, the BACKUP DB command protects the master encryption key in the same manner in which the volume history and devconfig files are protected. You must remember the database backup password to restore the database.

Problem determination

TSM.PWD owner

When you upgrade to TSM v7.1.1, you have to change the owner of the TSM.PWD file, else the backup DB will failed: chown tsminst1.tsmsrvrs /home/tsminst1/TSM.PWD

11/12/14   16:56:32      ANR4626I Database backup will use 1 streams for processing
                          with the number originally requested 1. (SESSION: 1,     
                          PROCESS: 2)                                              
11/12/14   16:56:32      ANR2983E Database backup terminated due to environment or 
                          setup issue related to DSMI_DIR - DB2 sqlcode -2033      
                          sqlerrmc 168       . (SESSION: 1, PROCESS: 2)            
11/12/14   16:56:32      ANR1361I Output volume 0000L3 closed. (SESSION: 1,      
                          PROCESS: 2)                                              
11/12/14   16:56:32      ANR0515I Process 2 closed volume CH0000L3. (SESSION: 1,   
                          PROCESS: 2)                                              
11/12/14   16:56:32      ANR0985I Process 2 for Database Backup running in the     
                          FOREGROUND completed with completion state FAILURE at    
                          16:56:32. (SESSION: 1, PROCESS: 2)                       
11/12/14   16:56:32      ANR1893E Process 2 for Database Backup completed with a   
                          completion state of FAILURE. (SESSION: 1, PROCESS: 2)    

Disable Client Deployment

Prevent error when don't use automatic depolyment for clients (ANR3763E)

Protect> set DEPLOYPKGMGR OFF
Protect> query monitorsettings
          Deploy Package Manager: Off

parameter PASSWORDACCESS

After migration to TSM 7.1, the backup DB will failed

ANR2968E Database backup terminated. DB2 sqlcode: -2033  DB2 sqlerrmc: 2033   

Remove the parameter : PASSWORDACCESS Generate (no more supported)

[root@tsm]/tsm/tsminst2# cat /opt/tivoli/tsm/server/bin/dbbkapi/dsm.sys
SERVERNAME       TSMDBMGR_TSMINST1
TCPSERVERADDRESS 127.0.0.1
COMMMETHOD       TCPIP
TCPPORT          1500
*PASSWORDACCESS   generate
NODENAME         $$_TSMDBMGR_$$
PASSWORDDIR      /tsm/tsminst1
ERRORLOGNAME     /tsm/tsminst1/tsmdbmgr.log

Error when backup DB on v8.1.6

ANR2968E Database backup terminated. DB2 sqlcode: -2033. DB2 sqlerrmc: -369

The BACKUP DB command fails when the following conditions are true:

  • The server uses a CA-signed certificate
  • The communication method used for the backup is set to TCP/IP

To resolve the issue, complete one of the following procedures:

  • For Linux and AIX systems, enable the shared memory communications protocol on the server and configure database backups to use shared memory.

Note: Database backup and restore over shared memory are not available on Windows systems.

  • For Linux, AIX, and Windows systems, update the server options file by adding the following option:

DBMTRUSTEDIPIGNORE YES

Then, update the database backup configuration to specify the server's external IP address instead of localhost. https://www.ibm.com/support/knowledgecenter/SSEQVQ_8.1.6/srv.install/t_srv_prep_dbmgr-aix.html

tsm/tsm_install.txt · Last modified: 2023/05/24 23:18 by manu