ADSM-L

Re: Detect whether L700 tape library unavailable

2006-08-17 16:02:20
Subject: Re: Detect whether L700 tape library unavailable
From: Robin Sharpe <Robin_Sharpe AT BERLEX DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Thu, 17 Aug 2006 16:00:46 -0400
Gerald,

That's a cool script... I've never quite gotten that interface working in
batch.   The only thing I would worry about is what if TSM tries to open
the library while the script has it open?  Will it go offline?  I guess
having it in a script would be less exposure than an interactive run (of
lbtest) since it runs at CPU speed.

BTW, our L700  (we have two actually, one here in NJ and one in CA) is
really an HP 20/700, so it doesn't need the dongle for the web interface to
work.  Not sure if there are any functional differences, as I've never used
the real StorageTek web page.  We went to StorageTek when we wanted to
upgrade from DLT to LTO and HP could/would not do it.  So it's not purple,
but beige.

Regards,
Robin Sharpe
Berlex Labs



             Gerald Michalak
             <gmichala AT US DOT IBM.
             COM>                                                       To
             Sent by: "ADSM:           ADSM-L AT VM.MARIST DOT EDU
             Dist Stor                                                  cc
             Manager"
             <[email protected]                                     Subject
             .EDU>                     Re: Detect whether L700 tape
                                       library unavailable

             08/17/2006 03:37
             PM


             Please respond to
             "ADSM: Dist Stor
                 Manager"
             <[email protected]
                   .EDU>






The L700 does have an optional "personality" module which allows the
library to be connected to the network. You can then open a browser to this
address and see the whole library, slots, drives, i/o ports, errors.

We have it on all our L700 libraries.

Also, I've created a Perl script which uses the lbtest command to get the
list of tapes in the i/o slots. ( see below )  It may not be pretty but it
works.


I use this list in scripts to checkin offsite tapes and load/label new
scratch tapes.



Gerald Michalak
TSM - Certified V5 Administrator

==============================


lib_cap_inv.pl
==============================
#!/usr/bin/perl
#       lib_cap_inv.pl
#

open (LIBV, "/usr/tivoli/tsm/devices/bin/lbtest -f lbtest.in -d /dev/lb0 -o
/tmp/lbinv.out |") || die(" * * * Library Busy !!!! ");

close (LIBV);

`rm -f /adsm_restore/lib_cap_inv`;

open (INV,"/tmp/lbinv.out");
open (CAPINV,">>/adsm_restore/lib_cap_inv");

while (<INV>)
{
        $line=$_;
        chop($line);

        ($type,$dummy,$dummy,$dummy,$slot,$stat ) = split(" ",$line);

        if ( $type eq "Import" and $stat eq "FULL)" )
        {
                $line=<INV>;
                $line=<INV>;
                $line=<INV>;
                chop($line);
                ($dummy,$dummy,$f1,$f2,$f3 ) = split(" ",$line);
                print CAPINV "$f1 \n";
                print " slot=".$slot." f1=".$f1." f2=".$f2." f3=".$f3."\n"
;
        }
}

close (INV);
close (CAPINV);

exit;

======================

lbtest.in
======================
command open $D
command return_elem_count
command return_lib_inventory_all
command close

<Prev in Thread] Current Thread [Next in Thread>