// Second Tape Copy
Only one tape copy of archive files are generated for users. However, it is possible to ask for a second copy to be made with the dmtag command. This command is available on Discover login nodes and from the datamove partition, and is used for checking and changing the "sitetag" of files in /archive. The purpose of the "sitetag" field in the inode is to indicate to the system that 2 tape copies should be made for this file. The command can be invoked as follows:
$ dmtag -t 2 list-of-archive-files
Like other dm commands, it can accept names streamed to its standard input. The only acceptable value for the sitetag (the -t option) is 2, which indicates that two copies are requested. Any value different from 2 results in a single tape copy. You can check the sitetag of a previously tagged archive file with dmtag with no arguments or options:
$ dmtag test_*
0 /cxfsm/cache06/users/g05/joe/test_t10kc.10GB
0 /cxfsm/cache06/users/g05/joe/test_t10kc.2gb
0 /cxfsm/cache06/users/g05/joe/test_t10kc.2gb.2
$ dmtag -t 2 test_*
$ dmtag test_*
2 /cxfsm/cache06/users/g05/joe/test_t10kc.10GB
2 /cxfsm/cache06/users/g05/joe/test_t10kc.2gb
2 /cxfsm/cache06/users/g05/joe/test_t10kc.2gb.2
Note: When you use dmtag to increase the number of tape copies to 2, an automated process will generate the second tape copy within several days, depending on system load.
Caveats
In order to run this command from Discover, passwordless ssh must be set up just like for dmget.
Passwordless SSH/SCPThe dmtag command is inconsistent when run against symlinks. Generally changing the sitetag of the link will actually change the tag of the file pointed to by the link, if that file is an archive file, but from some clients querying the sitetag with dmtag will show the sitetag of the link itself and not the file. We have reported the symlink inconsistencies to SGI.
Invoking the dmtag command from tcsh or csh can prevent some error checking from taking place in the case of non-existent files. For example, the command:
$ dmtag list* clap*
0 /cxfsm/cache06/users/g05/joe/list
2 /cxfsm/cache06/users/g05/joe/list.2
The shell simply skips files that do not exist, giving no error message. Using bash or ksh is a better option:
$ dmtag list* clap*
clap* does not exist or the file it points to does not exist
0 /cxfsm/cache06/users/g05/joe/list
2 /cxfsm/cache06/users/g05/joe/list.2