Unsolved

This post is more than 5 years old

1 Rookie

 • 

5 Posts

704

May 28th, 2008 12:00

Script to label recycle volumes

Is it possible to create a batch job that runs daily to check for recyclable volumes of a certain pool and automatically labels them to a specific pool when it is expired?

6 Operator

 • 

14.4K Posts

 • 

56.2K Points

May 28th, 2008 12:00

Since NetWorker does that automatically what is the purpose? If desired pool would be different from pool in which tape currently is you could allow this at pool level (by allowing recycle from and to settings). But to answer your question, yes what you wish is also possible even you could do it through NW configuration without any scripting.

1 Rookie

 • 

5 Posts

May 28th, 2008 12:00

Ideally, i would like to run a batch job daily to check for expire volumes for a specific pool and re-label them to the same pool.

Would a nsr_label work? Or is there a better way/

1 Rookie

 • 

5 Posts

May 28th, 2008 12:00

This is for a virtual tape library. And drive space is limited. When we added the VTL, we didn't think about the repercussion on creating so many volumes. It's a problem now.

6 Operator

 • 

14.4K Posts

 • 

56.2K Points

May 28th, 2008 12:00

I see... relabeling this immediately you would free up some space physically on VTL. Yes, this is possible. Hopefully you know how to translate following into the script:
- list (all) volumes which are recycable (use mminfo for that)
- (re)label them (nsrjb)

You have two variations here with same end result; one where you would list all volumes and then relabel them based on their earlier pool assigment (requires parsing data from mmino query) or by doing query for each pool you have and then relabel it back to that pool based on list of volumes obtained by mminfo query.

There other approaches like deleting expired media and having them handled further by auto media management (certain risk present as always when dealing with auto media management) or simply by list all expired volume and having them labeled to scratch pool and recycled immediately. Thus they would take no space and would be available to be relabeled by NW in case you allow recycle to for scratch pool and recycle from for other production pools. I'm quite sure there are other approaches too.

6 Operator

 • 

14.4K Posts

 • 

56.2K Points

May 28th, 2008 13:00

What is nsr_label?

6 Operator

 • 

14.4K Posts

 • 

56.2K Points

May 29th, 2008 04:00

Check mminfo and nsrjb manual for details. mminfo has switch to report recycled volumes (volrecycle) and in nsrjb manual you will find example how to label tapes.

1 Rookie

 • 

5 Posts

May 29th, 2008 04:00

What syntax would I use to create this command to check for expired volumes and label them to the same pool?
No Events found!

Top