TSM Studio (59)
Adding and Labelling new tapes
All new Tapes being put into a Physical Tape Libraries will require a barcode on them. In most cases the vendor that supplied the tapes should also supple the barcode label.
TSM requires that the first time you put a new tape into the library you run the LABEL command.The LABEL command instruct’s TSM to write an Internal Label at the start of the Tape and this internal label will match the external barcode label.
The Assumption with these commands are that you are using a Fibre Channel or SCSI attached Library The tapes can be either placed into the slots in the library or they can be placed in the CAP slots ( TSM called these external IO slots – BULK IO )
When the tapes are ready you can run the following command
LABEL LIBV libraryname SEARCH=BULK LABELSOURCE=BARCODE CHECKIN=SCRATCH
Where libraryname is the name of your library
SEARCH=BULK tells TSM to search the external Input Output slots for the new tapes If you are not using the CAP ( External IO Slots ) and the Tapes to be labelled are already in the library then change the SEARCH=BULK to SEARCH=YES
LABELSOURCE=BARCODE tells TSM to make the internal tape label the same as the barcode
CHECKIN=SCRATCH tells TSM to mark this tape as a scratch tape When using TSM Studio open the Libraries Dataview in the Libraries and Volumes Category
Right Click on the Library that has the tapes in that you wish to Label and select the Label Command
Enter the options for the Label Command as above and press Ok
NOTE: When using the SEARCH=BULK TSM will prompt you to enter the Tapes and wait for a reply. Click Here to see the Article on replying to requests
Auditing a Library
Auditing a Tape Library is the process in which TSM verifies the information it has stored internally about the tapes, their labels and where they are located in the library (slot numbers) with the Physical Tape Library.
Why do you need to audit your library?
From time to time your Library will have maintenance performed on it, Tape Library Arms get jammed, tapes get stuck in drives and need to be manually moved back to their slot and tapes can be manually inserted in Tape Libraries. When problems or tasks like these described happen in your tape library it is good practice to run the Audit Library command.
The Audit Library Command can verify the tapes in the Library in one of two ways.
1.By Barcode, this option verifies the barcode information and slot position and runs quickly as the Tape Library already has this information stored in its internal memory.
2.By Internal Label, every tape that TSM uses has an internal label that has been written to the start of the tape by TSM when running the label command when the tape was initially placed into the Library. Using this method causes TSM to mount every tape into a drive and verify its label. As every tape is physically mounted and read this option can be time consuming.
Which option should you use?
In a physical library it is extremely rare for the barcode label and the internal label to not match, but it can happen, so if you have the time then I would recommend using option 2, but if you don’t have a big window for your tape library to be out of action then use option 1.
If you are using a Virtual Tape Libraries and have the Relabel option set then I strongly advise running option 2 from time to time on your virtual library.
When running either variation of the Audit Library command there must be no activity happening on the Library. Run the Query Mount command and make sure there are no tapes mounted or even idle. Cancel all processes and Sessions that are using the Drives. Once there are no drives in use run the Audit Library
From the Admin CLI Using barcode information only AUDIT LIBRARY LibraryName CHECKLABEL=BARCODE
Using Internal Labels AUDIT LIBRARY LibraryName CHECKLABEL=YES Where LibraryName is the name of your Library
From TSM Studio Go to the Libraries and Volumes Category and open the Libraries Dataview
Select the Library you wish to Audit Right Click to bring up the Command Options and select either the Audit Library ( Check Label ) or Audit Library ( Check Barcode )
In TSM Studio you can check for label mis-matches, it requires that you first run the AUDIT LIBRARY command with the CHECKLABEL=YES option then from the Main Menu Select Tools–> Check TSM Tape Labels
Choose the TSM Server and Library and then hit the Refresh Button Use the View drop down to show you the mis-matched tape labels
Installing the Administrative CLI – Windows
The Administrative Client is part of the normal windows backup-archive client install but by default it is not installed. You will need to apply a custom install as shown below:
1. Start the Tivoli Storage Manager Client InstallShield(R)
2. Choose the Destination Folder
3. Choose Custom Setup as the Setup Type
4. IMPORTANT – Make sure that you select the Administrative Client Command Line Option as shown below and choose ‘ run all ‘ from my computer
5. Click the Install option
6. To verify the installation, verify the existence of dsmadmc.exe in the C:\Program Files\Tivoli\TSM\baclient directory
You may come across an error if the paths are not correctly set up. If you see the following message when starting the administrative cli program or when testing a TSM Server connection in TSM Studio, follow the suggested action below.
ANS0101E Unable to open English message repository ‘dscenu.txt’
This error is a result of the administrative cli program, “dsmadmc.exe”, unable to find the message file.
To start, you can check if the dscenu.txt file exists in the c:program filestivolitsmbaclient directory ( assuming, you installed the TSM client in the default location ).
If the file exists, try adding the following environment variable
DSM_DIR=C:\Program Files\Tivoli\TSM\baclient
Migration
TSM uses a hierarchy of Storage Pools to “migrate” or move data from one type of storage to another or to the same type of storage.
How does Migration work?
There are a couple of parameters that need to be setup to facilitate migration. The first is to setup the “Next Storage Pool” parameter, this defines which pool the data will “migrate” to from the current pool.
To see how this is currently defined on your storage pools
Run the following Admin CLI Command
QUERY STGPOOL F=D and look at the “Next Storage Pool” field
In TSM Studio open the Storage Pools Dataview from the Storage category and check out the NextStgPool column
To change the Next Storage Pool from the Admin CLI
UPDATE STGPOOL stgpoolname NEXTSTGPOOL=nextstgpoolname
From TSM Studio
Right Click on the Storage Pool and Choose Next Storage Pool and then choose the storage pool
The next part is setting the migration threshold parameters which tell TSM when to move the data from the current pool to the “Next Storage Pool”. These two parameters are
Low Migration and High Migration, they represent a percentage full threshold for the storage pool that they are defined on
These Parameters function like this
TSM writes data to the current pool, the current pool hits the High Migration Threshold and will start “migrating” data to the storage pool defined in the “Next Storage Pool” field.
TSM will keep “migrating” data until it reaches the Low Migration Threshold and will then stop and wait for the High Threshold to be hit again
To Change the Low Migration or High Migration from the Admin CLI
UPDATE STGPOOL stgpoolname LOWMIG=xx HIGHMIG=xx
From TSM Studio, Select the Storage Pool and right click and choose Migration Thresholds and then choose the values
Ideally you will want enough disk space in your Primary Disk pool to store the nightly backups and while the nightly backups are running you will keep the high migration value somewhere around the 80 mark and low migration value somewhere around the 60 mark just so you don’t run out of space in the Primary Disk Pool. During this time you can be running other TSM admin tasks such as reclamation.
In the morning when your backups have finished or close to finishing you can change the High Migration to 5 and Low Migration to 0, this will then force all the data from the Primary Disk Pool ( Usually to Tape ).
This is not the only way this can be done and you may have reasons to run things differently and if you have a VTL you may wish to run with low values continuously.
Another Parameter related to Migration is the Migration Processes parameter, this defines how many processes will be used to Migrate the Data to the Next Storage Pool. When moving from the Primary Disk data to a Primary Sequential Pool (In most cases this is usually a tape pool) each process will use one tape drive.
UPDATE STGPOOL stgpool MIGPROCESS=xx
From TSM Studio, Select the Storage Pool, Right Click and choose Migration Processes.
These procedures can be automated using Administrative Schedules
To stop Migration set HighMig=100 and LowMig=99 and to Migrate everything HighMig=0 and LowMig=0
Reclamation
Reclamation is the process of reclaiming unused space on a tape (applies to Virtual Tapes as well). Over time the TSM expiration process will expire old data, creating gaps of unused storage on the tapes. Because Tapes are sequential media, TSM can only write data to the end of the tape, so these gaps of “Empty Space” cannot be used.
Lets see an illustration of this
Tape 1 is a new tape and data is written to it as follows (each number on the following line represents a file being backed up)
1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16
Over time the expiration runs and expires old files (The * represents an expired file)
1-2-3-*-5-*-*-8-9-*-*-*-13-14-15-16
TSM refers to this space ‘*’ as Reclaimable Space.
TSM can only write to the end of the tape and the Reclaimable Space cannot be reused until all the data on the tapes expires and the tape becomes a scratch tape again.
To view this reclaimable space
QUERY VOLUME volno F=D (where volno is the Volume Number for the Tape ) and look at the Pct Reclaimable Space field.
When using TSM Studio open the Volumes dataview from the Libraries and Volumes Category and view the Pct Reclaim Column
To get back this reclaimable space TSM has a Reclamation process which copies all the valid information from the tape to a new scratch tape so looking at our previous illustration TSM will create the new tape with the valid files
1-2-3-5-8-9-13-14-15-16
This eliminates all the reclaimable space and the old tape becomes a scratch tape.
On each Storage Pool supporting reclamation there is a Reclaim Threshold parameter
Run the QUERY STGPOOL stgpoolname F=D and look at the Reclamation Threshold field
Or when using TSM Studio, open the Storage Pools dataview in the Storage Category and check the Reclaim column
NOTE: For tapes with a value of READWRITE or READONLY in the ACCESS column. TSM will run the reclamation on them when they are FULL, if they are FILLING they will not be touched.
Tapes in an OFFSITE status in a copy pool will be reclaimed whether or not they are FILLING or FULL.
To Change the Reclamation Threshold for a Storage Pool use the following command
UPDATE STGPOOL stgpoolname RECLAIM=xx ( stgpoolname is the storage pool and RECLAIM is the threshold to use )
On TSM Studio right click on the Storage Pool and select Reclamation Threshold and either choose one of the values or use the SET option to choose another value.
As there are a number of admin jobs and backup jobs that all need to use tape drives, you will need to find the right window to run your reclamation processes and decide how many processes you wish to run. Remember that each process will require 2 tapes drives, one for the input tape and one for the output tape. Automatically starting and stopping your reclamation processes can be done with Administration Schedules. ( Check back soon to see an article on Admin Schedules )
TSM Studio Server (3)
TSM Studio Server Security
As of TSM Studio Server version 2.9.1.0 security has been tightened up and no longer stores any security information in the registry.
The default logon to TSM Studio Server is now admin with a default password of password, (Domain field should be blank otherwise TSM Studio Server will assume it is a windows userid).
We strongly advise changing the admin password using the following procedure.
To change the password for the inbuilt admin userid use the Security–>Change Admin Password
Security in TSM Studio Server is now defined by assigning role(s) and Windows groups to a TSM Studio Server security group.
The TSM Studio Server security system will automatically create a group named Admins that has access to all functions in TSM Studio Server, the first time it is loaded it will look for the old group definitions in the registry and load them into this group otherwise it will populate with following default groups Administrators, Domains Admins and TSMStudioAdmins.
Also two roles will be created, one called Administrators which is assigned to the Admins Server group and one called Operational Report Viewer for allowing access to the Operational Report Viewer.
To access TSM Studio Server Groups select Security–>Groups
To modify the Admins Group Double Click or select edit from the Toolbar
Add Windows Group that should have admin access to TSM Studio Server, One Group per line
Microsoft SQL Server settings for TSM Studio Server
If SQL Server is running on the same Server as the TSM Studio Server service then we recommend 12GB of memory as a minimum to ensure the healthy running on TSM Studio Server.
By default SQL Server will be configured to use all available memory this will need to be changed so that there is enough free memory for TSM Studio Server to function. It is recommended that SQL Server be given 4GB of memory and the other 8GB is left available for TSM Studio Server.
To change the default memory settings in SQL Server. Start up SQL Server Management Server right click on the server and select properties
Select Memory and then enter 4096 into the Maximum server memory field
Performance Tuning TSM Studio Server
In TSM Studio Server 2.9.011 and above there are a number of added enhancements to help tune TSM Studio for you environment.
The first area to check is on the Concurrency Tab of the TSM Studio Server properties dialog which can be accessed from Configuration–>Properties as shown here
The main setting to check here are Concurrent Reports and Concurrent Collector Threads. Report creation can consume large amount of memory so it is recommended to keep this number low.
Also some of the collections can consume a large amount of transaction log space especially the activity log collector. Each collector can be individually tuned. Goto Configuration->Collection schedules and edit the Activity Log collector and change the Concurrent Collectors to a small number (less than 5 )
Also check out the below link for SQL Server memory settings
https://spiritsoftware.biz/knowledgebase/microsoft-sql-…-studio-server
Dataviews (10)
Customizing the Columns
The columns in a Dataview can be customized in a number of ways,
- Columns can be moved
- Columns can be hidden
- Column Display Text can be changed
- The alignment can be changed
- The format of the data can be changed
To modify the columns right click on the dataview to display the dataview context menu and select columns ( or choose columns from the menu bar ). A dialog will be displayed showing a list of all the available columns and their settings.
Use the up and down arrow keys on the menu to change the order the columns are displayed.
To Hide a field click on the Hidden field for the column to hide.
To Change the Display text for a field click over the text in the Column Display Text field.
Use the Alignment Column to select the alignment for that column.
The Format field is used to the control how the column displays its data for example.
N0 defines a number field with no decimal points.
N2 defines a number field with 2 decimal points.
G defines a date field and shows just the date.
g defines a date field and shows the date and time
These are standard dotnet formats. If you want to have the data displayed in a different way let us know and we will help you format the data the way you want to see it.
Displaying Line Numbers
This will display Line Numbers as shown below
Sometimes it is handy to be able to the see line numbers in a dataview.
Right click on the Dataview and select the Line Numbers option from the Dataview context menu ( or from the Main Menu Bar ) to disable/ enable line numbers.
To Enable Line Numbers click on the Line Numbers option from the Dataview Context Menu.
Exporting the Data
From time to time you may wish to export the data from a dataview. TSM Studio provides a number of formats that you can use to export to Excel, PDF, XPS and XML. .
Right click on the Dataview to display the context menu for that Dataview and select from the available Export Options, then choose the ourput file name.
Data exported to XML can be reloaded later using the Load from XML option on the Dataview context menu, this allows you to work offline if you wish.
Filtering the Data
TSM Studio provides extremely powerful filtering capabilities.
At the top of each column on the right hand side where the title is displayed you will also notice a small filter icon. Click on this icon to display the filtering dialog for that column. The icon is only displayed when the mouse is positioned in the column header.
Filtering Examples
Show all rows where Devclass = ‘DISK’
Show all Rows where Stgpool Name is either DISKPOOL or BACKUPPOOL.
TSM (10)
How can I enable VSS Snapshot support on only one windows drive
It is possible to enable VSS on a per drive basis by using the following in the dsm.opt file
INCLUDE.FS C: SNAPSHOTPROVIDER=VSS ( Change C: to the drive letter you require )
How can I see what management classes my client node is using from the TSM Server
The following command will show all unique management classes used by a node
SELECT DISTINCT(CLASS_NAME) FROM BACKUPS WHERE NODE_NAME = ‘XXXXXX’
to see only management classes used on directories use
SELECT DISTINCT(CLASS_NAME) FROM BACKUPS WHERE NODE_NAME = ‘XXXXXX’ AND TYPE = ‘DIR’
to see only management classes used on files use
SELECT DISTINCT(CLASS_NAME) FROM BACKUPS WHERE NODE_NAME = ‘XXXXXX’ AND TYPE = ‘FILE’
Slow Session Initiation for dsmadmc.exe
If you find that it takes upwards of 30 seconds of establish a session to the TSM Server from the Admin CLI (dsmadmc.exe). It maybe because your TSM server is unable to resolve the clients name or the TSM Server is unable to communicate with any DNS Servers.
Client Side Encryption
TSM has the ability to encrypt data at the client node before sending the data to the TSM server. There are two methods that are available
1. Transparent Encryption
- This is where the encryption key is managed by and stored on the TSM server
- If the client node needs to be rebuilt data can be easily restored
- Data can be restored back to any node that is allowed to impersonate the original node
2. Client Side Encryption
- This is where the encryption key is manually managed and stored on the client using an encryption password
- More secure as data can only be restored if the encryption password is known
- If the password is lost then the data cannot be restored
To enable encryption at the client there are two parameters for setting up and a couple of include and exclude statements for selecting or excluding which files are to be encrypted.
ENCRYPTKEY
The ENCRYPTKEY option is used to choose either transparent encryption or client-side encryption. For client-side encryption there are two options to choose from
ENCRYPTKEY=SAVE ( Client-Side )
This option will prompt for an encryption password on the initial backup and then store this password in the password file. The password will be retrieved from this file for each subsequent backup.
ENCRYPTKEY=PROMPT ( Client-Side)
This option will prompt for an encryption password for each backup and restore. To be able to restore the data the same password that was using when backing the data up will be required
ENCRYPTION=GENERATE (Transparent)
This option will have TSM generate an encryption key password which is stored on the TSM server and managed by the TSM server.
ENCRYPTIONTYPE
The ENCRYPTIONTYPE parameter selects what type of encryption is used either DES56 or AES128 with the AES128 algorithm being the stronger of the two
Next is to select which file or directories to include in the backup
use the include.encrypt statement to include files and directories to be encrypted and takes the same format as any other include statement
use the exclude.encrypt statement to exclude files and directories to be encrypted and takes the same format as any other exclude statement
example
ENCRYPTKEY=GENERATE
ENCRYPTIONTYPE=AES256
INCLUDE.ENCRYPT /home/…/
EXCLUDE.ENCRYPT /home/…/test.fil
INCLUDE.ENCRYPT C:…*
EXCLUDE.ENCRYPT C:windows…*
When using the client-side encryption the encryption passwords are stored in the TSM.PWD files in unix or in the registry for windows
I would recommended using transparent encryption unless you have a specific requirement not to.
I am option asked how to prove that the data is encrypted. There is no way to do this with TSM and they only way to do this is use a network packet tracing tool such as wireshark. If you are interested on how to do this just send me an email gelliott@spiritsoftware.biz
For more information see Chapter 5 of IBM Tivoli Storage Manager: Building a Secure Environment
How do I know which management classes are applied to my files and folders
In Windows you can use the Preview Include-Exclude option in the backup client.
Start the backup client and go to the utilities menu and select Preview Include-Exclude
In the Preview Include-Exclude Dialog, choose the type either Backup or Archive ( Your normal nightly jobs will usually be of type backup )
Choose either to just show included files, excluded files or both. This information is ascertained from settings in your dsm.opt file
Choose the directories and files to be reported on. If you have a large file system and you choose a top level directory this command may take a long time to run and produce a large output file
Lastly choose the output file and select ok
When the task finishes open the output file with notepad and it will look as follows with the files on the left and the management class on the left hand side
The same preview include-exclude can be achieved with the backup-archive command line in both unix and windows as follows. This example will produce the same out as above
the -traverse=y tells the backup-archive client to include subdirectories
Helpful TSM SQL Commands (29)
Show the Number of Readonly Volumes
SELECT COUNT(*) FROM VOLUMES WHERE ACCESS=’READONLY’
Show all drives that are offline
SELECT * FROM DRIVES WHERE UPPER(ONLINE)<>’YES’
Show the number of Offsite Volumes
SELECT COUNT(*) FROM VOLUMES WHERE ACCESS=’OFFSITE’
Show all paths that are offline
SELECT * FROM PATHS WHERE UPPER(ONLINE)<>’YES’
Show all Offsite Volumes
SELECT * FROM VOLUMES WHERE ACCESS=’OFFSITE’