Re: [Veritas-bu] how to get a list of tapes in the tape library
This script will get you the tapes in the jukebox for a particular volume pool. You will need to change the awk string where i search for P1000 to match what you robot is on an sgscan. The bit which just lists whats in the jukebox is echo s s | tldtest -r device path to robot #!/bin/sh #set -x VMDIR=/usr/openv/volmgr/bin NBUDIR=/usr/openv/netbackup/bin NBUDIRA=$NBUDIR/admincmd JBINV=/tmp/tapes-in-jukebox-jbinv usage() { echo \nUsage: tapes-in-jukebox Tape Pool Name\n } if [ $1 = ] then usage exit fi #robot parameters if [ -s /tmp/robot ];then ROBOT=`cat /tmp/robot` else ROBOT=`/opt/openv/volmgr/bin/sgscan | awk -F: '/P1000/ {print $1}'` echo $ROBOT /tmp/robot fi ROBCMD=$VMDIR/tldtest -r $ROBOT #Get Jukebox Inventory get_jb_inv() { cp $JBINV $JBINV.old echo s s | $ROBCMD | egrep slot|Barcode $JBINV } #Command finds scratch tapes #Get Scratchpool name #SPname=`$VMDIR/vmpool -listscratch | tail -1` SPname=$1 #Now lookup scratchpool pool number. SPnum=`$VMDIR/vmpool -listall | awk -F: '$1==pool number {pn=$2} $1==pool name $2~/^ *'$SPname'$/ {print pn}'` # Note: vmquery col 1 is tape number # col 3 is tape type # col 12 is poolname # col 20 is assigned date ## This works ## For NB 3.4 00/00/00 needs to be 00/00/ tapelist=`$VMDIR/vmquery -a -w | awk '$3 !~ /CLN/ $12 == '$SPname' {print $1}'` #echo tape list is $tapelist #exit get_jb_inv echo echo Tapes contained in L1000 which are $SPname echo count=0 for x in $tapelist do grep -- $x $JBINV /dev/null if [ $? = 0 ];then $VMDIR/vmquery -m $x | egrep media ID|slot count=`expr $count + 1` fi done echo echo Total number of $SPname tapes in Jukebox = $count Dave Carlson wrote: anyone know the console command for getting a list of tapes that are currently in the library? thanks! *Dave Carlson* Associate Systems Engineer *atlas*^® *Partner for Results** **^ *206.816.8221 // *direct* 206.850.8980 // *cell [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]* // email *_www.AtlasSolutions.com outbind://28/jenniferh/Local%20Settings/Temporary%20Internet%20Files/OLK3/www.AtlasSolutions.com_ // *web* ___ Veritas-bu maillist - Veritas-bu@mailman.eng.auburn.edu http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
Re: [Veritas-bu] how to get a list of tapes in the tape library
If you are going to use the below i suggest you do an inventory prior as this is what netbackup thinks is in the jukebox but ops could have been in and changed things around as they are unpredictable sorts ;) Inventory :- /usr/openv/volmgr/bin/vmupdate -x -rn 0 -rt tld -rh `uname -n` -vh `uname -n` -use_barcode_rules I have this in a script which periodically runs during the day #!/bin/ksh #Reloading and inventorising tapes for media manager vmupdate -x -rn 0 -rt tld -rh `uname -n` -vh `uname -n` -use_barcode_rules if [ $? != 0 ] then echo WARNING: Problem with loadtape script..maybe an unreadable tape! Please check its IMPORTANT\n\n |mailx -s uname -n` Loadtape script Error [EMAIL PROTECTED] [EMAIL PROTECTED] fi Ellwood, MW (Mike) wrote: If you mean within a specific robot, then what I use is : vmquery -rn 0 [-b] # I usually pipe it into a sort to get it by slot number or maybe media id (We only have one robot for each of our systems, but one could substitute the index number of the robot in question if you have more). (we are running an old level of Netbackup, so ymmv). Regards, Mike Ellwood -Original Message- *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Dave Carlson *Sent:* 27 April 2006 00:26 *To:* veritas-bu@mailman.eng.auburn.edu *Subject:* [Veritas-bu] how to get a list of tapes in the tape library anyone know the console command for getting a list of tapes that are currently in the library? thanks! *Dave Carlson* Associate Systems Engineer *atlas*^® *Partner for Results** **^ *206.816.8221 // *direct* 206.850.8980 // *cell [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]* // email *_www.AtlasSolutions.com outbind://28/jenniferh/Local%20Settings/Temporary%20Internet%20Files/OLK3/www.AtlasSolutions.com_ // *web* ___ Veritas-bu maillist - Veritas-bu@mailman.eng.auburn.edu http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
RE: [Veritas-bu] how to get a list of tapes in the tape library
There's no monolithic command for this, you have to parse a bit: Script: #!/bin/sh echo Robot\tSlot\tTape\n-\t\t-- 2 /usr/openv/volmgr/bin/vmquery -w -a | \ awk 'NR3 $9!=- {print $8 \t $9 \t $1}' exit -M From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Carlson Sent: Wednesday, April 26, 2006 5:26 PM To: veritas-bu@mailman.eng.auburn.edu Subject: [Veritas-bu] how to get a list of tapes in the tape library anyone know the console command for getting a list of tapes that are currently in the library? thanks! Dave Carlson Associate Systems Engineer atlas(r) Partner for Results 206.816.8221 // direct 206.850.8980 // cell [EMAIL PROTECTED] // email www.AtlasSolutions.com outbind://28/jenniferh/Local%20Settings/Temporary%20Internet%20Files/OL K3/www.AtlasSolutions.com // web ___ Veritas-bu maillist - Veritas-bu@mailman.eng.auburn.edu http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
RE: [Veritas-bu] how to get a list of tapes in the tape library
Title: Message Oh - right. That option. I guess there is a monlithic command. -M From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ellwood, MW (Mike)Sent: Thursday, April 27, 2006 3:51 AMTo: veritas-bu@mailman.eng.auburn.eduSubject: RE: [Veritas-bu] how to get a list of tapes in the tape library If you mean within a specific robot, then what I use is : vmquery -rn 0 [-b] # I usually pipe it into a sort to get it by slot number or maybe media id (We only have one robot for each of our systems, but one could substitute the index number of the robot in question if you have more). (we are running an old level of Netbackup, so ymmv). Regards, Mike Ellwood -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave CarlsonSent: 27 April 2006 00:26To: veritas-bu@mailman.eng.auburn.eduSubject: [Veritas-bu] how to get a list of tapes in the tape library anyone know the console command for getting a list of tapes that are currently in the library? thanks! Dave CarlsonAssociate Systems EngineeratlasPartner for Results206.816.8221 // direct206.850.8980 // cell[EMAIL PROTECTED] // emailwww.AtlasSolutions.com // web
RE: [Veritas-bu] how to get a list of tapes in the tape library
vmcheckxxx? vmcheckxxx NAME vmcheckxxx - Report the media contents of a robotic library SYNOPSIS install_path\Volmgr\bin\vmcheckxxx -rt robot_type -rn robot_number [-rh robot_host] [-h EMM_server | volume_database_host] [[-if inventory_filter_value] [-if inventory_filter_value] ...] [-full] [-list] DESCRIPTION Report the media contents of a robotic library and optionally compare its contents with the volume configuration. If no options are specified, the media contents of the robot and the volume configuration are listed along with a list of any mismatches detected. This command can be executed by any authorized users. For more information about NetBackup authorization, refer to "Enhanced Authorization and Authentication" in the NetBackup System Administrator's Guide or the NetBackup Media Manager System Administrators Guide. OPTIONS -rt robot_type Specifies the robot type of the robot to inventory. Valid robot types for NetBackup Enterprise Server follow: none, acs, odl, tl4, tl8, tld, tlh, tlm, tsh. Valid robot types for NetBackup Server follow: none, tl4, tl8, tld. -rn robot_number Unique, logical identification number of the robot to inventory. -rh robot_host Name of the host which controls the robot. If no host is specified, the host where you execute this command is assumed. -h EMM_server | volume_database_host This option is only applicable for NetBackup Enterprise Server. The name of the Enterprise Media Manager database host which contains information about the volumes in a robot. If no host is specified, the configured EMM server is used by default. For communicating with vmcheckxxx pre-NetBackup 6.0 systems not in the EMM domain, this is the EMM server. If no host is not specified, but a pre-NetBackup 6.0 robotic control host is specified on the -rh option, the robotic control host will be used as the EMM server. -if inventory_filter_value This option is only applicable for NetBackup Enterprise Server. Specifies inventory filter values. Multiple -if options may be specified. The inventory filter value is an ACS scratch pool ID, or a TLH volume category. The -if and -full options cannot be specified together. -full Specifies full inventory. The -full and -if options cannot be specified together. -list Lists the robot contents. NOTES Only limited validation of the option parameters is done. EXAMPLES The following command lists the media contents of TLD robot 1 and the volume configuration for that robot on the host named server2, along with a list of any mismatches that are detected: vmcheckxxx -rt tld -rn 1 -rh server2 The following command lists the contents of TLH robot 2 that is connected to the host where the vmcheckxxx command was executed: vmcheckxxx -rt tlh -rn 2 -list SEE ALSO vmupdate From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave CarlsonSent: Thursday, 27 April 2006 11:26 amTo: veritas-bu@mailman.eng.auburn.eduSubject: [Veritas-bu] how to get a list of tapes in the tape library anyone know the console command for getting a list of tapes that are currently in the library? thanks! Dave CarlsonAssociate Systems EngineeratlasPartner for Results206.816.8221 // direct206.850.8980 // cell[EMAIL PROTECTED] // emailwww.AtlasSolutions.com // web ** This electronic email and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. The views expressed in this message are those of the individual sender and may not necessarily reflect the views of the Christchurch City Council. If you are not the correct recipient of this email please advise the sender and delete. Christchurch City Council http://www.ccc.govt.nz **