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%)