SUMMARY: Sending a SCSI reset

From: Fabrice Guerini <fabrice_at_bluemartini.com>
Date: Fri Feb 01 2002 - 17:14:13 EST
My question was about how to send a SCSI reset to a tape robot (to trigger
a reading of tapes barcodes).

Yuri Pismerov suggested I take a look at MTX (http://mtx.sourceforge.net/),
which has a command called "inventory." Unfortunately, it tells me
"mtx:inventory failed". However, I found a NetBackup program that allowed
me to send SCSI commands to the tape library. I wrote a little script that
inventoried all my robots automatically. Here's my script, with some
niceties added, for your reading pleasure:

TMPFILE=/tmp/vmupdate.$$
TLD0=/dev/sg/c2t5l0
TLD1=/dev/sg/c3t5l0
TLD2=/dev/sg/c1t5l0
TLD3=/dev/sg/c1t4l0

echo init >  $TMPFILE
echo q    >> $TMPFILE
i=0
for library in $TLD0 $TLD1 $TLD2 $TLD3
do
    echo "Starting hardware inventory of robot #$i..."
    (/usr/openv/volmgr/bin/tldtest -r $library < $TMPFILE | \
                 egrep -v 'Enter tld commands'; \
                 echo "Inventory of robot #$i done") &
    child_pids="$child_pids $!"
    sleep 1
    i=`expr $i + 1`
done
echo Waiting for completion. Please be patient...
wait ${child_pids}
echo "Robots inventory completed."


+===========================================================+
| Fabrice Guirini               Blue Martini Software, Inc. |
| Senior Operations Engineer    2600 Campus Drive           |
| Tel: (650) 356-7576           San Mateo, CA 94403-2522    |
| Fax: (650) 356-4001           www.bluemartini.com         |
+===========================================================+
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Feb 1 16:26:56 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:33 EST