Friday, April 29, 2011

Delete Old Filespaces

Been looking to do some cleanup and I wanted an easy way to do it. So...I wrote this script. I can take the list returned and either make it a macro or an internal TSM script. Sure I could build a shell script that processed a list with the TSM server_name, the node_name, and FSID but I thought I'd show how you can create a command out of SQL returned data.

select 'del filespace ' || node_name || ' ' || cast(FILESPACE_ID as char(3)) || ' type=backup nametype=fsid wait=yes' AS COMMAND from filespaces where cast((current_timestamp-backup_end)days as decimal)>90


Here is an example of the results from the script:



COMMAND
------------------------------------------------------------
del filespace NODE1 37  type=backup nametype=fsid wait=yes
del filespace NODE1 9   type=backup nametype=fsid wait=yes
del filespace NODE1 36  type=backup nametype=fsid wait=yes
del filespace NEO_1 32  type=backup nametype=fsid wait=yes
del filespace NEO_1 31  type=backup nametype=fsid wait=yes
del filespace NEO_1 23  type=backup nametype=fsid wait=yes
del filespace NEO_1 29  type=backup nametype=fsid wait=yes

Tuesday, April 26, 2011

TSM 6.2 GUID Error

So when I and a co-worker were finishing up a TSM 6.2 install we ran into a problem running the tsmapipw command to set the $$_TSMDBMGR_$$ password. After investigating the error and search the web we realized the GUID was the problem and not our IP as was suggested in the following APAR.  The errors we received were:

ANR2987W Session ended because of machine GUID or local host IP
 address mismatch.
ANR0430W Session XXXX for node $$_TSMDBMGR_$$ (AIX) refused
 - node name is locked.

We tried various things and nothing seemed to correct the GUID issue. The TSM server started without any GUID related error (in fact it stated the GUID initialized successfully). So upon further searching we found this APAR that gives the solution.  What they state is that by adding the following line to the dsmserv.opt and restarting the server fixes the problem.

DBMTRUSTEDGUIDIGNORE YES

Once we added the line and restarted the TSM server the tsmapipw command ran successfully.