Automatically assigning a tape to scratch pool once expired - Veritas Net Backup

This is a discussion on Automatically assigning a tape to scratch pool once expired - Veritas Net Backup ; Is there a *clean* way to have a tape re-assigned to the scratch pool after the tape has been expired and unassigned ? Right now this is a manual process and time consuming. Any suggestions would be appreciated. TIA...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Automatically assigning a tape to scratch pool once expired

  1. Automatically assigning a tape to scratch pool once expired


    Is there a *clean* way to have a tape re-assigned to the scratch pool
    after the tape has been expired and unassigned ? Right now this is
    a manual process and time consuming. Any suggestions would be
    appreciated.

    TIA

  2. Re: Automatically assigning a tape to scratch pool once expired

    I am told NO. This is a feature I want and have asked for as an
    enhancement. Guess it should be formalized to ever make it happen.


    Rocke Robertson wrote:
    >
    > Is there a *clean* way to have a tape re-assigned to the scratch pool
    > after the tape has been expired and unassigned ? Right now this is
    > a manual process and time consuming. Any suggestions would be
    > appreciated.
    >
    > TIA


    --
    _____________________
    Craig Danyi
    The Weather Channel http://www.weather.com
    Information Services
    Atlanta, GA 30339
    770-226-2502

  3. Re: Automatically assigning a tape to scratch pool once expired

    I have rarely seen a need to do so. If NBU sees it needs a tape for a pool,
    it pulls it from the scratch pool. I don't see many cases where the data in
    the given class/pool shrinks and frees up too much space later on. I hear
    this request often but have yet to have anyone give a valid requirement for
    NBU to do this. You could always write a script to take the output of
    available_media and move the tapes, though.

    James

    "Rocke Robertson" wrote in message
    news:3a8aa92b$1@hronntp01....
    >
    > Is there a *clean* way to have a tape re-assigned to the scratch pool
    > after the tape has been expired and unassigned ? Right now this is
    > a manual process and time consuming. Any suggestions would be
    > appreciated.
    >
    > TIA




  4. Re: Automatically assigning a tape to scratch pool once expired


    Hi !

    We use a couple of scripts to do this for us.

    They could do with some tidying, but ..........
    "If it ain't broke ............. !"

    I've copied them below, but if they are unreadable, give a mail at mark.davies@ememetering.co.uk
    and I'll send them back.

    Cheers,

    Mark
    #!/bin/ksh
    #
    # This script will take the list of tapes from the generated scratch tape
    # listing
    # /tmp/mjd_scratch_list
    # and change all the 'expired' tapes to the Scratch Pool.
    # This is because when the images on the tapes expire, the tapes remain
    # in the original pool and are not truly Scratch tapes.
    # This means that the tapes are only available to the original pool and
    # not any other pool.
    # NOTE: This script will ignore the tapes in the NetBackup pool as they
    # seem to permanently marked. ie. you cannot move them between pools, even
    # when they are free and the images on them have expired.
    #-------------------------------------------------------------------------
    # Amendment Log
    # =============
    # Date Version Name Comments
    #-------------------------------------------------------------------------
    # 16.02.00 1.0 Mark Davies Original Version.
    # 01.03.00 1.1 Mark Davies Using different script to generate
    # scratch_list as it was only looking at the
    # Scratch pool!
    # Also removed the grep -v NetBackup.
    # 26.07.00 1.2 Mark Davies Scratch Volume Pool has changed to no. 4
    # in Release 3.3. Also, added checking for
    # CSA tapes.
    # 29.11.00 1.3 Mark Davies Added 'grep -v priv' to for loop because
    # we have added UFS dumps to our schedule
    # which run outside of NetBackup and don't
    # allocate an 'assigned time' and are therefore
    # picked up and Scratched!
    #-------------------------------------------------------------------------
    # VARIABLES
    # ---------
    SCRATCH_LIST="/tmp/mjd_non_scratch_list"
    SCRATCH_DIR="/usr/openv/netbackup/script"
    VM_DIR="/usr/openv/volmgr/bin"
    LOGFILE="/tmp/scratch$PID.log"


    #-------------------------------------------------------------------------
    # Delete log files older than 10 days.
    # -----------------------------------
    find /tmp -mtime +10 -name "scratch*.log" -exec rm {} \;

    # Generate the report
    # -------------------
    $SCRATCH_DIR/non_scratch_list *** See below for this script

    # Obtain list of all tapes other than in the NetBackup pool - (v1.3 on next
    line)
    # ----------------------------------------------------------------------------------------------------
    *** grep -v priv = we have a pool called priv which we don't include
    *** CSA|G0 = our tape ranges
    *** grep -v NetBackup = the headers written for NetBackup tapes is different
    from all other tapes.
    (We have a different script to rewrite the headers, for this!)

    for i in `cat $SCRATCH_LIST |grep -v priv |egrep "CSA|G0" | grep -v NetBackup
    |awk '{print $2}'`
    do

    # Obtain the value in the 'assigned' field
    # ----------------------------------------
    TEMP=`$VM_DIR/vmquery -m $i |grep assigned |cut -c24-26`

    # Check to see if there is a value in this field or not
    # -----------------------------------------------------
    if [[ $TEMP != "---" ]]
    then
    echo "Tape <$i> has an Assigned date. Cannot change it to
    Scratch."
    # This means it is not a true scratch tape.
    else
    # Move the tape into the Scratch pool. (Pool No. 4)
    # -------------------------------------------------
    $VM_DIR/vmchange -p 4 -m $i

    echo "Tape <$i> has been changed to Scratch."

    fi
    done
    exit 0
    --------------------------------------------------------------------------------------------------------------------------------
    #!/bin/ksh
    # This script will obtain a list of scratch tapes.
    #------------------------------------------------------------------------------
    VM_DIR="/usr/openv/volmgr/bin"

    $VM_DIR/vmpool -listall -b|tail +3|sort +0 |while read pool bb cc dd ee ff
    do

    if [ "$pool" != Scratch ];then
    $VM_DIR/vmquery -pn $pool -bx|sort +1 -10|while read a b c d e f g h
    i j k l m n
    do
    if [ "$l" = "---" -a "$m" = "---" ];then
    echo "Media $a is Available Last mounted on = $j at $k Pool=$pool"
    fi
    done
    fi
    done|sort +1|awk 'BEGIN { print "\nTape Silo Scratch List\n"} {print}'>/tmp/mjd_non_scratch_list
    echo "Report produced into /tmp/mjd_non_scratch_list"

    --------------------------------------------------------------------------------------------------------------------------------
    "Rocke Robertson" wrote:
    >
    >Is there a *clean* way to have a tape re-assigned to the scratch pool
    >after the tape has been expired and unassigned ? Right now this is
    >a manual process and time consuming. Any suggestions would be
    >appreciated.
    >
    >TIA



+ Reply to Thread