Start a Conversation

Unsolved

P

1 Rookie

 • 

22 Posts

1363

November 16th, 2021 19:00

Scripts to recycle/relabel expired tapes manually (and potentially assign them to a 'scratch' pool)

Hello,

 

Is there anyone who is running scripts to recycle/relabel expired tapes manually (and potentially assign them to a 'scratch' pool) ? I am looking for a sample one and would someone please share any sample script so that I can try to use it and try ?

 

 

2.4K Posts

November 17th, 2021 08:00

Please understand that you will never get a more precise answer if you do not even name the OS (family) you are working with. I will also not present a full solution here but I can give you some guidelines how you should start.


Do not forget to read the Command Line Reference for the full set of options - I will only state the most important ones.

1. Prepare the SCRATCH pool
  -  Create a new pool with the appropriate name (& label template, if you do not use barcode labels)
  -  Set the option "Recycle to other pools"

2. Prepare your destination (clone) pool
  -  Set the option "Recycle from other pools"

3. Use 'mminfo' to get a list of recyclable tapes
  mminfo -q volrecycle -r volume > recyclable_volumes.txt

4. Next use a script or an Excel table to prepare the relabel commands for each of the volumes, assuming that you have a jukebox
  nsrjb -R -b SCRATCH volume

5. Finally, set the status of the SCRATCH tapes to 'recyclable
  mminfo -q "pool=SCRATCH" -r volume > SCRATCH_volumes.txt
    Next use a script or an Excel table to change each volume status as follows:
  nsrmm -o recyclable volume_name

This should do the job.

 

November 17th, 2021 12:00

In the past scripting like that might have been required, for example we had a VTL solution using physical tape on its backend, but also with DD VTL, if you'd recycle/relable expired tapes, then physical tape or storage capacity got actually released.

However nowadays for those situations that wouldn't be required to script as one can use the "Automatically relabeling volumes in a media pool".

Or is your actual use case differently and this build-in solution not appropriate enough?

"Automatically relabeling a recyclable volume provides the following benefits:
● You can relabel volumes outside of the backup window without the need for a scripted solution.
● NetWorker has access to appendable volumes at the time of a backup or clone, which results in faster backup and clone
completion times.
Eligible volumes will not be relabeled if the volume is loaded in a device that is:
● Disabled
● In use by an nsrmmd process (for example, during a restore operation)
● In read-only mode
● Busy

When NetWorker automatically relabels a volume, message to the following appears in the daemon.raw file on the NetWorker
server:
"num_of_volumes volumes will be recycled for pool pool_name in jukebox jukebox_name.""

 

"Max volumes to recycle
Defines the maximum number of recyclable volumes that NetWorker can relabel during each automatic relabel process. The default value is 200."

2.4K Posts

November 17th, 2021 15:00

I personally do not like a VTL solution. Why? - because it just adds an additional layer which is in fact unnecessary and another potentially point-of-failure. IMHO it just creates a well-known environment so that an admin who comes from a physical tape environment will immediately feel comfortable.

 

@barry_beckers 

With NW, one never stops learning . Up to now, I was not aware of the option Automatically relabeling volumes in a media pool. Why? - because I simply cannot find it.

It is obviously an option you set for a pool. However, neither for a NW 9.2.x environment, nor for a NW 19.3.x version I could figure out where this option will be set. No matter whether it is in the NW Admin GUI (of course I used Diagnostic Mode) or within nsradmin (Option Hidden set). The only reference I could find so far is in the Admin Guide just after Auto media verification. And as usual, there is no picture which will clarify the mystery.

So please, if you know the way how to configure it, please add a screenshot for the sake of all of us.

 

November 18th, 2021 05:00

we used DD VTL in environments where there was not enough network ports available while we had enough SAN ports. So only based on costs. For DD's I'd always prefer ddboost instead of having to deal with fibre connections on various OS platforms also requiring drivers and so on, binding devices in place and what not.

Too many things that went wrong with that, even though no longer actual tape or drives breaking occurred it was far from painless. So I don't miss (physical/virtual) tape one bit.

I only stumbled upon the feature after we pretty much got rid of all jukeboxes, and thought this would have been helpful in the past (also it using a default of max. 200 tapes, which we also used for relabeling via a script in the past as possibly doing too many might take so long that NW itself might already have had the time to pick up a volume).

When I look in nw19.4, I see that it is beneath the pool. Below the NW help info as stated in NMC for the pool resource.

 

pool optionspool options

"

Max parallelism - Limits the number of parallel sessions per device allowed when saving to this pool.
 
Auto media verify - Determines whether or not automated verification is performed while data is being written to a volume from this pool.
 
Recycle from other pools - Determines whether pool can recycle volumes from other pools.
 
Recycle to other pools - Determines whether recyclable volumes can be used by other pools.
 
Recycle start - Time to start recyling (HH:MM).
 
Recycle interval - The interval time specifies how often recycling runs. The default value is 24:00, which means run once a day.
 
Max volumes to recycle - Maximum number of volumes to be recycled.
 
Recycle start now - Set to `Yes' if volumes of this pool should be recycled immediately.
 
Recycle last start - This attribute displays the last time that scheduled automatic recycling was performed. This attribute is not updated if the recycle operation was manually initiated.
 
Store index entries - Determines whether or not file index entries are generated for this pool.
 
Archive only - Determines if volumes will be used just for archive. The `pool type' attribute supersedes this attribute.
 
Retention policy - This property is deprecated.
 
WORM pool - This attribute indicates whether the pool will use WORM tapes (and only WORM tapes). Only tape drives that are WORM capable can be assigned to WORM pools.
 
Create DLTWORM - This attribute indicates whether any tapes labelled in this WORM pool should be initialized as DLTWORM tapes, assuming that they are in DLTWORM capable drives. In non-WORM pools or drives that are not DLTWORM capable it will have no effect.
 
Mount class - This attribute denotes the class of mount requests for media belonging to this pool or for media being added to this pool. The class is included in mount requests sent to a AlphaStor.
 
Disable device warning - Determines whether or not a warning is sent while a device is being associated to a clone pool.

"

November 18th, 2021 05:00

before we introduced DD's, we used VTL with a physical tape backend and a rather small amount of disk storage only able to contain the backups for the last 2 days or so, so any backups older than 2 days would be coming from physical tape, and due to having not enough physical drives and only midrange storage array being used, it could become very slow depending on how busy the environment was and how data was to be recalled from physical tape.

I don't miss it a bit in hindsight. DD is a whole different beast altogether and VTL is only stuck on it after customer demand (to indeed, as bingo.1 states, be able to transfer from the old fashioned physical tape to VTL, it was a nifty way and we used it that heavily as well, until actually moving towards usage of ddboost, especially after introducing a dedicated layer3 backup network), not because DD themselves saw it as a way forward. At the moment we do not use VTL features at all anymore on a DD.

2.4K Posts

November 18th, 2021 09:00

Hi Barry, and thank your for your efforts. I finally found the secret. The reason for the misunderstanding is due to the naming convention, a coarse description and my wrong expectation.

So - for the option Recycle start one must set the start time of a daily (by default 24:00 hours) 'recycle process' to activate this option. I got the impression that there was a yes/no option which would just generally enable this option which then would just run for example on an hourly basis.

If the option would have assigned a more descriptive name like Auto recycle start time, it would indicate its purpose much better.

 

2.4K Posts

November 21st, 2021 04:00

I digged a bit deeper inside the 'automatic recycling' feature. Here is what I found:

  -  It has been introduced a while ago with NW 8.0

  -  A recyclable volume candidate must have the volume status 'recyclable'. This is a tiny detail but it is fact that a tape, where all save sets have the status 'recyclable' will not immediately become 'recyclable' - index management (nsrim) must run first to achieve that.

  -  It works for jukebox tapes only. This makes somehow sense as the system must of course be capable to automatically insert tapes in a drive to get them relabeled. However, IMHO is is then not 100% correct to add this feature as an attribute for a pool because other recyclable media from the same pool in standalone tape drives and disk drives will not be affected.

  -  The Admin Guide says that there will be this entry in the daemon.raw file: "num_of_volumes volumes will be recycled for pool pool_name in jukebox jukebox_name."

     At least for the latest NW version 19.5.0.2 I could not see this message at all.

 

No Events found!

Top