[olug] slightly OT: IBM RS6000 backup tapes

Jay Hannah jay at jays.net
Fri May 16 17:57:55 UTC 2003


On Fri, 16 May 2003 ehaas at unmc.edu wrote:
> Does anyone have experience with these types of changers? There's no
> model or serial number on it, it just says "IBM".
> Can you point me in the direction of a website, or possibly donate your
> own existing script that does the same thing?

We (I) wrote some object oriented Perl to control our Magstar tape
libraries for our RS/6000. It's a convenient abstraction which launches
/usr/bin/tapeutil commands on the back end, making sure to only do "safe"
things to correct tapes. It groks a tape database w/ serial numbers, slot
allocations, business purposes (etc.) that we designed so we can do stuff
like this:

---
$magstar->mount($x, $y)

$x is the tape purpose, $y is the tape number. You do not have to know the
tape volume tag nor assigned slot number to mount a tape (neat, huh?).
So, if the Tuesday night omni-res level 0 backup takes 3 tapes to
complete, your program might look like this:

  $magstar->mount(   "omni-res:level0:2", 1 );
  ... start ontape    ... wait for prompt for tape number 2 ...
  $magstar->unmount( "omni-res:level0:2", 1 );
  $magstar->mount(   "omni-res:level0:2", 2 );
  ... continue ontape ... wait for prompt for tape number 3 ...
  $magstar->unmount( "omni-res:level0:2", 2 );
  $magstar->mount(   "omni-res:level0:2", 3 );
  ... continue ontape ... wait for exit ...
  $magstar->unmount( "omni-res:level0:2", 3 );

You should know that mount() and unmount() are easily insulted and they
invoke die() if you upset them. Ways to upset them include attempting to:
(1) mount a tape in a drive that already has a tape in it, (2,3) un/mount
a tape which is not registered in the tape database (4) mount a tape for
which no registered tape in the tape database can be found in the tape
library, (5) unmount a tape when there is no tape in the drive, (6)
unmount a tape whose designated slot is not empty.

$magstar->unmount($x, $y)

See mount(). unmount() undoes that.
---

Etc... At 2am it's awfully handy to not have to figure out serial numbers,
slots, etc.

We're baby stepping towards a similar abstraction for an MTX tape changer
on Solaris.

Dunno if this would help you or not.

Cheers,

Jay Hannah
Omaha Perl Mongers: http://omaha.pm.org








More information about the OLUG mailing list