Veritas-bu

[Veritas-bu] CLI vmupdate & vmquery mismatch

2002-09-24 17:09:33
Subject: [Veritas-bu] CLI vmupdate & vmquery mismatch
From: sgarrett-veritas-ug AT technomancer DOT com (Scott Garrett)
Date: Tue, 24 Sep 2002 17:09:33 -0400
The only thing I see that might be causing you a problem is that you are
specifying a robot host on the vmupdate, but not on the vmquery.  Do you only
have one server?  Is your default server the correct one?  Try adding a "-h
nbuh2" to your vmquery command.

Also, you will probably want to use the "-use_barcode_rules" option or you'll
have potential problems, especially with cleaning tapes (nothing like trying to
write data to a cleaning tape; we've all been there...)

This is a simple little script I use every day to resync my database, and it
works without problems (it does nothing you aren't doing, but makes it "pretty"
to someone who isn't comfortable with command lines).  It assumes that the robot
host is the same as you are logged on to:

###############################################################

# Netbackup path information

VM=/usr/openv/volmgr
VM_PATH=${VM}/bin

# Netbackup host and robot information

ROBOT_NUMBER=0
ROBOT_TYPE=tld

# Volume manager commands

VM_UPDATE=${VM_PATH}/vmupdate

##
## Program begins here
##

# Here we sync the robot with the volume database, just to be sure all is in 
sync.

echo "Syncing volume database with robot..."

${VM_UPDATE} -rt ${ROBOT_TYPE} -rn ${ROBOT_NUMBER} -use_barcode_rules

echo "Done."


Quoting JLaurie AT csu DOT org:

> I used the CLI vmupdate & vmquery commands and received the 
> following--note that vmquery still shows the contents of the robot before 
> swapping tapes. Am I missing something here? I can use vmadm to 
> "interactively" update the robot inventory but that won't help me script 
> it.
> Suggestions?
> 
> TLI, 
> Jim
> 
> vmupdate -rn 1 -rt tld -rh nbuh2
> Generating list of recommended changes ...
> 
> Proposed Change(s) to Update the Volume Configuration
> =====================================================
> Logically move media ID DF7985 (barcode DF7985) from slot 10 to standalone 
> residence.
> Logically move media ID AP4169 (barcode AP4169) from slot 1 to standalone 
> residence.
> Logically move media ID AZ9657 (barcode AZ9657) from slot 2 to standalone 
> residence.
> Logically move media ID AZ9748 (barcode AZ9748) from slot 3 to standalone 
> residence.
> Logically move media ID AZ9759 (barcode AZ9759) from slot 4 to standalone 
> residence.
> Logically move media ID AZ9245 (barcode AZ9245) from slot 7 to standalone 
> residence.
> Logically move media ID AZ9745 (barcode AZ9745) from slot 5 to standalone 
> residence.
> Logically move media ID AZ9733 (barcode AZ9733) from slot 6 to standalone 
> residence.
> Logically move media ID AZ9753 (barcode AZ9753) from slot 8 to standalone 
> residence.
> Logically move media ID AZ9251 (barcode AZ9251) from slot 9 to standalone 
> residence.
> Logically move media ID AP4169 (barcode AP4169) from standalone to slot 
> 10.
> Logically move media ID AZ9245 (barcode AZ9245) from standalone to slot 5.
> Logically add new media AZ9754 (barcode AZ9754) to robot slot 1.
> Logically add new media AZ9659 (barcode AZ9659) to robot slot 2.
> Logically add new media AZ9656 (barcode AZ9656) to robot slot 3.
> Logically add new media AZ9604 (barcode AZ9604) to robot slot 4.
> Logically add new media AP4165 (barcode AP4165) to robot slot 7.
> Logically add new media AZ9236 (barcode AZ9236) to robot slot 6.
> Logically add new media DF7971 (barcode DF7971) to robot slot 8.
> Logically add new media CC3332 (barcode CC3332) to robot slot 9.
> Updating volume configuration ...
> 
> Processing existing media removed from or moved within the robotic library 
> by
> logically moving media to standalone residence as follows...
>         Media ID        Slot
>         ========        ====
>          DF7985          10
>          AP4169           1
>          AZ9657           2
>          AZ9748           3
>          AZ9759           4
>          AZ9245           7
>          AZ9745           5
>          AZ9733           6
>          AZ9753           8
>          AZ9251           9
> 
> Processing existing media added to or moved within the robotic library by
> logically moving media as follows...
>         Media ID        Slot
>         ========        ====
>          AP4169          10
>          AZ9245           5
> 
> Processing new media added to the robotic library by logically
> adding media with new media IDs as follows...
>         Media ID        Slot
>         ========        ====
>          AZ9754           1
>          AZ9659           2
>          AZ9656           3
>          AZ9604           4
>          AP4165           7
>          AZ9236           6
>          DF7971           8
>          CC3332           9
> 
> 
> Volume configuration successfully updated.
> 
> # vmquery -b -rn 1
> media   media  robot  robot  robot  side/  optical  # mounts/      last
>  ID     type   type     #    slot   face   partner  cleanings    mount 
> time 
> -------------------------------------------------------------------------------
> AP4169  DLT    TLD      1      1     -       -           3     08/22/2002 
> 13:40
> AZ9657  DLT    TLD      1      2     -       -           3     09/23/2002 
> 23:41
> AZ9748  DLT    TLD      1      3     -       -           9     09/20/2002 
> 16:10
> AZ9759  DLT    TLD      1      4     -       -           2     09/20/2002 
> 19:13
> AZ9245  DLT    TLD      1      7     -       -           2     08/16/2002 
> 14:33
> AZ9745  DLT    TLD      1      5     -       -           2     09/20/2002 
> 21:13
> AZ9733  DLT    TLD      1      6     -       -           3     09/23/2002 
> 17:02
> AZ9753  DLT    TLD      1      8     -       -           2     09/23/2002 
> 17:42
> AZ9251  DLT    TLD      1      9     -       -           2     09/23/2002 
> 19:41
> DF7985  DLT    TLD      1     10     -       -           2     09/23/2002 
> 21:41
> 


-- 
        Scott Garrett     mailto:sgarrett AT technomancer DOT com
                                          http://www.technomancer.com

    *** No matter what you do, you'll never outsmart the squirrels.

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