The nsrhsmck program checks and corrects the consistency between the file stubs and the client file index entries for files migrated by HSM. The nsrhsmck program handles four situations:
The first situation occurs when you rename the stub for a migrated file. In this situation, the stub with the original filename no longer exists. The nsrhsmck program corrects this situation by updating the client file index entry to reflect the new name given to the stub.
The second situation occurs when you create a symbolic link that points to the same name in the Backup Instruction Buffer (IB) namespace as another symbolic link. The nsrhsmck program corrects this situation by replacing the duplicate with a symbolic link that points to the original symbolic link, rather than pointing directly to the Backup IB namespace.
The third situation occurs when you delete the stub that points to a migrated file. This is known as the possible delete case. The term "possible" implies that the stub may reappear later, for example, if the stub is recovered using Backup. The nsrhsmck program corrects this situation by marking the index entry for the migrated file as a possible deletion after 60 days. Note that if a file marked as possibly deleted is detected on disk before the index entry is later deleted, the index entry is unmarked as a possible deletion.
The fourth situation handled by nsrhsmck occurs when an index entry that is marked as a possible deletion that has passed the 60 day expiration time. The nsrhsmck program corrects this situation by removing the expired entries from the HSM file index. Before it deletes an entry from the HSM file index, nsrhsmck makes a final check to make sure the file does not exist on disk.
You must specify a path on the command-line when you run nsrhsmck. Only files and index entries that fall under the path specified are examined for consistency.
The following example describes the options available for the nsrhsmck program:
Use the -c option to instruct the nsrhsmck program to walk the HSM file index and delete entries marked as possibly deleted that have passed the 60-day expiration period.
Use the -d option to instruct the nsrhsmck program to walk the HSM file index and mark any possible deletions that are detected.
Use the -f option to instruct the nsrhsmck program to walk the filesystem on disk and search for duplicated links and renamed stubs.
Use the -M option to tell the nsrhsmck program that it is being run in master mode by nsrexecd or another Backup daemon, and, therefore, to log messages with timestamps as well as perform other behavior expected by nsrexecd. This option is not advised for manual operation; it is used by the Backup server when nsrhsmck is automatically invoked.
Use the -n option to instruct the nsrhsmck program to report on any inconsistencies found, without correcting them.
Use the -s server option to specify the machine to use as the Backup server. If you omit this option, the default machine considered is either the current machine (if it is a Backup server) or a machine with the logical name of nsrhost entered in the host table.
Use the -v option to run nsrhsmck in verbose mode. You can specify this flag up to three times on the command-line to achieve the highest level of verbosity. Note that the verbose mode can produce an extremely large quantity of output and is not recommended for use in most situations.