tsm
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| tsm [2018/12/06 21:05] – created 91.177.234.129 | tsm [2019/01/30 11:32] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | * [[http:// |
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | ===== Tivoli Storage Management | ||
| - | * [[http:// | + | ==== Default location for files ==== |
| - | * [[http://thobias.org/tsm/sql/# | + | < |
| - | * [[http://froebe.net/blog/2014/03/24/ibm-tivoli-storage-manager-tsm-how-to-determine-management-class-and-retention-using-dsmc/|TSM - How to determine management class and retention using dsmc]] - nice syntax highlighting! | + | Linux, AIX |
| - | ======Tivoli Storage Management====== | + | dsm.sys,dsm.opt /opt/tivoli/tsm/client/ba/bin |
| - | =====Default location for files===== | + | dsmerror.log, dsmsched.log |
| - | < | + | |
| - | =====Restart ITM Monitoring agent===== | + | Solaris |
| - | ====To see if the Oracle module is installed==== | + | dsm.sys, |
| - | < | + | dsmerror.log, |
| + | </ | ||
| + | ==== Restart ITM Monitoring agent ==== | ||
| + | === To see if the Oracle module is installed === | ||
| + | < | ||
| + | export ITM_HOME=/ | ||
| + | $ITM_HOME/ | ||
| + | </ | ||
| and see which agents are running | and see which agents are running | ||
| - | < | + | < |
| + | export ITM_HOME=/ | ||
| + | $ITM_HOME/ | ||
| + | </ | ||
| and see which agents are configured (or not) | and see which agents are configured (or not) | ||
| - | < | + | < |
| + | export ITM_HOME=/ | ||
| + | $ITM_HOME/ | ||
| + | </ | ||
| - | ====See which instances have been setup to be monitored==== | + | === See which instances have been setup to be monitored === |
| - | < | + | < |
| - | < | + | export ITM_HOME=/ |
| + | $ITM_HOME/ | ||
| + | </ | ||
| + | < | ||
| + | export ITM_HOME=/ | ||
| + | $ITM_HOME/ | ||
| + | </ | ||
| - | ====Add an instance to be monitored==== | + | === Add an instance to be monitored === |
| - | < | + | < |
| + | $ITM_HOME/ | ||
| + | </ | ||
| This one should also be done in order that rc.d scripts know to start the agent as itmora instead of root | This one should also be done in order that rc.d scripts know to start the agent as itmora instead of root | ||
| - | < | + | < |
| + | $ITM_HOME/ | ||
| + | </ | ||
| - | =====Restart the Oracle agents===== | + | ==== Restart the Oracle agents ==== |
| - | To avoid issues with orphaned processes, restart is best done with a combination of stop, cleanup, start.<br /> | + | To avoid issues with orphaned processes, restart is best done with a combination of stop, cleanup, start.\\ |
| **Stop all Oracle agents** | **Stop all Oracle agents** | ||
| - | < | + | < |
| + | export ITM_HOME=/ | ||
| + | $ITM_HOME/ | ||
| + | </ | ||
| or, the standard method... | or, the standard method... | ||
| - | < | + | < |
| + | su - itmora -c "/ | ||
| + | </ | ||
| **Check agent processes have stopped** | **Check agent processes have stopped** | ||
| - | < | + | < |
| - | Any remaining processes (containing a SID) should be killed.<br /> | + | ps -ef | grep [[k]]rz |
| - | It is normal to have agents for 61, ul and ux still running.<br /> | + | </ |
| - | <br /> | + | Any remaining processes (containing a SID) should be killed.\\ |
| - | **Check agent RunInfo file is correct**<br /> | + | It is normal to have agents for 61, ul and ux still running.\\ |
| + | |||
| + | **Check agent RunInfo file is correct**\\ | ||
| If this file is corrupted, the StartAgent.sh script does not function correctly | If this file is corrupted, the StartAgent.sh script does not function correctly | ||
| - | < | + | < |
| - | ...and remove any lines containing database SIDs in the 4th column<br /> | + | vi $ITM_HOME/ |
| - | <br /> | + | </ |
| + | ...and remove any lines containing database SIDs in the 4th column\\ | ||
| **Start all Oracle agents** | **Start all Oracle agents** | ||
| - | < | + | < |
| - | <br /> | + | $ITM_HOME/smitools/ |
| - | or<br /> | + | </code> |
| + | |||
| + | or\\ | ||
| ...using ITM standard command to restart one agent | ...using ITM standard command to restart one agent | ||
| - | < | + | < |
| + | /usr/bin/su - itmora -c "/ | ||
| + | </ | ||
| Perform cleanup as above | Perform cleanup as above | ||
| - | < | + | < |
| + | /usr/bin/su - itmora -c "/ | ||
| + | </ | ||
| - | ====Check the agent is running==== | + | === Check the agent is running === |
| - | < | + | < |
| + | ps -ef | grep [[k]]rz | ||
| + | </ | ||
| - | ====Reconfigure agent==== | + | === Reconfigure agent === |
| - | < | + | < |
| + | export ITM_HOME=/ | ||
| + | $ITM_HOME/ | ||
| + | </ | ||
| - | =====Troubleshooting===== | + | ==== Troubleshooting ==== |
| - | ====cinfo -r reports processes not running (as well as running)==== | + | === cinfo -r reports processes not running (as well as running) === |
| eg: | eg: | ||
| - | < | + | < |
| + | coupprod | ||
| + | coupprod | ||
| + | coupprod | ||
| + | coupprod | ||
| + | </ | ||
| need to remove the first 2 lines... | need to remove the first 2 lines... | ||
| - | < | + | < |
| + | cd / | ||
| + | vi RunInfo | ||
| + | </ | ||
| and remove the unnecessary lines | and remove the unnecessary lines | ||
| - | =====Remove / uninstall / decommission an ITM agent===== | + | ==== Remove / uninstall / decommission an ITM agent ==== |
| - | ====Check agent is configured==== | + | === Check agent is configured === |
| - | < | + | < |
| - | ====Stop the running agent==== | + | export ITM_HOME=/ |
| - | < | + | $ITM_HOME/ |
| - | ====Delete config files for the instance==== | + | </ |
| - | < | + | === Stop the running agent === |
| - | ====Modify the rz environment file==== | + | < |
| - | < | + | SID=WM9TNSBX |
| - | ====Modify the rz agent startup file==== | + | $ITM_HOME/ |
| - | * Remove line from " | + | </ |
| - | * Remove line from " | + | === Delete config files for the instance === |
| - | < | + | < |
| + | cd $ITM_HOME/ | ||
| + | ls -al *rz_${SID}* | ||
| + | rm -f *rz_${SID}* | ||
| + | ls -al *rz_${SID}* | ||
| + | ls: 0653-341 The file *rz_WM9TNSBX* does not exist. | ||
| + | </ | ||
| + | === Modify the rz environment file === | ||
| + | < | ||
| + | vi $ITM_HOME/ | ||
| + | </ | ||
| + | === Modify the rz agent startup file === | ||
| + | * Remove line from " | ||
| + | * Remove line from " | ||
| + | < | ||
| + | vi / | ||
| + | </ | ||
| - | ====Recheck if the agent is configured (SID should have gone from list)==== | + | === Recheck if the agent is configured (SID should have gone from list) === |
| - | < | + | < |
| - | =====Automate modification of ORACLE_HOME in config files and restart ITM agent for each database===== | + | $ITM_HOME/ |
| + | </ | ||
| + | ==== Automate modification of ORACLE_HOME in config files and restart ITM agent for each database ==== | ||
| After an upgrade, the hard-coded(!!!) path to ORACLE_HOME needs modifying to use the new location | After an upgrade, the hard-coded(!!!) path to ORACLE_HOME needs modifying to use the new location | ||
| - | < | + | < |
| + | export ITM_HOME=/ | ||
| + | cd ${ITM_HOME}/ | ||
| + | for i in $(find . -type f -name " | ||
| + | perl -p -i.bck -e ' | ||
| + | db=$(echo $i | awk -F_ ' | ||
| + | /usr/bin/su - itmora -c "/ | ||
| + | /usr/bin/su - itmora -c "/ | ||
| + | done | ||
| + | ${ITM_HOME}/ | ||
| + | </ | ||
| - | =====Starting the TSM client===== | + | ==== Starting the TSM client ==== |
| On Unix | On Unix | ||
| - | < | + | < |
| + | dsmc -se=so_u_`hostname`_orx_d_bax | ||
| + | </ | ||
| On Windows | On Windows | ||
| - | < | + | < |
| + | dsmc -optfile=c: | ||
| + | </ | ||
| - | =====Send a file to TSM===== | + | ==== Send a file to TSM ==== |
| - | < | + | < |
| + | dsmc archive -server=SO_U_ubenoa31_ORX_D_BAX "/ | ||
| + | </ | ||
| - | =====Query the archive to see if a file is available in TSM===== | + | ==== Query the archive to see if a file is available in TSM ==== |
| - | < | + | < |
| + | dsmc query archive -server=SO_U_ubenoa31_ORX_D_BAX "/ | ||
| + | </ | ||
| Query all the files sent to the monthly node since start of FEB 2013 (using dateformat YYYY-MM-DD) | Query all the files sent to the monthly node since start of FEB 2013 (using dateformat YYYY-MM-DD) | ||
| - | < | + | < |
| + | dsmc q ar -date=3 -fromdate=2013-02-01 -subdir=yes -filesonly -se=SO_U_`uname -n`_ORX_M_BAX "/ | ||
| + | </ | ||
| and on Windows... | and on Windows... | ||
| - | < | + | < |
| - | Note: You will get an error with the above command as Windows ignores the dateformat on the command line!<br /> | + | dsmc query archive -dateformat=3 -fromdate=2013-02-01 -subdir=yes -filesonly -optfile=' |
| - | To fix it, put dateformat | + | </ |
| + | Note: You will get an error with the above command as Windows ignores the dateformat on the command line!\\ | ||
| + | To fix it, put dateformat | ||
| - | =====List all export jobs on this TSM node===== | + | ==== List all export jobs on this TSM node ==== |
| - | < | + | < |
| + | cd / | ||
| + | dsmc q ar -subdir=yes -se=SO_U_UBENOA26_ORX_D_BAX " | ||
| + | </code> | ||
| + | |||
| + | ==== Retrieve file from TSM ==== | ||
| + | < | ||
| + | dsmc retrieve -pick -server=SO_U_ubenoa31_ORX_D_BAX "/ | ||
| + | </ | ||
| + | This opens an interactive window listing all files that match the file query (note the wildcard)\\ | ||
| + | Files can be toggled on and off for recovery by pressing the number associated with the file then recover with the letter o (for ok!).\\ | ||
| - | =====Retrieve file from TSM===== | ||
| - | < | ||
| - | This opens an interactive window listing all files that match the file query (note the wildcard)< | ||
| - | Files can be toggled on and off for recovery by pressing the number associated with the file then recover with the letter o (for ok!).<br /> | ||
| - | <br /> | ||
| If several versions of the same file exist, use the description field to make the distinction | If several versions of the same file exist, use the description field to make the distinction | ||
| - | < | + | < |
| + | dsmc retr -server=SO_U_`hostname`_ORX_D_SOL -descr=" | ||
| + | </ | ||
| - | =====Retrieve a file from TSM and save it to a different name===== | + | ==== Retrieve a file from TSM and save it to a different name ==== |
| - | < | + | < |
| - | =====Restore a file from TSM (from backup not archive)===== | + | dsmc retr -server=SO_U_`hostname`_ORX_D_SOL / |
| - | < | + | </ |
| + | ==== Restore a file from TSM (from backup not archive) ==== | ||
| + | < | ||
| + | dsmc rest / | ||
| + | </ | ||
| - | =====Check backup is performed across DWDM (diagonal) to TSM server in remote location===== | + | ==== Check backup is performed across DWDM (diagonal) to TSM server in remote location ==== |
| - | Some customers want the backups of the databases running in one data centre to be sent to the other data centre providing "data centre down" recovery.<br /> | + | Some customers want the backups of the databases running in one data centre to be sent to the other data centre providing "data centre down" recovery.\\ |
| Put this into a temporary file on the management server... | Put this into a temporary file on the management server... | ||
| - | < | + | < |
| + | cat <<' | ||
| + | export HN=$(hostname); | ||
| + | " if m/ | ||
| + | EOCAT | ||
| + | chmod +x / | ||
| + | </ | ||
| then send it to, and run it on, all the satellite servers... | then send it to, and run it on, all the satellite servers... | ||
| - | < | + | < |
| - | This spits out a list of host | Instance | TSM server<br /> | + | / |
| + | / | ||
| + | </ | ||
| + | This spits out a list of host | Instance | TSM server\\ | ||
| If this list is pasted into a spreadsheet, | If this list is pasted into a spreadsheet, | ||
| - | < | + | < |
| + | ====== IF( MID(A1,3,2) = (MID(C1, | ||
| + | </ | ||
| Obviously this is customer specific! Character positions 3-4 of the hostname show where the server is hosted, positions 4-5 of the TSM server name show its location. | Obviously this is customer specific! Character positions 3-4 of the hostname show where the server is hosted, positions 4-5 of the TSM server name show its location. | ||
| - | =====Show details about all management classes on the TSM server===== | + | ==== Show details about all management classes on the TSM server ==== |
| - | < | + | < |
| - | =====Query running sessions on a TSM node===== | + | dsmc query mgmtclass -detail |
| - | < | + | </ |
| + | ==== Query running sessions on a TSM node ==== | ||
| + | < | ||
| + | dsmc q sess -se=SO_U_SOLAX005_ORX_D_SOL | ||
| + | </ | ||
| and on Windows... | and on Windows... | ||
| - | < | + | < |
| + | dsmc q sess -optfile=' | ||
| + | </ | ||
| - | =====Find the default management class on the domain===== | + | ==== Find the default management class on the domain ==== |
| - | < | + | < |
| + | dsmc q mgmt | grep ' | ||
| + | </ | ||
| - | =====Force a management class===== | + | ==== Force a management class ==== |
| - | The TSM domain has a default management class. This can be overridden in both the dsm.opt file (include options) and on the command line.<br /> | + | The TSM domain has a default management class. This can be overridden in both the dsm.opt file (include options) and on the command line.\\ |
| Archiving files: | Archiving files: | ||
| - | < | + | < |
| + | dsmc archive -archmc=M14 -se=SO_U_`hostname`_ORX_D_BAX "/ | ||
| + | </ | ||
| - | =====Restart LANFree Storage agent===== | + | ==== Restart LANFree Storage agent ==== |
| - | < | + | < |
| - | =====Update number of mount points for a node===== | + | udevdba31: |
| - | < | + | root 13828246 |
| - | =====Start dsmc in administrator mode===== | + | root 29491300 62259284 |
| - | < | + | udevdba31: |
| + | udevdba31: | ||
| + | root 41418862 62259284 | ||
| + | udevdba31: | ||
| + | autostgagnt: | ||
| + | udevdba31: | ||
| + | / | ||
| + | Job root.1366365724.a will be run at Fri Apr 19 12:02:04 DFT 2013. | ||
| + | udevdba31: | ||
| + | root 20906202 62259284 | ||
| + | root 64225302 | ||
| + | udevdba31: | ||
| + | </ | ||
| + | ==== Update number of mount points for a node ==== | ||
| + | < | ||
| + | tsm: TSMSRV1> | ||
| + | ANR2063I Node CLUBDEV updated. | ||
| + | </ | ||
| + | ==== Start dsmc in administrator mode ==== | ||
| + | < | ||
| + | dsmadmc -id=ibmdba -pa=$DSMADMPWD -se=baxmac | ||
| + | </ | ||
| Add -comma or -tab to command line in order to get the query results in a list format | Add -comma or -tab to command line in order to get the query results in a list format | ||
| - | < | + | < |
| - | =====Check TSM sessions are running Lanfree===== | + | dsmadmc -id=ibmdba -pa=$DSMADMPWD -se=baxmac -comma |
| + | </ | ||
| + | ==== Check TSM sessions are running Lanfree ==== | ||
| Message number 415 shows the relevant sessions | Message number 415 shows the relevant sessions | ||
| - | < | + | < |
| - | < | + | dsmadmc -id=ibmdba -pa=$DSMADMPWD -se=baxnos -comma " |
| + | </ | ||
| + | < | ||
| + | DATE_TIME: 2015-12-30 00: | ||
| + | MSGNO: 415 | ||
| + | SEVERITY: I | ||
| + | MESSAGE: ANR0415I Session 1011613 proxied by STABENOUERP07MAC started for node SO_U_JDBEOP1_ORA_X_BAX. (SESSION: 1011613) | ||
| + | </ | ||
| Parsing the session id out of the message, we can query the summary to find more info. | Parsing the session id out of the message, we can query the summary to find more info. | ||
| - | < | + | < |
| + | dsmadmc -id=ibmdba -pa=$DSMADMPWD -se=baxnos " | ||
| + | |||
| + | START_TIME: 2015-12-30 00: | ||
| + | END_TIME: 2015-12-30 00: | ||
| + | ACTIVITY: BACKUP | ||
| + | NUMBER: 1011613 | ||
| + | ENTITY: SO_U_JDBEOP1_ORA_X_BAX | ||
| + | COMMMETH: Tcp/Ip | ||
| + | | ||
| + | | ||
| + | EXAMINED: 0 | ||
| + | AFFECTED: 1 | ||
| + | FAILED: 0 | ||
| + | | ||
| + | IDLE: 0 | ||
| + | MEDIAW: 0 | ||
| + | | ||
| + | SUCCESSFUL: YES | ||
| + | | ||
| + | DRIVE_NAME: | ||
| + | LIBRARY_NAME: | ||
| + | LAST_USE: | ||
| + | | ||
| + | NUM_OFFSITE_VOLS: | ||
| + | </ | ||
| + | |||
| + | ==== Clean up export dump and log files if they are on tape ==== | ||
| + | < | ||
| + | for i in `find / | ||
| + | sid=`echo $i | awk -F_ ' | ||
| + | echo dsmc q ar -se=so_u_`hostname`_orx_d_bax $i | ||
| + | dsmc q ar -se=so_u_`hostname`_orx_d_bax $i >/ | ||
| + | if grep $i / | ||
| + | echo rm -f $i | ||
| + | rm -f $i | ||
| + | fi | ||
| + | done | ||
| + | rm / | ||
| + | </ | ||
| - | =====Clean up export dump and log files if they are on tape===== | ||
| - | < | ||
tsm.1544130327.txt.gz · Last modified: 2018/12/06 21:05 by 91.177.234.129
