Veritas-bu

[Veritas-bu] Using vmchange to eject tapes, v4.5 (currently without big patch set)

2002-11-02 11:59:02
Subject: [Veritas-bu] Using vmchange to eject tapes, v4.5 (currently without big patch set)
From: scott.kendall AT abbott DOT com (scott.kendall AT abbott DOT com)
Date: Sat, 2 Nov 2002 10:59:02 -0600
This is a multipart message in MIME format.
--=_alternative 005D7FF486256C65_=
Content-Type: text/plain; charset="us-ascii"

unfortunately, that's the way it works.  if you get the message to take 
out the tapes and click ok (or return if cli), and you click ok before 
taking out the tapes, it puts the tapes back into the robot and returns a 
message that the eject was aborted.  it's nice that they gave it a try, 
but i don't know what they were thinking when they put the logic in this.

I have found that ejecting multiple tapes, even with 4.5, is easier using 
a script...
- look at location in library with vmquery (in case it fails to eject, 
because it will still logically eject even with error)
- print " " | vmchange -res -e
- check for error codes and logically move back into library with vmchange 
if eject failed


- Scott





"Donaldson, Mark" <Mark.Donaldson AT experianems DOT com>
Sent by: veritas-bu-admin AT mailman.eng.auburn DOT edu
10/15/2002 03:15 PM

 
        To:     "Veritasbu (E-mail)" <veritas-bu AT mailman.eng.auburn DOT 
edu>, "NBU Advanced 
Script List (E-mail)" <nbu-lserv AT datastaff DOT com>
        cc: 
        Subject:        [Veritas-bu] Using vmchange to eject tapes, v4.5 
(currently without big 
patch set)


I've noticed one annoying behavior and one potential bug in using vmchange 
to eject tapes. 
1. A bug (?) where the volume database will be inconsistent with the tape 
locations if the tapes are not acutally removed from the mailslots when 
prompted.
2. An annoying "feature" where I can't seem to run this multi-eject 
command non-interactively - I want to leave the tapes in the mailslots 
while the command completes. 
I'd like comments and/or fixes to both.  Details follow... 
--------------- 
I've been doing this in v3.4 to eject tapes (which still works in v4.5): 
vmchange -res -m <tapenum> -mt dlt -e -sec 1 

This command seems to work in v4.5 but I've noticed that they've supplied 
a new multi-eject form, too.  Ideally, I'd like to stay with the 
documented command set.
        vmchange -res -multi_eject -w -verbose 
        -rn <robot_number> -rt <robot_type> -rh <robot_control_host> 
        -ml <media_id:media_id:...:media_id> 
I can use this to eject tapes - however, it wants me to complete the 
process by physically removing tapes from the mailslots when prompted 
while I want to leave them there (so I can go on to page the tape apes, 
etc. to fetch and carry).  If I hit <return> to complete the command 
(without removing tapes), the tapes are automatically replaced back into 
the library slots but the volume database remains incorrect, showing them 
as out-of-library.  If I interrupt the command while waiting at the "press 
return" prompt, then it does what I want except that I had to interact 
with it to achieve this.
[root]#vmchange -res -multi_eject -w -verbose -rn 0 -rt tld -ml 
CG0131:CG0132 
*** Eject volume batch #1 is ready to be removed *** 
        remove 2 volume(s) from media access port(s) of robot number 0 now 
        (press <RETURN> to continue)  <<<<< I hit return here without 
removing 
                                      <<<<< the tapes. Afterword tldtest 
shows 
                                      <<<<< them as back in the main 
library slots 
Slot# MediaID Barcode     MAP_Element#  Batch  Status 
  124 CG0131  UNKNOWN                1      1  Eject aborted. 
   66 CG0132  UNKNOWN                2      1  Eject aborted. 

tldtest shows them as not in the mailslots but returned back into the 
library slots: 
[root] #echo "s i" | tldtest -r /dev/sg/c1t3l0 
Opening /dev/sg/c1t3l0 
Enter tld commands (? returns help information) 
Address 10, import_enabled = 1, export_enabled = 1, access = 1 
  except = 0, import_export = 0, full = 0 
Address 11, import_enabled = 1, export_enabled = 1, access = 1 
<snip> 
[root] #echo "s s" | tldtest -r /dev/sg/c1t3l0 
Opening /dev/sg/c1t3l0 
Enter tld commands (? returns help information) 
<snip> 
slot 32 (addr 1031) contains Cartridge = yes 
Source address = 10 
Barcode = CG0131 
<snip> 
slot 66 (addr 1065) contains Cartridge = yes 
Source address = 11 
Barcode = CG0132 
<snip> 

Now I checkout the volume database and it shows them incorrectly as out of 
library (field 9 is slot num): 
[root] #vmquery -a -w | grep CG013[12] | awk '{print $1,$9}' 
CG0131 - 
CG0132 - 

Update the inventory to make them appear again: 
[root] #/usr/openv/local/update_inventory    <<<<< wrapper around 
"vmupdate" 
## Please wait... 
##   Updating robot 0. 
## Done. 
[root] #vmquery -a -w | grep CG013[12] | awk '{print $1,$9}' 
CG0131 32 
CG0132 66 

If I interrupt the vmchange command in mid-eject, right when it says 
"press return", then it'll leave the tapes in the mailslots.
[root] #vmchange -res -w -multi_eject -verbose -rn 0 -rt tld -rh europa 
-ml CG0131:CG0132 
*** Eject volume batch #1 is ready to be removed *** 
        remove 2 volume(s) from media access port(s) of robot number 0 now 
        (press <RETURN> to continue)^C 
[root] # 

The library agrees that the tapes are in the mailslots (visually 
confirmed, too) 
[root] #echo "s i" | tldtest -r /dev/sg/c1t3l0 
Opening /dev/sg/c1t3l0 
Enter tld commands (? returns help information) 
Address 10, import_enabled = 1, export_enabled = 1, access = 1 
  except = 0, import_export = 0, full = 1 
  Source address = 1031 
  Barcode = CG0131 
Address 11, import_enabled = 1, export_enabled = 1, access = 1 
  except = 0, import_export = 0, full = 1 
  Source address = 1065 
  Barcode = CG0132 
<snip> 

Volume database is correct: 
[root] #vmquery -a -w | grep CG013[12] | awk '{print $1,$9}' 
CG0131 - 
CG0132 - 

What I want is this second behavior - ejected tapes, correct volDB, etc. 
to occur non-interactively, without having to hit break at the command 
line.  Is this just a Veritas ploy to get us to purchase Vault?
-Mark 
Solaris 8, NB v4.5.0 (no jumbo patch), STK-L700E library without ACSLS. 
X-posted to Veritas-bu & NBU-Advanced script list 


--=_alternative 005D7FF486256C65_=
Content-Type: text/html; charset="us-ascii"


<br><font size=2 face="Arial">unfortunately, that's the way it works. &nbsp;if 
you get the message to take out the tapes and click ok (or return if cli), and 
you click ok before taking out the tapes, it puts the tapes back into the robot 
and returns a message that the eject was aborted. &nbsp;it's nice that they 
gave it a try, but i don't know what they were thinking when they put the logic 
in this.</font>
<br>
<br><font size=2 face="Arial">I have found that ejecting multiple tapes, even 
with 4.5, is easier using a script...</font>
<br><font size=2 face="Arial">- look at location in library with vmquery (in 
case it fails to eject, because it will still logically eject even with 
error)</font>
<br><font size=2 face="Arial">- print &quot; &quot; | vmchange -res -e</font>
<br><font size=2 face="Arial">- check for error codes and logically move back 
into library with vmchange if eject failed</font>
<br>
<br>
<br><font size=2 face="Arial">- Scott</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>&quot;Donaldson, Mark&quot; 
&lt;Mark.Donaldson AT experianems DOT com&gt;</b></font>
<br><font size=1 face="sans-serif">Sent by: veritas-bu-admin AT 
mailman.eng.auburn DOT edu</font>
<p><font size=1 face="sans-serif">10/15/2002 03:15 PM</font>
<br>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; 
&nbsp; &nbsp; &nbsp;&quot;Veritasbu (E-mail)&quot; &lt;veritas-bu AT 
mailman.eng.auburn DOT edu&gt;, &quot;NBU Advanced Script List (E-mail)&quot; 
&lt;nbu-lserv AT datastaff DOT com&gt;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbsp; 
&nbsp; &nbsp; &nbsp;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject: &nbsp; 
&nbsp; &nbsp; &nbsp;[Veritas-bu] Using vmchange to eject tapes, v4.5 (currently 
without big patch set)</font></table>
<br>
<br>
<br><font size=2 face="Times New Roman">I've noticed one annoying behavior and 
one potential bug in using vmchange to eject tapes. </font>
<p><font size=2 face="Times New Roman">1. A bug (?) where the volume database 
will be inconsistent with the tape locations if the tapes are not acutally 
removed from the mailslots when prompted.</font>
<p><font size=2 face="Times New Roman">2. An annoying &quot;feature&quot; where 
I can't seem to run this multi-eject command non-interactively - I want to 
leave the tapes in the mailslots while the command completes. </font>
<p><font size=2 face="Times New Roman">I'd like comments and/or fixes to both. 
&nbsp;Details follow...</font><font size=3 face="Times New Roman"> </font>
<p><font size=2 face="Times New Roman">---------------</font><font size=3 
face="Times New Roman"> </font>
<p><font size=2 face="Times New Roman">I've been doing this in v3.4 to eject 
tapes (which still works in v4.5):</font><font size=3 face="Times New Roman"> 
</font>
<p><font size=2 face="Times New Roman">vmchange -res -m &lt;tapenum&gt; -mt dlt 
-e -sec 1</font><font size=3 face="Times New Roman"> </font>
<p>
<p><font size=2 face="Times New Roman">This command seems to work in v4.5 but 
I've noticed that they've supplied a new multi-eject form, too. &nbsp;Ideally, 
I'd like to stay with the documented command set.</font>
<p><font size=2 face="Times New Roman">&nbsp; &nbsp; &nbsp; &nbsp; vmchange 
-res -multi_eject -w -verbose</font><font size=3 face="Times New Roman"> 
</font><font size=2 face="Times New Roman"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;-rn &lt;robot_number&gt; -rt &lt;robot_type&gt; -rh 
&lt;robot_control_host&gt;</font><font size=3 face="Times New Roman"> 
</font><font size=2 face="Times New Roman"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;-ml 
&lt;media_id:media_id:...:media_id&gt;</font><font size=3 face="Times New 
Roman"> </font>
<p><font size=2 face="Times New Roman">I can use this to eject tapes - however, 
it wants me to complete the process by physically removing tapes from the 
mailslots when prompted while I want to leave them there (so I can go on to 
page the tape apes, etc. to fetch and carry). &nbsp;If I hit &lt;return&gt; to 
complete the command (without removing tapes), the tapes are automatically 
replaced back into the library slots but the volume database remains incorrect, 
showing them as out-of-library. &nbsp;If I interrupt the command while waiting 
at the &quot;press return&quot; prompt, then it does what I want except that I 
had to interact with it to achieve this.</font>
<p><font size=2 face="Times New Roman">[root]#vmchange -res -multi_eject -w 
-verbose -rn 0 -rt tld -ml CG0131:CG0132</font><font size=3 face="Times New 
Roman"> </font><font size=2 face="Times New Roman"><br>
*** Eject volume batch #1 is ready to be removed ***</font><font size=3 
face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;remove 2 volume(s) from media access port(s) of 
robot number 0 now</font><font size=3 face="Times New Roman"> </font><font 
size=2 face="Times New Roman"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;(press &lt;RETURN&gt; to continue) 
&nbsp;&lt;&lt;&lt;&lt;&lt; I hit return here without removing</font><font 
size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;&lt;&lt;&lt;&lt; the 
tapes. Afterword tldtest shows</font><font size=3 face="Times New Roman"> 
</font><font size=2 face="Times New Roman"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;&lt;&lt;&lt;&lt; 
them as back in the main library slots</font><font size=3 face="Times New 
Roman"> </font>
<p><font size=2 face="Times New Roman">Slot# MediaID Barcode &nbsp; &nbsp; 
MAP_Element# &nbsp;Batch &nbsp;Status</font><font size=3 face="Times New 
Roman"> </font><font size=2 face="Times New Roman"><br>
 &nbsp;124 CG0131 &nbsp;UNKNOWN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp;1 &nbsp; &nbsp; &nbsp;1 &nbsp;Eject aborted.</font><font size=3 
face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
 &nbsp; 66 CG0132 &nbsp;UNKNOWN &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp;2 &nbsp; &nbsp; &nbsp;1 &nbsp;Eject aborted.</font><font size=3 
face="Times New Roman"> </font>
<p>
<p><font size=2 face="Times New Roman">tldtest shows them as not in the 
mailslots but returned back into the library slots:</font><font size=3 
face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
[root] #echo &quot;s i&quot; | tldtest -r /dev/sg/c1t3l0</font><font size=3 
face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
Opening /dev/sg/c1t3l0</font><font size=3 face="Times New Roman"> </font><font 
size=2 face="Times New Roman"><br>
Enter tld commands (? returns help information)</font><font size=3 face="Times 
New Roman"> </font><font size=2 face="Times New Roman"><br>
Address 10, import_enabled = 1, export_enabled = 1, access = 1</font><font 
size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
 &nbsp;except = 0, import_export = 0, full = 0</font><font size=3 face="Times 
New Roman"> </font><font size=2 face="Times New Roman"><br>
Address 11, import_enabled = 1, export_enabled = 1, access = 1</font><font 
size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
&lt;snip&gt;</font><font size=3 face="Times New Roman"> </font>
<p><font size=2 face="Times New Roman">[root] #echo &quot;s s&quot; | tldtest 
-r /dev/sg/c1t3l0</font><font size=3 face="Times New Roman"> </font><font 
size=2 face="Times New Roman"><br>
Opening /dev/sg/c1t3l0</font><font size=3 face="Times New Roman"> </font><font 
size=2 face="Times New Roman"><br>
Enter tld commands (? returns help information)</font><font size=3 face="Times 
New Roman"> </font><font size=2 face="Times New Roman"><br>
&lt;snip&gt;</font><font size=3 face="Times New Roman"> </font><font size=2 
face="Times New Roman"><br>
slot 32 (addr 1031) contains Cartridge = yes</font><font size=3 face="Times New 
Roman"> </font><font size=2 face="Times New Roman"><br>
Source address = 10</font><font size=3 face="Times New Roman"> </font><font 
size=2 face="Times New Roman"><br>
Barcode = CG0131</font><font size=3 face="Times New Roman"> </font><font size=2 
face="Times New Roman"><br>
&lt;snip&gt;</font><font size=3 face="Times New Roman"> </font><font size=2 
face="Times New Roman"><br>
slot 66 (addr 1065) contains Cartridge = yes</font><font size=3 face="Times New 
Roman"> </font><font size=2 face="Times New Roman"><br>
Source address = 11</font><font size=3 face="Times New Roman"> </font><font 
size=2 face="Times New Roman"><br>
Barcode = CG0132</font><font size=3 face="Times New Roman"> </font><font size=2 
face="Times New Roman"><br>
&lt;snip&gt;</font><font size=3 face="Times New Roman"> </font>
<p>
<p><font size=2 face="Times New Roman">Now I checkout the volume database and 
it shows them incorrectly as out of library (field 9 is slot num):</font><font 
size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
[root] #vmquery -a -w | grep CG013[12] | awk '{print $1,$9}'</font><font size=3 
face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
CG0131 -</font><font size=3 face="Times New Roman"> </font><font size=2 
face="Times New Roman"><br>
CG0132 -</font><font size=3 face="Times New Roman"> </font>
<p>
<p><font size=2 face="Times New Roman">Update the inventory to make them appear 
again:</font><font size=3 face="Times New Roman"> </font><font size=2 
face="Times New Roman"><br>
[root] #/usr/openv/local/update_inventory &nbsp; &nbsp;&lt;&lt;&lt;&lt;&lt; 
wrapper around &quot;vmupdate&quot;</font><font size=3 face="Times New Roman"> 
</font><font size=2 face="Times New Roman"><br>
## Please wait...</font><font size=3 face="Times New Roman"> </font><font 
size=2 face="Times New Roman"><br>
## &nbsp; Updating robot 0.</font><font size=3 face="Times New Roman"> 
</font><font size=2 face="Times New Roman"><br>
## Done.</font><font size=3 face="Times New Roman"> </font><font size=2 
face="Times New Roman"><br>
[root] #vmquery -a -w | grep CG013[12] | awk '{print $1,$9}'</font><font size=3 
face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
CG0131 32</font><font size=3 face="Times New Roman"> </font><font size=2 
face="Times New Roman"><br>
CG0132 66</font><font size=3 face="Times New Roman"> </font>
<p>
<p><font size=2 face="Times New Roman">If I interrupt the vmchange command in 
mid-eject, right when it says &quot;press return&quot;, then it'll leave the 
tapes in the mailslots.</font>
<p><font size=2 face="Times New Roman">[root] #vmchange -res -w -multi_eject 
-verbose -rn 0 -rt tld -rh europa -ml CG0131:CG0132</font><font size=3 
face="Times New Roman"> </font>
<p><font size=2 face="Times New Roman">*** Eject volume batch #1 is ready to be 
removed ***</font><font size=3 face="Times New Roman"> </font><font size=2 
face="Times New Roman"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;remove 2 volume(s) from media access port(s) of 
robot number 0 now</font><font size=3 face="Times New Roman"> </font><font 
size=2 face="Times New Roman"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;(press &lt;RETURN&gt; to continue)^C</font><font 
size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
[root] #</font><font size=3 face="Times New Roman"> </font>
<p>
<p><font size=2 face="Times New Roman">The library agrees that the tapes are in 
the mailslots (visually confirmed, too)</font><font size=3 face="Times New 
Roman"> </font><font size=2 face="Times New Roman"><br>
[root] #echo &quot;s i&quot; | tldtest -r /dev/sg/c1t3l0</font><font size=3 
face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
Opening /dev/sg/c1t3l0</font><font size=3 face="Times New Roman"> </font><font 
size=2 face="Times New Roman"><br>
Enter tld commands (? returns help information)</font><font size=3 face="Times 
New Roman"> </font><font size=2 face="Times New Roman"><br>
Address 10, import_enabled = 1, export_enabled = 1, access = 1</font><font 
size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
 &nbsp;except = 0, import_export = 0, full = 1</font><font size=3 face="Times 
New Roman"> </font><font size=2 face="Times New Roman"><br>
 &nbsp;Source address = 1031</font><font size=3 face="Times New Roman"> 
</font><font size=2 face="Times New Roman"><br>
 &nbsp;Barcode = CG0131</font><font size=3 face="Times New Roman"> </font><font 
size=2 face="Times New Roman"><br>
Address 11, import_enabled = 1, export_enabled = 1, access = 1</font><font 
size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
 &nbsp;except = 0, import_export = 0, full = 1</font><font size=3 face="Times 
New Roman"> </font><font size=2 face="Times New Roman"><br>
 &nbsp;Source address = 1065</font><font size=3 face="Times New Roman"> 
</font><font size=2 face="Times New Roman"><br>
 &nbsp;Barcode = CG0132</font><font size=3 face="Times New Roman"> </font><font 
size=2 face="Times New Roman"><br>
&lt;snip&gt;</font><font size=3 face="Times New Roman"> </font>
<p>
<p><font size=2 face="Times New Roman">Volume database is correct:</font><font 
size=3 face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
[root] #vmquery -a -w | grep CG013[12] | awk '{print $1,$9}'</font><font size=3 
face="Times New Roman"> </font><font size=2 face="Times New Roman"><br>
CG0131 -</font><font size=3 face="Times New Roman"> </font><font size=2 
face="Times New Roman"><br>
CG0132 -</font><font size=3 face="Times New Roman"> </font>
<p>
<p><font size=2 face="Times New Roman">What I want is this second behavior - 
ejected tapes, correct volDB, etc. to occur non-interactively, without having 
to hit break at the command line. &nbsp;Is this just a Veritas ploy to get us 
to purchase Vault?</font>
<p><font size=2 face="Times New Roman">-Mark</font><font size=3 face="Times New 
Roman"> </font>
<p><font size=2 face="Times New Roman">Solaris 8, NB v4.5.0 (no jumbo patch), 
STK-L700E library without ACSLS.</font><font size=3 face="Times New Roman"> 
</font>
<p><font size=2 face="Times New Roman">X-posted to Veritas-bu &amp; 
NBU-Advanced script list</font><font size=3 face="Times New Roman"> </font>
<p>
<p>
--=_alternative 005D7FF486256C65_=--

<Prev in Thread] Current Thread [Next in Thread>
  • [Veritas-bu] Using vmchange to eject tapes, v4.5 (currently without big patch set), scott.kendall AT abbott DOT com <=