...
The xrootd tools used by FGST are in the release directory of the glastdat user. Sourcing the wk_env script will set the PATH to a release bin directory and set the PYTHONPATH for the python packages.
Code Block |
---|
% cd /u/gl/glastdat/releases/admincurrent/ % . bin/wk_env |
...
The ScaRunOnHosts script will take a list of FGST xrootd servers and a command. It will ssh to all of the servers in the list and execute the command directly on the server. The basic usage is:
Code Block |
---|
% ScaRunOnHosts -s wain018,wain034 -r -e -- <command>
% ScaRunOnHosts -f glast -r -e -- <command>
|
...
The script reads from a file the list of recon files that can be purged from a xrootd server. Purging a file includes the following steps:
#) Check if file is on disk
#) Check if file is marked as migrated. On Solaris this means comparing a files mtime with the corresponding .lock files. On linux xattrs are used instead.
#) If the file is marked as migrated check in HPSS if the file exists and compare file sizes.
#) remove file (and .lock file) if the check in HPSS succeeded.
Code Block | ||
---|---|---|
|
...
| |||
SrvPurgeFiles.sh [options] pass
options:
| |||
Code Block | |||
---|---|---|---|
-l write output to log file -n number of files to purge -T test, print only command and exit pass: P202 | P300 |
Example:
Code Block |
---|
% cd /u/gl/glastdat/releases/current % . bin/wk_env % ScaRunOnHosts -f glast -r -e -- SrvPurgeFiles.sh -l P202 % ScaRunOnHosts -f glast -r -e -- SrvPurgeFiles.sh -l P300 |
The above command commands will ssh to all xrootd servers and do the purge. Log files are written to the directory /var/adm/mps/logs (Solaris) or /var/adm/frm/logs (Linux) and the logfile name is purge_file.YYYYMMDDTHHMMSS. As all output from SrvPurgeFiles.sh_ is written to a log file one will not see any output from the command above. The first(second) example would purge the recon files that are succeeded by the P202(P300) reprocessing.
Code Block |
---|
ScaRunOnHosts -f glast -e -r -- SrvMigrateFiles.sh -b [-r] [-e]
|
...
Mark file on server as migratable (Linux):
Code Block |
---|
frm_admin mark -m /glast/Data/..... |
Run migration
Code Block |
---|
SrvMigrateFiles.sh <file-list>
|
...