Wednesday, March 18, 2009

Monday, March 16, 2009

To update a volume from 'UNAVAILABLE' or 'READONLY' to 'READWRITE'

tsm: server>select volume_name,access from volumes where access='UNAVAILABLE' or 'READONLY'

VOLUME_NAME                  ACCESS
------------------          ------------------
        
S100L3               UNAVAILABLE       
S165L3               UNAVAILABLE       
S188L3               UNAVAILABLE       
S343L3               UNAVAILABLE       
S679L3               UNAVAILABLE       
S014L3               READONLY 

tsm: server>UPDATE VOLUME S100L3 Access=readwrite 
ANR2207I Volume S100L3 updated.

tsm: server>UPDATE VOLUME S165L3 Access=readwrite 
ANR2207I Volume S165L3 updated.

tsm: server>UPDATE VOLUME S188L3 Access=readwrite 
ANR2207I Volume S188L3 updated.

tsm: server>UPDATE VOLUME S343L3 Access=readwrite 
ANR2207I Volume S343L3 updated.

tsm: server>UPDATE VOLUME S679L3 Access=readwrite 
ANR2207I Volume S679L3 updated.

tsm: server>UPDATE VOLUME S014L3 Access=readwrite 
ANR2207I Volume S014L3 updated.

Saturday, March 14, 2009

If the disk storage is full, then move the node data to tape

If the disk storage is full, then move the node data to tape


q occpancy stgpool=nasoff2



Node Name Type Filespace FSID stgpoolname number-of-files Physical space(MB) Logical space(MB).

TSMRELSA Bkup /sas/data/cmi/rs 21 NASOFF2 18,821 1,234,065.65 1,234,065.65
tsm: TSMserver 1>move nodedata TSMRELSA from=nasoff2 to=lto-off fi=/sas/data/cmi/rs maxpr=2
ANR1649W MOVE NODEDATA:This command will move data for nodes stored in storage pool NASOFF2 to storage pool
LTO-OFF; the data will be inaccessible to users until the operation completes.

Do you wish to proceed? (Yes (Y)/No (N)) y
ANR2110I MOVE NODEDATA started as process 71.
ANR2110I MOVE NODEDATA started as process 72.

To Extend db of TSM

[dk055@reldal1]$ lsvg
rootvg
tsmvg
[dk055@reldal1]$ ls -la /opt/tsm01
total 32776216
drwxr-xr-x   3 root     system          256 May 20 2008  .
drwxr-xr-x  72 root     system         8192 Jan 03 22:05 ..
drwxr-xr-x   2 root     system          256 Oct 29 2004  lost+found
-rw-r--r--   1 root     system   4195352576 Jan 06 12:55 tsmdb01.dsm
-rw-r--r--   1 root     system   4195352576 Jan 06 12:55 tsmdb02.dsm
-rw-r--r--   1 root     system   4195352576 Jan 06 12:55 tsmdb03.dsm
-rw-------   1 root     system   4195352576 Jan 06 12:55 tsmdb04.dsm



To Extend DB of Reldalbk1
define dbvolume "/opt/tsm01/tsmdb05.dsm" formatsize=4096 (4 x 1024)

Extend dbvolume

To change Unavailable to Readonly or Readwrite.

From each server run this command to get the unavailable or readonly (tapes and disk volumes) 
i.e., Relbk1, Relbk2 and Relbk2-2: -
select volume_name,access from volumes where access='UNAVAILABLE' or access='READONLY'

then ckeck the each volume by quering and format=detail
q volume S0XXXXL3 F=D
///check if any readwrite errors or readonly errors.

tsm: RELBK1> 

SxxxxxL3               UNAVAILABLE       
SxxxxxL3               READONLY           
SxxxxxL3               UNAVAILABLE       
SxxxxxL3               UNAVAILABLE       
SxxxxxL3               UNAVAILABLE       
SxxxxxL3               UNAVAILABLE       

To update the volume from unavailable to readwrite.

UPDATE VOLUME SxxxxxL3 Access=readwrite whereaccess=UNAVAILABLE

To know each nodes data backedup to the TSM server.


tsm: RELFRDBK1>select node_name,sum(physical_mb) as SIZEinMB from occupancy where stgpool_name='NAS-OFF' group                by node_name

NODE_NAME                                       SIZEINMB
------------------     ---------------------------------
FRDCRAWIZ2                                       6639.67
FRDETALK1                                        4337.05
FSMD4511                                        27345.52
FSMD4512                                        66354.09
FSMD4542                                         2179.25
GOTCHA                                           2820.39
REL004CAS008                                   144875.15
REL004CAS056                                    82242.14
REL004PAS011                                    46551.35
REL013PAS002                                     7098.90
REL013PAS003                                    57280.72
REL013PDB001                                   222858.38
REL013PFS001                                   104450.60
REL013PMF001                                    13001.30
REL015PAS001                                     6937.84
REL015PAS002                                     7620.52
REL015PFS001                                    25924.50
REL018PFS001                                    76386.66
REL019PAS002                                    19006.47
REL019PFS001                                    35745.57
REL023PAS001                                     4669.59
REL023PFS001                                   115437.32
REL026PAS001                                    12684.07
REL026PFS001                                   231409.52
REL028PAS001                                    17642.72
REL028PFS001                                   100923.33
REL032PAS001                                    19587.17
REL032PAS002                                   100616.91
REL032PFS001                                   244161.55
RELBK1C                                        158929.54
more...   ( to continue, 'C' to cancel) C

RELFRDBK1                                       11437.02
U050637A                                          473.87
U050637B                                         1433.15
U100104A                                         6692.96
U100104B                                         4374.89
U130851A                                         1488.58
U130851B                                         1807.67
U280103A                                         1308.70
U280103B                                         2108.21
U380507A                                         1267.60
U380664A                                         1541.91
U380664B                                         2939.08
U530800A                                         5659.37
U530800B                                         3973.70
U530800C                                         4471.49
U530800D                                         4330.27
U530800E                                         4798.70
U530800F                                         4207.69
U530800G                                         5875.63
U530800H                                         4351.41
U530800I                                         3764.04
U530800Y                                         3253.48
U530800Z                                         2968.88
U640667A                                        37965.56
U640667B                                        43417.12
U999025A                                        19332.72







tsm: RELFRDBK1>select node_name,sum(physical_mb) as SIZEinMB from occupancy where stgpool_name='LTO-OFF' group                by node_name

NODE_NAME                                       SIZEINMB
------------------     ---------------------------------
FRDCRAWIZ2                                      15895.25
FRDETALK1                                        1514.25
FSMD4511                                        43419.60
FSMD4512                                        19915.42
GOTCHA                                           7896.95
REL004CAS008                                      585.53
REL004CAS056                                        0.25
REL013PAS002                                     2073.63
REL013PAS003                                    74044.72
REL013PDB001                                   222283.88
REL013PFS001                                    38878.85
REL013PMF001                                     2462.29
REL015PAS001                                      114.89
REL015PAS002                                    22491.20
REL015PFS001                                    29168.48
REL018PFS001                                    16097.73
REL019PAS002                                    10163.85
REL019PFS001                                    16893.54
REL023PAS001                                      468.62
REL023PFS001                                     6300.45
REL026PAS001                                     3633.68
REL026PFS001                                     4638.34
REL028PAS001                                      822.33
REL028PFS001                                     8584.56
REL032PAS001                                     2947.86
REL032PAS002                                     6307.38
REL032PFS001                                    42696.94
RELBK1C                                          3772.03
RELFRDBK1                                         915.95
U050637A                                         5546.90
U050637B                                         1139.39
U100104A                                         1056.35
U100104B                                         1093.65
U130851A                                         6012.98
U130851B                                         5957.62
U280103A                                         6583.19
U280103B                                         5280.28
U380507A                                         1072.61
U380664A                                         7908.32
U380664B                                         4681.10
U530800A                                         5495.75
U530800B                                         5013.62
U530800C                                         4076.61
U530800D                                         4033.21
U530800E                                         4226.47
U530800F                                         4286.02
U530800G                                         3003.48
U530800H                                         4076.38
U530800I                                         4220.92
U530800Y                                         1548.23
U530800Z                                         1038.37
U640667A                                         1447.76
U640667B                                          754.34
U999025A                                         1373.09





tsm: RELFRDBK1>select node_name,sum(physical_mb) as SIZEinMB from occupancy group by node_name      

NODE_NAME                                       SIZEINMB
------------------     ---------------------------------
FRDCRAWIZ2                                      22534.92
FRDETALK1                                        5851.30
FSMD4511                                        70765.12
FSMD4512                                        86269.51
FSMD4542                                         2179.25
GOTCHA                                          10717.34
REL004CAS008                                   145460.68
REL004CAS056                                    82242.39
REL004PAS011                                    46551.35
REL013PAS002                                     9172.53
REL013PAS003                                   131325.44
REL013PDB001                                   445142.26
REL013PFS001                                   143329.45
REL013PMF001                                    15463.59
REL015PAS001                                     7052.73
REL015PAS002                                    30111.72
REL015PFS001                                    55092.98
REL018PFS001                                    92484.39
REL019PAS002                                    29170.32
REL019PFS001                                    52639.11
REL023PAS001                                     5138.21
REL023PFS001                                   121737.77
REL026PAS001                                    16317.75
REL026PFS001                                   236047.86
REL028PAS001                                    18465.05
REL028PFS001                                   109507.89
REL032PAS001                                    22535.03
REL032PAS002                                   106924.29
REL032PFS001                                   286858.49
RELBK1C                                        162701.57
RELFRDBK1                                      814970.85
U050637A                                         6020.77
U050637B                                         2572.54
U100104A                                         7749.31
U100104B                                         5468.54
U130851A                                         7501.56
U130851B                                         7765.29
U280103A                                         7891.89
U280103B                                         7388.49
U380507A                                         2340.21
U380664A                                         9450.23
U380664B                                         7620.18
U530800A                                        11155.12
U530800B                                         8987.32
U530800C                                         8548.10
U530800D                                         8363.48
U530800E                                         9025.17
U530800F                                         8493.71
U530800G                                         8879.11
U530800H                                         8427.79
U530800I                                         7984.96
U530800Y                                         4801.71
U530800Z                                         4007.25
U640667A                                        39413.32
U640667B                                        44171.46
U999025A                                        20705.81





To update volume location, To checkout the volume from the library.


To update a volume for location change
update vol SxxxxxL3 access=readwrite loc='PP Media Room'



To checkout the tape from the library 
checkout libv TAPESTL01 SxxxxxL3 REMove=bulk CHECKLabel=no

To know the database size and log size of the TSM servers

To know the database size and log size of the TSM servers.
Every data is stored in the SQL format. To know more go to the "Useful SQL queries for TSM" in my blogs.

TSMserver1: -

tsm: TSMserver1>q db f=d

tsm: TSMserver1>q log f=d


TSMserver2: -

tsm: TSMserver 2>q db f=d

tsm: TSMserver 2>q log f=d

TSMserver2-2 is the instance of the TSMserver 2.

TSMserver2-2: -

tsm: TSMserver 2-2>q db f=d

tsm: TSMserver 2-2>q log f=d




Generate backupset of a database

There are 4 filesystems to generate a backupset.

For eg:
/data/db01/ssuprod
/data/db02/ssuprod
/opt/app/oracle/backup/ssuprod
/opt/app/oracle/admin/ssuprod

unix: -
dsmadmc -id=$id -password=$pw "generate backupset TSMserver ssolve_01162009 \
/opt/app/oracle/admin/ssolve,/opt/app/oracle/backup/ssolve,/dev/ssolveredo*, \
/data/db01/ssolve,/data/db02/ssolve,/data/db03/ssolve,/data/db04/ssolve,/data/db05/ssolve

Client side
dsmadmc -id=$id -password=$pw "generate backupset TSMserver ssuprod_02182009 \
/data/db01/ssuprod,/data/db02/ssuprod,/opt/app/oracle/backup/ssuprod, /opt/app/oracle/admin/ssuprod \
devclass=LTOCLASS retention=9999 scratch=yes description=SSOLVE_data3_011609 wait=no" > /tmp/ssuprod_02182009_backupset.out

client side:
dsmadmc -id=$id -password=$pw "generate backupset TSMserver ssuprod_02182009 \
/data/db01/ssuprod,/data/db02/ssuprod,/opt/app/oracle/backup/ssuprod,/opt/app/oracle/admin/ssuprod \
devclass=NASOFFSITE retention=9999 scratch=yes description=SSOLVE_data3_011609 wait=no" > /tmp/ssuprod_02182009_backupset.out

unix:-
pbrun /usr/tivoli/tsm/client/ba/bin/dsmc archive /data/db01/ssuprod,/data/db02/ssuprod,/opt/app/oracle/backup/ssuprod,
/opt/app/oracle/admin/ssuprod -ARCHMC=RET4EVER -su=yes -desc="Ssolve Jan2002 Hold Permanent"

TSM command line:
generate backupset TSMserver ssuprod_02182009
/data/db01/ssuprod,/data/db02/ssuprod,/opt/app/oracle/backup/ssuprod,/opt/app/oracle/admin/ssuprod
devclass=LTOCLASS retention=9999 scratch=yes description=SSOLVE_data3_011609 wait=no

Friday, March 13, 2009

Administrator's Reference link

http://publib.boulder.ibm.com/tividd/td/SMAS4N/GC35-0316-01/en_US/HTML/a454rf02.htm#ToC_19

Basic (Useful) TSM commands

Analysing Logs

TSM> q actlog

Analysing DB
TSM> q db

Analysing Storage Pool
TSM> q stgpool

Analysing volumes inside the library
TSM>q libvol

Analysing all volumes in Tape Storage Pool
TSM> q vol devclass=ltoclass

Analysing backups in db (executed)
TSM> q volhist type=dbb

Write a label on a volume
TSM> run label “volume name”

Remove a volume from LTO
TSM> run DISMOUNT “volume name”

Verify existing scripts
TSM> q script

Verifying commands executed from one script
TSM> q script f=d

Verifying sessions
TSM> q sess

Canceling a session
TSM>cancel sess “session number”

Show data from scheduled client on the current day
TSM> q event * *

Show data from scheduled client on the next day
TSM> q event * * begind=+1

Show data from administrative schedule on the current day
TSM> q event * t=a

Show data from administrative schedule on the next day
TSM> q event * t=a begind=+1

Show process

TSM> q proc

Show Tape requisition
TSM> q req

Show a tape into the drive
TSM> q mount

shortcut     meaning

q             query

libvol       libraryvolume

sess        session