General TSM tape tips.
![]() |
|
TSM - General Tape Tips
Calculating Tape requirements
Collocation
Controlling wait time for tapes
Setting up Windows LAN free paths
Auditing Tape Libraries
Auditing Volumes
Calculating Tape requirements
A method to forecast future tape growth. This assumes that you had steady growth in the last month, and you expect this to continue. It also assumes that you are not using collocation. If you know you are going to add 200 more servers next month, then they represent a step growth, which will be over and above the incremental growth forecast here. This method also assumes that you copy your tape storage pools.
Query the TSM server to get statistics on data copied from the primary storage pool in the past month using
Q ACTL BEGINDATE=-30 SEARCH=ANR1214
add up the daily archive and backup copy from primary to copypool storage and divide by 30; now you have a per day average that is being backed up. Double the value because if you have primary and copy storage pools. Call this value 'DailyData'.
now find out how much data is held per full tape, on average, with the following query
SELECT STGPOOL_NAME AS STGPOOL, CAST(MEAN(EST_CAPACITY_MB/1024) AS DECIMAL(5,2)) AS GB_PER_FULL_VOL FROM VOLUMES WHERE STATUS='FULL' GROUP BY STGPOOL_NAME
add the average of each storage pool and divide by the number of storage pools; this should give you an average capacity for a tape from all data types and using compression. Call this value 'AvCap'
DailyData / AvCap = TAPES TSM WANTS PER DAY!
Now we need to calculate how many tapes TSM frees up each day. Use the query
Q ACTL BEGINDATE=-30 SEARCH=ANR1341
Add these lines up and divide by 30 days. This will give you the number of tapes reclaimed a day.
The difference between the number of tapes used, and the number of tapes reclaimed is your growth rate. Its unlikely to be a negative number.
Collocation
Setup
With collocation on, when TSM starts a backup, or migration for a given client, it tries to put the data on a 'filling' tape first, where data already exists for that client. If there isn't one, it selects a scratch tape unless the pool has already reached MAXSCRATCH, in which case it puts the data on the least-full tape available in the pool.
Setup? Just turn on collocation and set a MAXSCRATCH for your existing tape pools. New data will be collocated, and existing tapes will gradually get collocated as they go through the reclaim process.
Restores run significantly faster with collocated tapes, as fewer tape mounts are required.
Problems
One of the problems with collocation is that you can end up with very little data on very high capacity tapes. If TSM has a new client, and a scratch tape available, it will use the scratch tape, rather than a 'filling' tape with very little data on it. To efficiently fill your tapes, you need MAXSCRATCH set to fewer tapes than you have clients.
The other side of this is that your tapes will start to fill up over time, and there will be tapes that are full but not yet eligible for reclaim, so you will have fewer FILLING tapes in the pool. So you either have to increase MAXSCRATCH or reduce RECLAIM%, or you have fewer and fewer filling tapes and gradually lose the benefits of collocation. You really need the 'suck it and see' approach to find out the best balance between MAXSCRATCH vs. RECLAIM% for your site.
If you do set MAXSCRATCH to less that your number of clients, then you need to realize that you will never have any scratch tapes in your pool. Your tapes will always be either 'full' or 'filling'. If you use MOVE DATA to free up a tape, you will be back to square 1 after the next backup run. That's the way collocation works.
Another possible problem is that with collocation on you get a LOT more tape mounts during migration. Also, if you copy your onsite collocated pool to an offsite non-collocated copy pool, you will get more mounts during reclaim of offsite storage pools, and during backup stgpool. Some tape drives cannot handle all that activity. You can reduce the amount of extra tape activity somewhat by trying to schedule your copy storage pool before migration happens, so that most of the data goes from disk to tape, rather than tape to tape.
The term 'Imperfect collocation' is sometimes used to describe the situation that occurs when collocation is enabled, but there are insufficient scratch tapes to ensure that each node stores its data on different tapes. Some nodes will have their own tapes, and some will share, so some collocation will happen.
Controlling wait times for tape mounts
By default, a process will wait 60 minutes for a tape mount, before it gets cancelled. To change this, use the server option
MOUNTWAIT n
where n is a number in minutes from 0 to 9999.
The parameter will only start counting once the process gets the mount message, so if a process is waiting because all the drives are in use, it will not time out.
Setting up Windows LAN free paths in TSM
When you define a Windows storage agent, it is necessary to match the serial numbers of drives when defining the drive paths, between the Windows server and the TSM server. A typical define path command will look something like
define path agent_name tape_name srtc=server destt=drive - libr=library_name device=mt_name
Where the agent_name is the name of the storage agent, the tape_name is the name of a tape as defined to your TSM server and the mt_name is the name of the mt device on your Windows client. So the first thing you need to know, is how to map between physical device names and mt names at the windows end. IBM provides a utility called tsmdlst to do this, and since TSM 6.3, it can be used to automatically define the paths. The tsmdlst command can be found in C:\Program Files (x86)\Tivoli\TSM\storageagent and the command to automatically define the paths is
tsmdlst /genmacropathsync /addpaths /execmacropathsync /id=userid /pass=password - /tcps=ip address of server /tcpp=port of server - /server=server name /stagent=storage agent name
The userid and password need to be for a user on the TSM server that has system rights. The ip address of server and port of server are for the TSM server, the default port address is 1500. The server name is the name of the TSM server and the storage agent name is the name of the storage agent running on the Windows machine.
If you are running TSM 6.2 or earlier, then you need to run the tsmdlst command piping the output to a file (tsmdlst > dlist.out) then use that output to relate the WWN names of the drives on the Windows client to the WWN names of the drives on your TSM server. From this, you can get the mt name and corresponding TSM drive name that you need to build the define paths command.
Auditing Tape Libraries
You need to run an audit occasionally to make sure that what TSM thinks
is in your library, matches reality.
The audit command is
AUDIT LIBRARY library-name CHECKLABEL=BARCODE
The CHECKLABEL=BARCODE switch is optional, but it will make the audit go pretty
fast, say 5 minutes. With that switch, all the audit involves is your
robot scanning the barcode labels of all the tapes. Without that switch,
the default action is to mount each tape, which will take a long time.
The audit may wait until all tapes are dismounted from drives, so it could take a while for an audit to start. Consider canceling tape processes if your audit is waiting, and you need it in a hurry.
Auditing Tape Volumes
You can audit a tape volume with the command
audit volume volser fix=yes
and this will check all the backups on the tape and fix the database entries for any that are damaged. It is also possible to audit all the volumes in a storage pool with a single command
audit volume stgpool=pool-name fix=yes
This could audit a lot of tapes and take a long time so you can restrict it by date. For example say you had a tape drive that went faulty on March 25th 2005 and was fixed on April 1st 2005. You want to check all the tapes that were written in that period for errors. Use the command
audit volume stgpool=pool-name fromdate=032505 todate=040105
If you chose a volume that is part of a volume set because it contains files that span volumes TSM will select the first volume in the set and scan them all, even if you pick a volume in the middle. If you just want to audit one specific volume in a set then you need to use the skippartial parameter
audit volume volser fix=yes skippartial=yes
