Networker

Re: [Networker] Remove Volume Labels for Auto Media Mgmt

2008-09-17 17:15:09
Subject: Re: [Networker] Remove Volume Labels for Auto Media Mgmt
From: "Rutherford, Rodney" <RRutherford AT PEABODYENERGY DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Wed, 17 Sep 2008 16:13:04 -0500
> Can you explain how to do this in further detail?  I am not familiar with the 
> DD command.  Device file??

You don't indicate what platform you are on, but if it is a UNIX
platform, here is a simple shell script that I have previouly used
to blank any labels so they can then be used with auto-media management.

Copy/paste everything between the BEGIN/END lines to a file called
nsr_blank_label.sh then update the JUKE, TDEV, and SLOTS variables
to match your configs.  Then run with:

        /bin/sh nsr_blank_label.sh

Rodney

################## BEGIN SCRIPT #####################
#!/bin/sh
#
# This script will take volumes from the slots listed and
# blank the networker label, then re-inventory that volume.
# This will leave them as "new, blank" tapes, so that networker
# will make use of them with auto-media management as needed
# for each pool.
#
NSRPATH=/usr/sbin
JUKE='s01-tlu02'
TDEV='/dev/rmt/5cbn'
SLOTS='2 4 6 7 8 9 10'

#
# First make sure the drive is unloaded
#
echo ""
echo "Making sure drive $TDEV is unloaded..."
nsrjb -u -f $TDEV > /dev/null 2>&1

#
# Now blank the tape and re-inventory it
#
for slot in $SLOTS
do
  echo "Loading tape from slot ${slot}...(please be patient)."
  nsrjb -nl -S $slot -f $TDEV
  sleep 5
  echo "Destroying old label..."
  dd if=/dev/mem of=$TDEV bs=32768 count=2
  nsrjb -u -f $TDEV -S $slot -q
  sleep 5
  echo "Updating jukebox status..."
  nsrjb -I -j $JUKE -S $slot
  echo "Done."
  echo ""
done

exit 0
################## END SCRIPT #####################



-----------------------------------------
E-mail Disclaimer:
The information contained in this e-mail, and in any accompanying
documents, may constitute confidential and/or legally privileged
information.  The information is intended only for use by the
designated recipient.  If you are not the intended recipient (or
responsible for the delivery of the message to the intended
recipient), you are hereby notified that any dissemination, 
distribution, copying, or other use of, or taking of any action
in reliance on this e-mail is strictly prohibited.  If you have
received this email communication in error, please notify the
sender immediately and delete the message from your system.

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

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