In the event where it is necessary to obtain a list of migrated files to a TSM server, various options are available. This document will provide details for each method.
Method A : The HSM file system has valid stub files
In this case, it is assumed that the HSM stub files are valid on the file system. In this case, there are 2 commands available, the “dmsls” command and the “dsmmigquery” command.
i) Using the dsmls command.
The dsmls command may be used to list the files in the file system. The output will show the “File state”. The file state for a file can be any of the following: migrated (m), premigrated (p), or resident (r). For example :
# dsmls -R /hsmtest
IBM Tivoli Storage Manager
Command Line Space Management Client Interface
Client Version 5, Release 4, Level 1.2
Client date/time: 11/01/07 13:53:30
(c) Copyright by IBM Corporation and other(s) 1990, 2007. All Rights Reser
Actual Resident Resident File File
Size Size Blk (KB) State Name
<mnt> 4096 4 - hsmtest/
/hsmtest:
<dir> 4096 4 - .SpaceMan/
<dir> 256 0 - adsm/
<dir> 256 0 - subdir/
<dir> 256 0 - sudir1/
169318 4096 12 m trace.out
#
In the above output, the trace.out file is a migrated file.
ii) Using the dsmmigquery command :
The dsmmigquery command may be used to query migrated files with the -sortedmigrated option. For example :
# dsmmigquery -sortedmigrated /hsmtest
IBM Tivoli Storage Manager
Command Line Space Management Client Interface
Client Version 5, Release 4, Level 1.2
Client date/time: 11/01/07 13:59:27
(c) Copyright by IBM Corporation and other(s) 1990, 2007. All Rights Reserved.
Migrated files in /hsmtest:
/hsmtest/trace.out
In the above output, it shows that the trace.out file is migrated.
Method B : The HSM file system is missing stub files
In this case, it is assumed that the HSM stub files are missing from the file system. Such a case may occur when a file system is corrupted or a file system needs to be recreated from scratch. In this case, nor the dsmls or dsmmigquery command may be used as both require a stub file. In this case, it is possible to query the TSM server using the tsm admin command line with the select command. The select command may be used as follow :
dsmadmc -id=[tsm admin id] -pa=[tsm admin password] -display=list -dataonly=yes -tab -outfile=[output file] "select file_name from spacemgfiles where filespace_name='[file system name]' and node_name='[node]'"
[tsm admin id] = tsm admin userid
[tsm admin password] = tsm admin password
[outout file] = Path/file name to write output to.
[file system name] = HSM file system name. This is case sensitive.
[node] = TSM node name used to migrate files. Name must be uppercased.
For example :
# dsmadmc -id=admin -pa=admin -display=list -dataonly=yes -tab -outfile=/tmp/migrated.list "select file_name from spacemgfiles where filespace_name='/hsmtest' and node_name='MYHSM'"
# more /tmp/migrated.list
/trace.out
#
*Notes*
- The above select command is specified on multiple lines but must be entered on one line.
- This last method may be useful when recreating a file system from scratch. If a stub file needs to be recreated but no backup copy exists, the dsmmigundelete command must be used and the migrated file parent directory must be recreated first. See apar IC60976 for more information on this command. |