Veritas-bu

[Veritas-bu] Ejecting several tapes at once from CLI

2001-03-13 18:31:53
Subject: [Veritas-bu] Ejecting several tapes at once from CLI
From: Steve White stevew AT colltech DOT com
Date: Tue, 13 Mar 2001 18:31:53 -0500
This is a multi-part message in MIME format.

------=_NextPart_000_00C8_01C0ABEB.E0A444A0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Here's an E-mail (with a script attached) from a previous thread on this
list about the same thing...the script should work nicely for you.

Steve



> -----Original Message-----
> From: veritas-bu-admin AT Eng.Auburn DOT EDU
> [mailto:veritas-bu-admin AT Eng.Auburn DOT EDU]On Behalf Of Greenberg, Brian
> Sent: Tuesday, March 13, 2001 6:25 PM
> To: veritas-bu AT mailman.eng.auburn DOT edu
> Subject: [Veritas-bu] Ejecting several tapes at once from CLI
>
>
> Can anyone tell me how to eject several tapes at once from the
> CLI (or even
> X or Java) interface on a UNIX box?  The server is a Sun E450 and the
> library is a StorageTek L700 with one 20 slot CAP.
>
> Regards,
> Brian J. Greenberg
> Senior Storage Architect
> StorageNetworks, Inc.
> Storage Services for the e-Economy
> Brian.Greenberg AT storagenetworks DOT com
> 3009 112th Ave. NE
> Suite 175
> Bellevue, WA 98004
> 206.255.5274: Cell
> 425.889.7508: Office
> _______________________________________________
> Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
> http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
>

------=_NextPart_000_00C8_01C0ABEB.E0A444A0
Content-Type: message/rfc822
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment

From: "RYAN ANDERSON" <RYAN_ANDERSON AT udlp DOT com>
Sender: <veritas-bu-admin AT Eng.Auburn DOT EDU>
To: "Brad Fisher P70142" <p70142 AT email.mot DOT com>
Cc: <veritas-bu AT Eng.Auburn DOT EDU>
References: <3718004222 AT udlp DOT com>
Subject: Re: [Veritas-bu] Using CAP/Mailslot and Netbackup 3.4
Date: Thu, 8 Feb 2001 17:41:15 -0500
Organization: United Defense LP
Message-ID: <3A83208B.A146385A AT udlp DOT com>
MIME-Version: 1.0
Content-Type: multipart/mixed;
        boundary="----=_NextPart_000_00C5_01C0ABEB.E09CA380"
X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.8 sun4u)
X-Authentication-Warning: mailman.eng.auburn.edu: Host mailhost.eng.auburn.edu 
[131.204.12.13] claimed to be Eng.Auburn.EDU
X-BeenThere: veritas-bu AT mailman.eng.auburn DOT edu
X-Mailman-Version: 2.0beta5
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
X-Accept-Language: en

This is a multi-part message in MIME format.

------=_NextPart_000_00C5_01C0ABEB.E09CA380
Content-Type: text/plain;
        charset="Windows-1252"
Content-Transfer-Encoding: 7bit

Brad Fisher P70142 wrote:
> 
> This is great! So what's the trick? I don't doubt you, but
> we can't seem to be able to. Also, on page 346 of the 3.4
> Media manager's sysadmin guide it specifically says you
> cannot ... then there is the statement by Veritas tech support
> today saying the same thing. I just checked the 3.2 manual ...
> page 111 says the same thing ... only one tape at a time on an
> eject.
> 
> Have you written some scripts using vmchange?
> 

Here's a simple one called 'tpeject'.  Use it like this:

# tpeject TAPE1 TAPE2 TAPE3

Or you can use STDIN:

# tpeject
TAPE1 (wait)
TAPE2 (wait)

(CTRL-D to escape)


Regards,

RCA
--
Ryan C. Anderson        |   United Defense L.P.    
Unix Administrator      |   763.572.6684 (desk)
ryan_anderson AT udlp DOT com  |   952.235.9936 (pager)
------=_NextPart_000_00C5_01C0ABEB.E09CA380
Content-Type: text/plain;
        name="tpeject.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
        filename="tpeject.txt"

#!/bin/sh
#
# File: tpeject
# Author: Ryan Anderson (from Blayne Puklich)
# Creation date: 2000-09-14
# Time-stamp: " "
#
# Description
#   Eject a tape media id (EVSN)
#   Ejects media IDs passed as parameters; if there
#   are no parameters reads STDIN.
#
# $Log: tpeject,v $
# Revision 1.1  2000/12/28 16:40:26  andersrc
# Initial revision
#
#

PATH=/usr/openv/volmgr/bin/admincmd:/usr/openv/netbackup/bin
PATH=$PATH:/usr/openv/volmgr/bin:/usr/local/bin:/usr/sbin:/usr/bin
VMCHANGE=/usr/openv/volmgr/bin/vmchange
export PATH VMCHANGE

gMe=`basename $0 .sh`

#
# Eject the media ID(s) given to us.
eject_tp() # media_id
{
        $VMCHANGE -res -m $1 -mt dlt -e
        echo "Ejected DLT with media ID $1 to mailslot."
}

if [ $# -gt 0 ]; then
    #
    # Eject all tapes passed on command line
    for tpid in $*; do
        eject_tp $tpid
    done
else
    #
    # eject all tapes passed on stdin
    while read tpid; do
        eject_tp $tpid
    done
fi
exit 0

------=_NextPart_000_00C5_01C0ABEB.E09CA380--

------=_NextPart_000_00C8_01C0ABEB.E0A444A0--