NetWorker vs Scratch pools

 NetWorker, Policies  Comments Off on NetWorker vs Scratch pools
Aug 032009

A common question asked in NetWorker forums is “how do I configure a scratch pool in NetWorker?” This comes mainly from people who have exposure to Veritas NetBackup, which does media management in a different way to NetWorker.

In NetWorker, once a piece of media has been assigned to a pool, the only way it can be assigned to another pool is by relabelling. I.e., moving media from one pool to another in NetWorker (a) is data-destructive and (b) requires physical writes to the media. (By “data-destructive”, I mean that whatever was previously written to the media is lost when the volume is relabelled into another pool.)

NetBackup on the other hand, which mainly categorises media by the retention policy used for images written to that media, allows media to be shifted from one ‘pool’ to another. Hence, in NetBackup, new media is typically added to a ‘scratch’ pool when it is brought into the environment, and allocated out of that pool into the required pool on an as-needed basis.

The reason NetWorker doesn’t really need a scratch pool is two-fold:

  • By enabling auto-media-management, you can have media added to a tape library, left unlabelled, and then labelled on an ‘as-required’ basis by NetWorker automatically into the required pool, and,
  • You can configure each pool to effectively be a scratch pool for every other pool with only a few settings, allowing recyclable media to be moved into whatever pool requires new media.

Let’s look at these two features.

First, auto media management. Despite a lot of misconceptions, this fulfills only one purpose. NetWorker, by default, will not under any circumstance use a tape which has not been previously labelled. I.e., it (by default) requires you to manually label each piece of media – either via NMC, or nsrjb. (There’s a reason for this – it prevents the overwriting of data that might belong to another product or another backup not recognised by NetWorker.)

If you know that the only media that will ever go into a tape library however is media you want to use with NetWorker, you can turn on auto media management. This is done on a per library basis, by editing the library properties in NMC and clicking a single check-box. Once done, any new media added to the system will be automatically labelled only when absolutely required, and labelled into the pool you want.

Here’s the setting:

Auto media verify checkbox ("Media Management", first checkbox.)

Auto media management checkbox ("Media Management", first checkbox.)

The second requirement is to enable media which has become recyclable to be recycled from one pool into another.

To do this, you need to look at your pool properties. The settings we want to adjust are “Recycle from other pools” and “Recycle to other pools”:

Recycling to/from other pools

Recycling to/from other pools

These options are pretty straight forward:

  • Recycle from other pools – Allow recyclable media in other pools to be recycled into this pool.
  • Recycle to other pools – Allow recyclable media in this pool to be recycled into other pools when required.

Using both auto media management and recycle from/to other pools, you can achieve the purpose of scratch pools without actually using them – NetWorker will allocate new media to pools as required, and move media between pools as they become available and are required.

…But our barcodes mean something!

Say you have a “system” whereby all clone media has a barcode starting with “C” and all backup media starts with “B”. How do you use the above functionality with such a system? The answer is simple:

Drop the system, you shouldn’t be doing it.

That might sound cavalier, but I’ll be perfectly blunt: any site that confuses bar code label with data content is using NetWorker incorrectly. NetWorker has good query, report and media management functionality, and you should be using this to determine what is on each tape. Not only that, you place artificial restrictions on media availability when you do this, and invite situations where say, someone dials in at 3am because the system has run out of backup media and “for an emergency” relabels empty “clone” volumes as “backup”.