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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fast way to empty LTO library ??

Status
Not open for further replies.

itr0754

Technical User
Dec 17, 2002
58
PR
I have TSM 5.1 with an LTO 3583 library (60-cartridge capacity). I want to empty out the library completely. Is there a way to do this without having to "checkout" every cartridge one at a time ?? Obviously, I can open the LTO door and pull out the carts but I'm not sure if doing it this way will have a negative impact.
 
just write a small script to checkout all vols with remove=no, then manually open the lib up and remove...

To put back... checkin se=yes status=private (so they dont go in as scratch - doubt they would but)

then Audit lib to get your scratches back (make sure no vols mounted in a drive)
 
Here's a perl script I would use:
q libvol to get a list of vols, then:
Code:
#!/usr/bin/perl -w

foreach ( <DATA> ) {
        chomp ($_);
        system ("dsmadmc -se=server -id=user -pa=pass checkout libvol lib  $_ remove=no checklabel=no");
}

__DATA__
vol1
vol2  <====Paste list here under __DATA__
etc...
You could code in the retrieval of the list - I didn't have time
 
Out of curiosity, what would happen if I just pulled out the carts without checking them out and then reinserted in different slots ??
 
I suppose that could work...

then you just run an audit.

Worst case scenario if things don't add up, you checkout remove=no then checkin se=yes
 
Hi folks

Sorry to take up an opposing view, but ...

If you perform a full-library checkin with

checkin libv $libname search=yes checkl=barc stat=pri

then you will lose all your scratch tapes.

The procedure to follow is this:

1. audit libr $libname checkl=barc
2. checkin libv $libname search=yes stat=scr checkl=barc
3. checkin libv $libname search=yes stat=pri checkl=barc

Rationale:

1. "AUDIT LIBR" is *only* capable of verifying existing entries in the library volumes table. It will not create any additional entries, or update any existing ones. For each entry in the table, the command will either do nothing, because the physical contents of the slot matches the entry in the table, or it will delete the entry from the table because the physical content that was expected could not be found.

2. "CHECKIN LIBV" -> any volume that is not a database backup of some sort can be checked in as a private volume. Volumes that are active within an existing storage pool *cannot* be checked in as a scratch volume.

There is a common confusion with TSM and scratch volumes. There is no such thing as a scratch volume if the volume is not checked in to the library. "SCRATCH" status is a flag that is used within the library volumes table only. An empty tape that is to be checked in as a scratch tape should be thought of as being "elligible to be checked in as scratch" - this helps to avoid the confusion.

HTH

Kind Regards,
Matthew Bourne
"Find a job you love and never do a day's work in your life.
 
That makes a lot of sense. Thanks a lot for the input and the time to satisfy my curiosity. Your comments are appreciated.
 
Hi mbourne.. Thats what the audit is for after the checkin - as I said in the first post...
 
Hi ProbablyDown

Allow me to refresh my memory:

"To put back... checkin se=yes status=private (so they dont go in as scratch - doubt they would but)

then Audit lib to get your scratches back (make sure no vols mounted in a drive)"

I've understood this to mean that you intend to use the "Audit Libr" command to checkin scratch tapes - is that not what you meant?
 
The audit will move the private tapes that were scratch back to scratch.. - I just had to do that to a client's lib due to them attaching extraneous labels to the volumes (which peeled off and took out some of their drives) - Had to empty the frames remove all the labels and put them back - (~750 tapes)...

To get them all back in - checked in as private, ran an audit... all was fine.
 
I've looked again at the "AUDIT LIBR" runes - are you talking about a 349X library? I've only ever worked with LTO-based libraries, so my take on the behaviour of the command is biased :)

Kind Regards,
Matthew Bourne
"Find a job you love and never do a day's work in your life.
 
You can also open it, take all the tapes out, then run audit libvol XXXX checklabel=barcode. It shouldn't taken more than 5min.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top