Script for Fixing Read Only Volumes

Kramer

ADSM.ORG Member
Joined
Mar 14, 2005
Messages
37
Reaction score
2
Points
0
Location
Canberra, Australia
Website
Visit site
Just thought I'd share the following script I wrote to fix read only volumes on my TSM Servers (this is a Windows command script). The only disadvantage is that I would like to run it through TSM as an Admin schedule - which I don't believe can be done with this kind of script?
Code:
@echo off
REM
REM	The following script reclaims readonly volumes
REM


set TSMID=adminid
set TSMPASS=adminpassword
set TSMSERVER=%COMPUTERNAME%

set ROVOLS=C:\Temp\ReadOnlyVolumes.txt
set LOG=C:\Temp\ReadOnlyVolumes.log

cd C:\Progra~1\Tivoli\TSM\baclient

C:\Progra~1\Tivoli\TSM\baclient\dsmadmc.exe -ID=%TSMID% -PASSWORD=%TSMPASS% -dataonly=yes -tcpserveraddress=%COMPUTERNAME% -outfile=%ROVOLS% "select volume_name, pct_utilized from volumes where access='READONLY' order by pct_utilized"
for /f "tokens=1 " %%i in (%ROVOLS%) do (C:\Progra~1\Tivoli\TSM\baclient\dsmadmc.exe -ID=%TSMID% -PASSWORD=%TSMPASS% -tcpserveraddress=%COMPUTERNAME% "move data %%i wait=yes" >> %LOG%)
 
The only disadvantage is that I would like to run it through TSM as an Admin schedule - which I don't believe can be done with this kind of script?

I think you can use a postschedule command to run you script!
 
I think the postschedule option would only work if I was to run this against my TSM server as a client node? In which case I could define a command schedule...

Anyway for the moment I'm running it as Windows scheduled task - that way it can exit after 8 hours of processing (I currently have a HEAP of read only volumes as we are transitioning our library from LTO2 to LTO4).
 
Back
Top