Disabling caching on a primary stgpool and deleting the volumes in TSM

Posted by on Sep 13, 2011 in Infrastructure, Storage, TSM | 2 Comments

I recently needed to shrink a primary stgpool with devclass DISK on a TSM 5.5 server  in order to free up space.  Since the stgpool had a device class of DISK and caching was enabled, I wasn’t able to directly shrink the stgpool by moving the data within volumes and then deleting the empty volumes.  Instead, I needed to first disable caching on the stgpool, and then I was able to purge the cached data from the storage pool.

Here’s a look at the volumes in the storage pool:

tsm: SERVER1>q vol stg=mypool1

Volume Name                  Storage         Device         Estimated       Pct      Volume
                             Pool Name       Class Name      Capacity      Util      Status
------------------------     -----------     ----------     ---------     -----     --------
/path/to/mypoolvol01         MYPOOL1         DISK             500.0 G      55.2     On-Line
/path/to/mypoolvol02         MYPOOL1         DISK             500.0 G      90.0     On-Line

The first step is to disable caching of migrated files on the storage pool.

tsm: SERVER1>update stgpool mypool1 cache=no

As you can see, this has no effect on the storage space used; the data remains in the storage pool.

tsm: SERVER1>q vol stg=mypool1

Volume Name                  Storage         Device         Estimated       Pct      Volume
                             Pool Name       Class Name      Capacity      Util      Status
------------------------     -----------     ----------     ---------     -----     --------
/path/to/mypoolvol01         MYPOOL1         DISK             500.0 G      55.2     On-Line
/path/to/mypoolvol02         MYPOOL1         DISK             500.0 G      90.0     On-Line

However, now that caching has been disabled, if we use the “move data” command, any cached data in the storage pool will be cleared:

tsm: SERVER1>move data /path/to/mypoolvol01
ANR2232W This command will move all of the data stored on volume /path/to/mypoolvol01 to other volumes within the
same storage pool; the data will be inaccessible to users until the operation completes.

Do you wish to proceed? (Yes (Y)/No (N)) y
ANS8003I Process number 1094 started.
tsm: SERVER1>q vol stg=mypool1

Volume Name                  Storage         Device         Estimated       Pct      Volume
                             Pool Name       Class Name      Capacity      Util      Status
------------------------     -----------     ----------     ---------     -----     --------
/path/to/mypoolvol01         MYPOOL1         DISK             500.0 G       0.0     On-Line
/path/to/mypoolvol02         MYPOOL1         DISK             500.0 G      90.0     On-Line

With the volume now empty, we can remove the volume from the storage pool:

tsm: SERVER1>del vol /path/to/mypoolvol01
ANR2220W This command will delete volume /path/to/V02737713.BFS from its storage pool after verifying that the volume
contains no data.

Do you wish to proceed? (Yes (Y)/No (N)) y

The last step is to remove the file from the filesystem:

# rm /path/to/mypoolvol01