cancel
Showing results for 
Search instead for 
Did you mean: 

Hello there!   Does anyone know how I can eject unassigne...

Jas
Level 3
Hello there!
 
Does anyone know how I can eject unassigned media from a particular volume pool using a command line?
 
I'm running Netbackup 6 MP4 Enterprise on Windows 2003.
We're also using Vault option.
 
Thanks
 
Jas.
9 REPLIES 9

Stumpr2
Level 6
check out the man page for vmchange. It used to do this in earlier versions of NetBackup.
 
 

Stumpr2
Level 6
     vmchange(1M)              (27 May 2005)              vmchange(1M)
     NAME
          vmchange - change media information in the Enterprise Media
          Manager database
     SYNOPSIS
          Associate this volume with a different pool
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -p pool_number -m media_id

Jas
Level 3
Hello,
 
Thanks for the reply.
This is half-way to what I want.
What I'd like to do is have a script to automatically eject unassigned media from a particular pool without me having to enter the mediaids.
 
Any ideas on this one?
 
Thanks.

Stumpr2
Level 6
yes, you can use the same command but with different options.
There is a limit on the number of characters in a single reply, so I will segment the man pages into 3 sections.
 
 


Message Edited by Bob Stump on 09-06-2007 01:14 PM

Stumpr2
Level 6
     vmchange(1M)              (27 May 2005)              vmchange(1M)
     NAME
          vmchange - change media information in the Enterprise Media
          Manager database
     SYNOPSIS
          Change volume group residence
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -vg_res -rt robot_type -rn
               robot_number -rh robot_control_host -v volume_group
          Change volume residence
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -res -m media_id -mt media_type
               -rt robot_type -rn robot_number -rh robot_control_host
               -v volume_group -rc1 rob_slot [-rc2 rob_side]
          Change volume expiration date
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -exp date -m media_id
          Change the barcode for a volume
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -barcode barcode -m media_id [-rt
               robot_type]
          Change the container ID for a volume by media ID
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -m media_id -vltcid
               vault_container_id
          Change the container ID for a volume by bar code
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -barcode barcode -vltcid
               vault_container_id
          Change the media description for a volume
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -d "media_description" -m
               media_id
          Associate this volume with a different pool
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -p pool_number -m media_id
     Page 1                                           (printed 9/6/07)
     vmchange(1M)              (27 May 2005)              vmchange(1M)
          Change a volume's maximum mount count
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -maxmounts max_mounts -m media_id
          Change a volume's number of cleanings
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -clean cleanings left -m media_id
          Change a volume's number of mounts count
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -n num_mounts -m media_id
          Change a volume's media type
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -new_mt media_type -m media_id
          Change a volume's robot type
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -new_rt robot_type -m media_id
               -rn robot_number
          Change a volume's group
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -new_v volume_group [-m media_id
               |{-b barcode -mt media_type -rt robot_type}]
          Change a volume's vault name
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -vltname vault_name -m media_id
          Change the date the volume was sent to the vault
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -vltsent date -m media_id
          Change the date when the volume returns from the vault
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -vltreturn date -m media_id
          Change a volume's vault slot number
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -vltslot vault_slot -m media_id
     Page 2                                           (printed 9/6/07)
     vmchange(1M)              (27 May 2005)              vmchange(1M)
          Change the volume's vault session id
          /usr/openv/volmgr/bin/vmchange [-h EMM_server |
               volume_database_host] -vltsession vault_session_id -m
               media_id
          Move (eject) volumes from an ACS, TLH, or TLM robot to
          standalone
          /usr/openv/volmgr/bin/vmchange -api_eject -map
               map_id:mapid:...:mapid | any -w [-h EMM_server |
               volume_database_host] -res -ml media_id:media_id:
               ...:media_id -rt robot_type -rn robot_number -rh
               robot_control_host [-v volume_group]
          Move (eject) multiple volumes from a TL8 or TLD robot to
          standalone
          /usr/openv/volmgr/bin/vmchange -multi_eject -w [-h
               EMM_server | volume_database_host] -res -ml
               media_id:media_id: ...:media_id -rt robot_type -verbose
               -rn robot_number -rh robot_control_host
          Move (inject) multiple volumes into a TL8 or TLD robot
          /usr/openv/volmgr/bin/vmchange -multi_inject -w -res -rt
               robot_type -verbose -rn robot_number -rh
               robot_control_host
          Get robot information for a TL8 or TLD robot type
          /usr/openv/volmgr/bin/vmchange -res -robot_info -verbose -rn
               robot_number -rt robot_type -rh robot_control_host
     DESCRIPTION
          Change volume information in the Enterprise Media Manager
          database.
          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 Administrator's Guide.
     OPTIONS
          -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 volumes.. If
                    no host is specified, the configured EMM server is
     Page 3                                           (printed 9/6/07)
     vmchange(1M)              (27 May 2005)              vmchange(1M)
                    used by default.  For communicating with pre-6.0
                    systems not in the EMM domain, this is the EMM
                    server.
          -vg_res   Change volume group residence.
          -rt robot_type
                    Specifies the robot type of the robot where the
                    volume is located.
                    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 for the
                    robot where the volume is located.
          -rh robot_control_host
                    Name of the host which controls the robot, where
                    the volume is located.
          -v volume_group
                    A volume group is a logical grouping that
                    identifies a set of volumes that reside at the
                    same physical location.
          -res      Change the volume's residence.
          -m media_id
                    Specifies the media ID of the volume to change.
          -mt media_type
                    Specifies the media type of the volume to change.
                    Valid media types for NetBackup Enterprise Server
                    follow:
                    4mm, 8mm, 8mm2, 8mm3, dlt, dlt2, dlt3, dtf, hcart,
                    hcart2, hcart3, odiskwm, odiskwo, qcart,
                    4mm_clean, 8mm_clean, 8mm2_clean, 8mm3_clean,
                    dlt_clean, dlt2_clean, dlt3_clean, dtf_clean,
                    hcart_clean, hcart2_clean, hcart3_clean.
                    Valid media types for NetBackup Server follow:
                    4mm, 8mm, dlt, hcart, qcart, 4mm_clean, 8mm_clean,
     Page 4                                           (printed 9/6/07)

Stumpr2
Level 6

     vmchange(1M)              (27 May 2005)              vmchange(1M)
                    dlt_clean, hcart_clean.
          -rc1 rob_slot
                    Robot coordinate 1 is the slot number in the robot
                    where the volume is located.
                    The following applies only to NetBackup Enterprise
                    Server:
                    Do not enter slot information for API robot types.
                    The robot software tracks the slot locations for
                    these robots.
          -rc2 rob_side
                    This option is only applicable for NetBackup
                    Enterprise Server.
                    Robot coordinate 2 is the platter side for optical
                    disks (A or B).
          -exp date Expiration date for this volume.
                    The format of date depends on the user's locale
                    setting.  See the NOTES section for more
                    information. For the C locale, the date syntax is
                    as follows:
                    mm/dd/yyyy [hh[:mm[:ss]]]
          -barcode barcode
                    Specifies the barcode attached to the volume.
          -d "media_description"
                    Media description for the volume. The double quote
                    marks are required if the description contains any
                    spaces.
          -p pool_number
                    Index of the volume pool which will contain this
                    volume. You can get the pool index using vmpool
                    -listall.
          -maxmounts max_mounts
                    Maximum number of mounts allowed for this volume.
                    Only used for non-cleaning media.
          -n num_mounts
                    For non-cleaning media, num_mounts is the number
                    of times this volume has been mounted.
          -clean cleanings left
                    For cleaning media, cleanings left is the number
     Page 5                                           (printed 9/6/07)
     vmchange(1M)              (27 May 2005)              vmchange(1M)
                    of cleanings left for this cleaning tape.
          -new_mt media_type
                    Specifies the media type of the volume to change.
                    See the -mt option for a list of media types.
          -new_rt robot_type
                    Specifies the robot type. See the -rt option for a
                    list of robot types.
          -new_v volume_group
                    A volume group is a logical grouping that
                    identifies a set of volumes that reside at the
                    same physical location.
          -b barcode
                    Specifies the barcode attached to the volume.
          -vltcid vault_container_id
                    Change the container in which a volume is stored.
                    vault_container_id (a string of up to 29
                    alphanumeric characters) specifies the new
                    container for the volume. Use the -m or -barcode
                    option to specify the volume.
          -vltname vault_name
                    Specifies the name of the logical vault configured
                    for the robot that ejected the volume.
          -vltsent date
                    Specifies the date the volume was sent offsite.
                    The format of date depends on the user's locale
                    setting.  See the NOTES section for more
                    information. For the C locale, the date syntax is
                    as follows:
                    mm/dd/yyyy [hh[:mm[:ss]]]
          -vltreturn date
                    Specifies the date the volume was requested for
                    return from the vault vendor.  For catalog backup
                    volumes, this is the date that the volume will be
                    requested for return from the vault vendor.
                    The format of date depends on the user's locale
                    setting.  See the NOTES section for more
                    information. For the C locale, the date syntax is
                    as follows:
                    mm/dd/yyyy [hh[:mm[:ss]]]
     Page 6                                           (printed 9/6/07)
     vmchange(1M)              (27 May 2005)              vmchange(1M)
          -vltslot vault_slot
                    Specifies the vault vendor's slot number for the
                    slot that this volume occupies.
          -vltsession vault_session_id
                    Specifies the id of the vault session that ejected
                    this media.
          -api_eject
                    Eject ACS, TLH, or TLM volumes from the specified
                    robot. For ACS and TLM robots, the ejection
                    timeoout period is one week. For TLH robots, the
                    robot allows an unlimited period to remove media.
          -map map_id:mapid: ...:mapid | any
                    For ACS robots, this option can specify multiple
                    media access ports (MAPs) to use for eject
                    operations. The map_id (also known as the CAP ID)
                    can be all or ALL, which specifies all MAPs in the
                    robot, or a colon separated list of MAP IDs in the
                    format of ACS,LSM,CAP. When the -map option is
                    used, media are ejected to the MAPs specified
                    using a nearest MAP algorithm. The algorithm
                    assumes that the LSMs are connected in a line; if
                    your LSMs are connected in a configuration other
                    than a line, see Adjacent LSM Specification for
                    ACS Robots and Media Access Port Default for ACS
                    Robots in the NetBackup Media Manager System
                    Administrator's Guide.
                    For TLM robots, use map_id "ANY" to eject to the
                    MAP configured for each media type on the DAS/SDLC
                    server.
                    For TLH robots, select the "standard" MAP or the
                    "BULK" MAP, depending on the library's hardware
                    configuration.
          -w        Wait flag. This flag must be used with the eject,
                    multiple eject, and multiple inject commands.
          -verbose  Selects verbose mode.
          -ml media_id:media_id: ...:media_id
                    Specifies a list of media to be ejected from the
                    robot.
          -multi_eject
                    This option is valid only for TL8 and TLD robot
                    types. Use the robotic library's media access port
                    to eject multiple volumes. The ejection timeout
                    period is 30 minutes.
     Page 7                                           (printed 9/6/07)
 

Stumpr2
Level 6
     vmchange(1M)              (27 May 2005)              vmchange(1M)
          -multi_inject
                    This option is valid only for TL8 and TLD robot
                    types. Used the robotic library's media access
                    port to inject multiple volumes.
          -robot_info
                    Used to retrieve information about a robotic
                    library. This option is valid only for TLD and TL8
                    robot types
     CautionS
          Some robotic libraries implement different functionality for
          their media access ports. For example, some libraries have
          front-panel inject and eject features that conflict with
          NetBackup's use of the media access port (for example,
          Spectra Logic Bullfrog). Other libraries require front-panel
          interaction when using the media access port (for example,
          Spectra Logic Gator).
          If you are using an eject option and the media is not
          removed and a time-out condition occurs, the media is
          returned to (injected into) the robot. If this occurs, you
          should inventory the robot and then eject the media that was
          returned to the robot.
          Make sure you read the operator manual for your robotic
          library to gain an understanding of its media access port
          functionality. Libraries such as the ones noted may not be
          fully compatible with NetBackup's inject and eject features
          if not properly handled. Other libraries may not be
          compatible at all. In addition, VERITAS performs limited
          validation of these option parameters.
     EXAMPLES
          Example 1
          The following command changes the expiration date of volume
          AJS100:
          vmchange -exp 12/31/99 23:59:59 -m AJS100
          Example 2
          The following command changes the pool (which contains
          volume AJS999) to pool 1 (which is the NetBackup pool):
          vmchange -p 1 -m AJS999
          Example 3
          The following command ejects volumes abc123 and abc124 from
          ACS robot number 700. The residences for these two volumes
     Page 8                                           (printed 9/6/07)
     vmchange(1M)              (27 May 2005)              vmchange(1M)
          are changed to standalone.
          vmchange -res -api_eject -w -ml abc123:abc124 -rt acs -rn
          700 -rh verbena -map 0,0,0
          Example 4
          The following command changes the container ID of volume
          ABC123:
          vmchange -vltcid Container001 -m ABC123
     notes
          The format that you use for date and time option values
          varies according to your locale setting. The examples in
          this command description are for a locale setting of C.
          For more information on locale, see the locale(1) man page
          for your system.
     SEE ALSO
          vmadd(1M), vmdelete(1M), vmpool(1M), vmquery(1M)
     COPYRIGHT
          Copyright (c) 2002-2005 VERITAS Software Corporation. All
          rights reserved.
     Page 9                                           (printed 9/6/07)

Jas
Level 3
Sorry, I'm probably being stupid here, but...
 
if I have 10 tapes in a media pool in a robot
5 are assigned
5 are unassigned
 
I want to eject just the unassigned ones
 
I don't know what the media ids are
 
What command do I use here (vmchange seems to rely on you knowing the media ids beforehand?)
 
I want to be able to run the same command each day to just eject unassigned media
 
Any ideas?
 
Thanks

Stumpr2
Level 6
There is a manual available via download from symantec website that contains the man pages for most all of the NetBackup commands. I suggest you download it and check out the man page for "vmquery". Use that command to build the list and then use vmchange to eject tapes from that list.