Hi Joe,

Writing a script is a lot easier than you might think--I just did it to
label about 90 tapes using a DDS4 autoloader with 8 tape magazine, it
was just a 14 line tcsh script with almost no debugging involved.  The
script is very site-specific since it was a one-off type of project, but
I attached it anyway so you can get some ideas.  My script labels one
magazine full of tapes, then you have to reload the magazine and run the
script again.  It wouldn't be too hard to change the script to use the
correct amanda API like using amtape and getting info from amanda.conf
file, but I haven't got the time or motivation to do it right now.

If you're in the middle of your dump cycle and want to add some tapes
onto the end of the dump cycle, the tricky part is fixing your tapelist
file--If you don't fix your tapelist, on the next run amanda will want
to use the tapes that you just labeled instead of continuing the current
cycle.  The easy way to fix it is to take the date stamp from the last
tape in the cycle and change the "0" for all of the new tapes to that
date--and of course don't forget to adjust tapecycle and other
parameters in amanda.conf--and then amanda should finish the current
cycle before starting to use the new tapes.

Joseph Del Corso wrote:
> Is it possible to amlabel an entire rack of tapes without
> doing it manually for each tape?
> 
> Specifically I have roughly 35 tapes that I'd like to label
> in some kind of automated fashion all at once.  Besides writing
> my own script (which would take time and more than likely a HECK of
> a lot of debugging) is there an easier way to do this?
> 
> Is there any benefit to doing this?

-- 
"Jonathan F. Dill" ([EMAIL PROTECTED])
CARB Systems and Network Administrator
Home Page:  http://www.umbi.umd.edu/~dill
#!/bin/tcsh -f
set i=2
while ($i < 9)
  set j=`awk '{split($2,a,"."); print a[2]}' dds4/tapelist | sort -n | tail -1`
  @ j++
  amlabel dds4 dds4.$j
  mtx -f /dev/sg3 unload
  mtx -f /dev/sg3 load $i
  @ i++
end
set j=`awk '{split($2,a,"."); print a[2]}' dds4/tapelist | sort -n | tail -1`
@ j++
amlabel dds4 dds4.$j
mtx -f /dev/sg3 eject

Reply via email to