Need a basic move DRM \ Checkin script for IBM3584

jqgoode

ADSM.ORG Member
Joined
Aug 29, 2006
Messages
10
Reaction score
0
Points
0
Website
Visit site
Hi all,

I am in need of a basic MOVE DRM - Checkin script that I would like to run @ 18:00 everyday to checkin my tapes from a IBM 3584 IO station. I don't yet have access to TSM software site and have not been successful in automating this - been doing it manually - since this admin has been dropped on my lap. We are running TSM 5.2.4 on a windows 2003 server.

Thanks
Jim
 
you can create a .cmd file on the desktop of the TSM Server and add the following:

c:
cd \progra~1\tivoli\tsm\baclient
dsmadmc -id=uid -pass=password move drm * wherestate=vaultret tostate=onsiteretre

dsmadmc -id=uid -pass=password checkin libvol libraryname search=bulk checklabel=barcode stat=scratch

then you can just log in and run it or call the command via the TSM or Windows scheduler. Only trick is to make sure tapes are in the I/O station before it runs at 6pm
 
Becareful when using such a script... you can run the chance of losing tapes.

I would first issue a move drm * wherestate=courierr, then print off that list...

Upon verifing that what TSM knows about and what you have are identical, I would use the script listed above.

You need to verify or you can have lost media...
For example at 5:00 you issue a q drm * wherestate=vaultr... you pull those tapes, then at 6:00 you issue the move command... there is an hour window where you could have more tapes become available but you don't know about it.

In short.. go from vaultr, to courierr ... verify... then move to onsiter
 
Right!

Which is why I said "Only trick is to make sure tapes are in the I/O station before it runs at 6pm."

I assume there is something generating an onsite/scratch list, so you know whats coming in. Normally I run the move drm from vaultre to onsitere right after that list is generated so I am not moving tapes I dont have, thus not losing tapes.
:)

Good Luck!!
 
Thanks for the quick response!

For this site, Vault tapes are stored off-site at a vault company. Tapes only get pulled when they go courierr, which is the day after they go vaultr

Gonna try this tomorrow, but I think I might run into a issue with the IBM 3584 tape library, as when you do anything with "bulk" - it expects a "Reply" to the checkin request, or it sits there for 45 minutes or so - before it does it anyway. I am ok with the wait, just did not know if there is a easier way to do it or script it.

Thanks
 
One problem with a script such as this is that you have to answer to the request, and the script should be smart enough to know the reply number.

Add these lines to answer the request:

dsmadmc -id=%USERID% -password=%PASSWD% "q req" | findstr "ANR8373I" | awk '{print $2}' > breq.in
GSAR -s:: -r -f breq.in breq.out
for /F %%i in (breq.out) do dsmadmc -id=%USERID% -password=%PASSWD% "reply %%i"

GSAR and AWK are add-on DOS utility commands. Just GOOGLE for them.

Works for me all the time. I also have *NIX counterpart of this.
 
Last edited:
One problem with a script such as this is that you have to answer to the request, and the script should be smart enough to know the reply number.
Beginning with TSM 5.3, you can use the waittime (with a value of 0) of the checkin libvol command to avoid the need of a reply .
 
you can also use the move drm command using the cmd parameter so that you can schedule it inside of TSM and not have to do the dsmadmc -id -pass stuff....It is a cleaner way to go!

move drmedia * wherestate=vaultretrieve tostate=onsiteretrieve cmdfilename=/drm/move/exec.cmds cmd="checkin libvol lib8mm &vol status=scratch waittime=0"
 
Last edited:
can you move drm from a command file?
lets say i have 30 vault retrieves and i only want to move 12 of them and i put those 12 in a text file can i use a command that calls that text file without using the wildcard which will process all of them or typing manually each of the volume labels 1 by 1.
 
Dear All,
I search to disable DRM for use scripts on OS AIX. Have-you an idea how i doing for this result ?
Thanks for advance.
 
can you move drm from a command file?
lets say i have 30 vault retrieves and i only want to move 12 of them and i put those 12 in a text file can i use a command that calls that text file without using the wildcard which will process all of them or typing manually each of the volume labels 1 by 1.

Yes you can use "move drm" from a command line.

To limit the number of tapes to process, you need to have a "counter" in your script and looked at from an "if loop" command.
 
Hello,
have you an example (scripts, files,...)?
thanks
 
Back
Top