Reclaim Underutilized OFFSITE Volumes in TSM

Reclaim Underutilized OFFSITE Volumes in TSM

Perl script to automatically reclaim underutilized offsite backup volumes in IBM Tivoli Storage Manager to optimize media usage.

I have a customer that has a reasonable size TSM environment, however the daily change rate is really low. This causes the DRM media that is sent offsite to be utilized at roughly 1-5%. Since the data doesn’t expire quickly they aren’t reclaimed and the volumes tend to sit offsite without being rotated. Using LTO5 media you can imagine that it’s a huge waste of media space.

The Problem

When backup environments have low daily change rates, offsite volumes become severely underutilized:

  • Volumes sitting at 1-5% utilization
  • Media not being rotated efficiently
  • Wasted storage capacity on expensive LTO media
  • Poor cost efficiency for offsite storage

The Solution

I put this together to be run periodically either manually or via cron and allow it to run until completion. It will start with the least utilized volumes and work to the ones that are the most utilized. Of course if you use collocation or will never fill a volume to 80% you will need to change the values accordingly.

#!/usr/bin/perl

use strict;
use warnings;

my $login = "/usr/bin/dsmadmc -id=ADMINUSER -password=ADMINPASS";
my @volumes;

sub getVolumeList {
    my @tempVolumes = ();
    @tempVolumes = `$login -dataonly=yes "select volume_name from volumes where access='OFFSITE' and pct_utilized>0 and pct_utilized<80 order by pct_utilized"`;

    foreach (@tempVolumes) {
        chomp;
        push @volumes, substr($_, -9);
    }
}

getVolumeList;

foreach (@volumes) {
    print "$_\n";
    my $result = `$login -noconfirm "move data $_ wait=yes"`;
}

How it Works

  1. Query TSM: Finds offsite volumes with utilization between 0-80%
  2. Sort by Utilization: Orders from least to most utilized
  3. Process Sequentially: Moves data from underutilized volumes
  4. Reclaim Space: Consolidates data to free up volumes for rotation

This script helps optimize your TSM offsite storage by consolidating data from multiple underutilized volumes, allowing you to reclaim and rotate media more efficiently.