Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing library volumes from command line

Status
Not open for further replies.

kareemah

MIS
Jan 11, 2001
5
US
Is there a way to remove library volumes from the command line.
 
yes,

nsrmm -d volumename

if you do not want to confirm

nsrmm -d -y volumename

this also works for multiple volumes (unfortunately no wildcars)

nsrmm -d -y vol1 vol2 etc

Riaan van Niekerk


UNIX sysadmin

Potchefstroom University

South Africa
 
I hope the question was "How do I delete a volume?" because that is what "nsrmm -d" does.

If your question was "How do I unload and withdraw a volume from a jukebox?" this might help.

If a volume you want to withdraw is loaded into a drive, first unload it:

nsrjb -u <volume> ...

Then withdraw the tape from the jukebox to the load port (CAP):

nsrjb -w <volume> ...

You can also do things like specify a slot instead of a volume name, or specify a port number in the CAP. Read the command referance for all the options.
 
In Legato version 6.1 there are two different places to remove volumes. One is library volumes the other is volumes which would delete the indexes. I don't want to delete the indexes.

I just want to be able to remove and add library volumes from the command line. In doing so I can create a script to label tapes. Everyone know's that Legato has no tape management. So far I have a script that utilizes the mminfo,nsrjb and the nsrmm command to unmount tapes, make them read only, mark them offsite and print out a report. I just can't figure out how to remove tapes out of library volumes...

Kareemah
 
Legato offers another product for Tape Management: AlphaStor
AlphaStor is going to replace SmartMedia and add a little extras. It has just one big disatvantage in my eyes. It is available solely for NT/Win2K as Server and not yet running on Unix platforms.
Until it is not available for at least one Unix platform we would not use it.

Johanes
 
I've found the same problem with Networker's tape management...It doesn't have any. I looked around for good scripts to do this, and I couldn't find any that worked they way I wanted them to. I also found this to be a problem with management tools like BOM. They assume a workflow and a way of doing things that may or may not be suited to each enviroment. So I started writting my own application to use in house.

I'm nearly done writting a full Perl Module that can handle these type of operations to help others write their own custom applications like I have.

If you're writting your script it perl, I may be able to help. Even though I'm not done with my module, I wouldn't mind giving out a few of the core procedures to help you along. Besides, I'm always on the lookout for beta testers...Send me an e-mail if you're interested.
 
This is a sample of the script that I'm working with. If you have any suggestions please let me know...

PRINTFILE=/tmp/`basename $0`.$$
hostname > ${PRINTFILE}
banner DAILY >> ${PRINTFILE}

echo &quot;CAP 1,0,0&quot; >> ${PRINTFILE}

echo &quot;PLEASE KEEP TAPES OFFSITE FOR 8 DAYS&quot; >> ${PRINTFILE}
echo &quot;The bkup date is `date`.&quot; >> ${PRINTFILE}

for i in ` mminfo -q 'pool=oracle daily,volaccess>15 hours ago,%used>0' -r volume
' `;do
echo $i >> ${PRINTFILE}
nsrjb -u $i
mmlocate -s usnbru24 -u -n $i 'OFFSITE'
nsrmm -s usnbru24 -o readonly -y $i
done


for t in ` mminfo -q 'pool=unix daily,volaccess>1 day ago,%used>0' -r volume
' `;do
echo $t >> ${PRINTFILE}
nsrjb -u $t
mmlocate -s usnbru24 -u -n $t 'OFFSITE'
nsrmm -s usnbru24 -o readonly -y $t
done

more ${PRINTFILE} >> tapetracker24
lp -dlp_misoper_hp2 ${PRINTFILE}
rm ${PRINTFILE}

 
I would recommend that you mark the volume as full rather that readonly. That way they'll recycle properly, and networker will stll not try to append to it.

The other thing I see. You unload the volume without checking first to see if it's loaded. That's OK because nsrjb will just ignore the command after it realizes that the volume is not loaded. It just takes time if you're unloading a lot of tapes.

The other problem with this script that you'll run into problems is withdrawing the tapes into your load port. If you simply run 'nsrjb -w $i' it will put the tape into port 1 of your load port. The problem is, every time you go through the loop it will try to put it into port 1.

The way around this is to specify the load port slot you want the tape withdrawn to (i.e. nsrjb -w -P $x $i). You just need to increment $x with each loop.

Doing this however, you will need to put in a provision to handle when the load port slots are full. A way that will pause for the operator, reset $x and continue.

One other thing to test: Is the tape currently being accessed? If so, you will have a hard time unmounting it. Causing nsrjb to wait until it can unmount the volume while blocking every other nsrjb operation behind it causing critical tape alerts until the blocking operation is finished.

Hope this helps.
 
Were currently using a software called ACSLS so there is no comunnication with LEGATO and the SILO without ACSLS. When the script runs it unmounts the tape in the silo. The tape is not put in the cap until the operator goes and enter the eject commands in ACSLS. Using ACSLS is not always a good thing because of the operator intervetion that's needed. They have to input every tape that needs to be removed every day in ACSLS. Does anyone no any work arounds to help me with this. Also if the tape is in use the nsrjb command goes to the next tape. It doesn't wait or cause and blocking .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top