Removing unused stubs from a file system

You can remove unused stub files from a file system by using a migration job. Migration copies are protected in Tivoli® Storage Manager until you decide that the migration copies are no longer required.

About this task

A file system can become populated with stubs of files that were migrated and were not recalled in a long time. Users can delete their obsolete files, but often they do not. An administrator can remove unused stub files from the file system and keep the migrated files in Tivoli Storage Manager storage indefinitely.

Removing unused stub files from a file system has the following benefits:
  • An administrator does not rely on a user to delete obsolete files.
  • The administrator can choose which stub files are removed. The administrator can specify folders and age criteria to identify unused files.
  • File system operations can be more efficient when fewer files exist on a file system. Stub files that are removed are not scanned during a file system scan.
  • Listings of unused files do not distract from the listings of newer files. Stub files that are removed are not listed in the HSM for Windows client listing files.
  • Unintended recalls and potential out-of-space conditions are minimized. If a user unintentionally copies a folder of obsolete files, the files must be recalled to the file system. If the unused files are not on the file system, the user cannot make such an error.
  • A migration job that removes stub files does not retrieve or recall the migrated files to the file system.
  • After the stub files are removed from the file system, the files are protected in Tivoli Storage Manager storage. The files are not deleted from Tivoli Storage Manager storage by running a standard reconciliation process. You can retrieve the files from Tivoli Storage Manager storage by using the HSM for Windows client search and retrieve function.
  • When migration copies are no longer required, the administrator can run a special reconciliation process that deletes the protected files from Tivoli Storage Manager storage.
To remove unused stub files, complete the following steps.

Procedure

  1. Optional: Determine the number of old stub files that are in a file system.
    1. Run the dshmsmclc.exe command with the oldstub parameter. Specify an age that defines an old stub file.
    2. Run a reconciliation process for the file system. The reconciliation process counts the number of stub files on the file system that are at least as old as the age that you specify.
    3. View the hsmmonitor.log file. The hsmmonitor.log file contains the number of stub files that are at least as old as the age that you specify. A trace record from the log file looks like this example:
      I: Number of old/unused stubs (age > 400 days): 13467
    You can repeat the process and use different ages. Use the information to determine the age of the stub files that you want to remove.
  2. Create a migration job for removing unused stub files from the file system. A job for removing unused stubs is similar to a job for migrating files, with the following caveats:
    • In the General tab, you must set the Action option to Delete the files.
    • When you create any migration job, you must select a file space and management class. However, migrated files are assigned to a file space and a management class when they are migrated. The file space and management class of the migrated file do not change when you remove a stub file from the file system. The file space and management class values are ignored when the job removes a stub file.
    • In the Advanced Conditions window, you must include a condition for migration status. Select HSM stub file.
    • In the Advanced Conditions window, you can exclude a condition for the stub file age or the time of the last migration.
      Note: For files that were migrated with the HSM for Windows client V7.1.4 and earlier, the last migration time is set when the file is migrated and when the ACL of the stub file is updated. For files that were migrated with V7.1.6 and later, the last migration time is set only when the file is migrated.
  3. Run the HSM for Windows client dsmfind command. Specify the new migration job as a command parameter. Inspect the output list of files and decide whether the include and exclude conditions define the correct set of files to remove. No stub files are removed from the file system when you run the dsmfind command.
  4. Modify the new migration job include and exclude conditions and run the dsmfind command until the migration job defines the appropriate stub files to remove.
  5. Run the migration job.

    Stub files are removed from the local file system.

    The migration copies of the files remain in Tivoli Storage Manager storage. The migration copies are protected from standard reconciliation processes. The migration copies are deleted from Tivoli Storage Manager storage only when you configure and run a reconciliation process to delete protected files.

What to do next

You can retrieve the files from Tivoli Storage Manager storage by using the HSM for Windows client search and retrieve function.