
Scalla
File
Residency Manager Reference

Andrew Hanushevsky
1-May-2009
© 2009 by the Board of Trustees of the Leland Stanford, Jr., University; all rights reserved.
Produced by Andrew
Hanushevsky for
DE-AC02-76-SFO0515 with the Department of Energy.
3 The
frm_migrd Command for Migration
4 The
frm_pstga Command for the Pre-Staging Agent
4.1 The frm_pstga Configuration directives
5 frm_pstgd
Command for the Pre-Staging Daemon
5.1 The
frm_pstgd Configuration directives
5.2 The
frm_pstgd Notification Messages
6 The
frm_xfr.hpss Transfer Command
6.1 The
frm_xfr.hpss pftp Command Streams
7 The
frm_purgd Command for Purging
This document describes File
Residency Manager (FRM) commands and
configuration directives. FRM was designed to enhanced support of the Open Storage System (oss) scalable file
system, an xrootd extended feature and is meant to replace the deprecated MPS scripts. This feature is enabled
when the Open File System (ofs) is loaded via libXrdOfs.so, at
run-time using the xrootd.fslib configuration directive. FRM can be used to
administer the local file system (i.e., placing files and maintaining symbolic
links to these files) and for interfacing the file system to a Mass Storage System (MSS). The FRM components are
fully configurable so that virtually any MSS and data transfer mechanisms can be used.
Using the oss component does not
require that you use FRM. In fact, there is no reason to use FRM if you are not
using a real or virtual MSS nor have enabled scalable file system support using the oss.cache
configuration directive.
The FRM consists of four
configurable components:
·
Migration,
·
Pre-staging,
·
Purging,
·
Data Transfer,
and
·
File management.
Each component is implemented as independent
commands:
·
frm_admin implements file administration,
·
frm_migrd migrates modified files from local disk to a remote MSS,
·
frm_pstga and frm_pstgd implement pre-staging,
·
frm_purgd purges unreferenced files from local disk, and
·
frm_xfr[.species] transfers data to/from the MSS.
The FRM deals with two
major mechanisms:
·
local disk, and
·
remote Mass
Storage System (MSS).
The MSS mechanism is
generic and any MSS is able to be used as long as it has a
·
Unix-like name
space,
·
command to
transfer data to and from the MSS, and
·
command to
supply meta-data about files stored in the MSS.
Refer to the section “Interfacing
an MSS” for details on how to use an arbitrary Mass Storage System with the FRM.
The FRM is fully
compatible with any file system that can be configured to be used with xrootd as it directly uses the oss layer to perform file system
operations.
The FRM configuration is described by a configuration file. This configuration file must hold the configuration directives describing the xrootd configuration and well as a few FRM specific directives.
frm_admin [options] [command [cmdopts] cmdparms]
options: [-c
cfn ] [-d] [-h] [-n
name] [-v]
command: help | audit | exit | f[
q[uery] | quit | reloc | rm
Function
Execute local file residency maintenance commands.
Options
-c cfn The
configuration file to be used. The default configuration file,
/opt/xrootd/etc/xrootd.cf, is read is it exists.
-d Turns
on debugging.
-h Prints
usage information.
-n name
Is the name of the server instance for
which the command is being performed. See the notes for more information.
-v Prints
additional messages where relevant.
command
Is one of the
following:
help - provides additional usage information.
audit - verifies that cached file system
consistency.
exit - terminates the program (used in
interactive mode).
find - finds existing or missing residency
management meta-files.
makelf - creates missing lock meta-files or modifies
existing ones.
pin - creates or modifies pin meta-files.
query - displays various information.
reloc - relocates files from one type of space
to another.
rm - removes one or more files or
directories.
cmdopts
Are command
specific options. Refer to each command description for more information.
cmdparms
Are command
specific parameters. Refer to each command description for more information.
Notes
1)
When
frm_admin is invoked with no
parameters, it enters interactive prompt mode. In this mode you can execute a
series of commands by entering new line separated functions and parameters in
response to the prompt. Command-line editing tools are enabled on platforms
that support them.
2)
To
leave interactive mode, use the exit
or quit commands. Alternatively, a
null line in response to the prompt causes the program to exit.
![]()
![]()
names
ldir
audit [options] space sname[:sdir]
usage
sname[:sdir]
options: [-fix] [-force] [-migratable]
[-purgeable]
[-recursive]
Function
Inventory the logical name space,
physical data space, or usage information for validity.
Parameters
names
Audits
the logical name space, ldir.
ldir Is the logical name of the directory
whose contents are to be audited.
space
Audits
the physical data space named sname.
usage
Audits
the space usage associated with physical data space named sname.
sname Is the name of the space to be audited
for contents or usage. This is the name that is specified using the oss.cache directive. By default, all
directories associated with the named space are processed.
sdir Is a specific directory associated with
sname, as specified using the oss.cache directive. Only that
directory is processed.
Options
-fix Attempts
to fix problems encountered during the audit.
-force When
used in conjunction with –fix,
automatically answers yes to every
question posed. This, in effect, corrects all mistakes without intervention.
-migratable
With –fix, creates any missing lock meta-files in ldir indicating that the file associated
with the missing lock meta-file must be migrated prior to being purged. This is
the default when ldir is exported
with the mig option. See the notes
for more information on lock meta-files.
-purgeable
With –fix, creates any missing lock meta-files in ldir indicating that the file associated
with the missing lock meta-file may be purged. See the notes for more
information on lock meta-files.
-recursive
Recursively audits the names in all
directories starting with ldir.
Notes on audit names
1)
Lock
meta-files are special files placed in the logical name space that are used to
track file modifications. These files are automatically created when the space
is exported with the mig or stage options.
2)
When
a names audit is requested the following occurs
a.
The
directory is scanned for any orphaned meta-files. These files have a suffix of
“.fail”, “.lock”, “.map”, and “.pin”. An
orphaned meta-file is a file that exist without the presence of its associated
base (i.e., data) file. The default fix action is to remove orphaned files.
b.
If
the name space has been exported with the mig
or stage options, the audit verifies
that each base file has an associated lock meta-file. The default fix action is
to create missing lock files that either requires the base file to be migrated
or allows it to be purged; depending on the subcommand options or defaults.
c.
Should
a base file be a symbolic link to a named space, the link’s consistency is
verified. If the link point to a non-existent data file); the default fix
action is to remove the dangling link.
d.
Additionally
for XA spaces, the data file must be associated with a pfn meta-file. If the
pfn meta-file is missing or incorrect, the default fix action is to create a
new one.
Notes on audit space
1)
Generally,
space auditing is a deterministic process. Occasionally, irresolvable conflicts
can arise. You should not use the auto option to fix spaces without first
running the audit names subcommand.
2)
When
a space is audited the following occurs
a.
The
directory containing the space is scanned to verify that each data file in the
space is pointed to by a symbolic link in the associated name space. When a
missing link is found and the logical name of the file can be determined, the
default fix action is to create the symbolic link. If the logical name cannot
be determined, the default fix action is to delete the data file and its associated
meta-files.
b.
Additionally
for XA spaces, the data file must be associated with a pfn meta-file. If the
pfn meta-file is missing; the default fix action is to delete the data file. If
the pfn meta-file is incorrect, the default fix action is to create a new
symbolic link in the logical name space pointing to the data file.
Notes on audit usage
1)
Usage
auditing calculates the amount of space used by files associated with a
particular space. It is only meaningful for XA spaces.
2)
The
–fix option is only meaningful when
usage logging is enabled (see the oss.usage
directive).
3)
Space
usage can be fixed while the xrootd server is running. Applying multiple fixes
is allowed.
![]()
![]()
failfiles
find [options] nolkfiles ldir [ldir [. . .]]
unmigrated
options: [-recursive]
Function
Search the logical name space for
certain kinds of anomalies.
Parameters
failfiles
Finds
all fail meta-files (i.e., files suffixed with “.fail”).
nolkfiles
Finds
all base files that have missing lock meta-files (i.e., files suffixed with
“.lock”).
unmigrated
Finds
all base files whose lock meta-file indicates an un-migrated status.
ldir Is the logical name of the directory
whose contents are to be searched. More than one logical directory name may be
specified.
Options
-recursive
Recursively processes all
subdirectories of ldir.
Notes
1)
The
find subcommand is useful only for
name spaces that have been exported with the mig or stage options.
makelf [options] lspec
[lspec [. . .]]
options: [-migratable]
[-owner ospec] [-purgeable]
[-recursive]
ospec: usr[:grp] | [usr]:grp
lspec: lfn | ldir[/*]
Function
Create or alter a lock meta-file.
Parameters
lfn Is the logical name of a file for which
a lock meta-file is to be created or altered. Multiple lfn’s may be specified.
ldir Is the logical name of a directory.
When ldir is suffixed by “/*’ then lock meta-file are created or
altered for all data files in ldir. Specifying
–recursive applies makelf to all files in ldir and all of its descendants.
Multiple ldir’s may be specified.
Options
-migratable
Creates or
alters the lock meta-file to indicate that lfn
must be migrated prior to being purged. This is the default when lfn is in a directory exported with the mig option and the lock file does not
exist.
-owner
Sets the lock meta-file ownership. The default ownership corresponds to the current
effective user and group id. To change the user id, specify usr as a login username or uid. To
change the group id, specify grp as a
group name or gid. Setting ownership may require root privileges.
-purgeable
Creates or
alters the lock meta-file to indicate that lfn
may be purged.
-recursive
Recursively processes all
subdirectories of ldir.
Notes
1)
The
makelf command is useful only for
name spaces that have been exported with the mig or stage options.
2)
You
must quote or escape ldir when
specifying ldir with an asterisk on
the frm_admin command line.
pin [options] lspec [lspec [. . .]]
options: [-keep
tspec] [-owner ospec] [-recursive]
tspec: [+]num[d|h|m|s]
| mm/dd/[yy]yy | forever
ospec: usr[:grp] | [usr]:grp
lspec: lfn | ldir[/*]
Function
Create or alter a pin meta-file to
control file purging.
Parameters
lfn Is the logical name of a file for which
a pin meta-file is to be created or altered. Multiple lfn’s may be specified.
ldir Is the logical name of a directory.
When ldir is suffixed by “/*’ then pin meta-file are created or
altered for all data files in ldir.
Specifying –recursive applies pin to all files in ldir and all of its descendants.
Multiple ldir’s may be specified.
Options
-keep Sets
amount of time a file must be kept in local disk. To keep a file on disk
unless it has not been accessed for a period of time, specify the period as +num[d | h | m | s] where num is the quantity and d is for days, h for hours, m for minutes, and s for seconds (the default). To keep a
file on disk for a certain amount of time past midnight, specify the time as num[d | h | m | s] without the leading plus sign. To
keep a file on disk until a particular date, specify the time in date format
(i.e., keep until this date) as mm/dd/[yy]yy where mm
is the month, dd
is the day, and yy
is the year with two digit years being automatically prefixed by 20. To keep the file on disk indefinitely,
specify the time as forever.
-owner
Sets the pin meta-file ownership. The default ownership corresponds to the current
effective user and group id. To change the user id, specify usr as a login username or uid. To
change the group id, specify grp as a
group name or gid. Setting ownership may require root privileges.
-recursive
Recursively processes all subdirectories of lspec should it be a directory.
Notes
1)
The
pin command is useful only for name
spaces that have been exported with the mig
or stage options.
2)
Default
pinning attributes are based on the configuration supplied to the purge daemon.
The pin meta-file over-rides the defaults on a per-file basis.
3)
When
keep time is zero, the pin meta-file
is removed.
4)
You
must quote or escape ldir when
specifying ldir with an asterisk on
the frm_admin command line.
![]()
![]()
pfn lspec
[lspec [. . .]]
query rfn lspec
[lspec [. . .]]
space [[-recursive] lspec [lspec [...]]
usage [sname]
lspec: lfn | ldir[/*]
Function
Display various information.
Parameters
pfn Displays
the local disk physical file name corresponding to the specified logical name. The
name need not exist. More than one lspec
may be specified.
rfn Displays
the remote disk (i.e., MSS) physical file name corresponding to the specified
logical name. The name need not exist. More than one lspec may be specified.
space Without
arguments, displays the configured spaces as defined by the oss.cache directive. When lspec is specified, displays the space
in which one or more files reside.
lfn Is the logical name to be queried.
Multiple lfn’s may be specified.
ldir Is the logical name of a directory to
be queried. Multiple ldir’s may be specified.
ldir/* Is the logical name of a directory. For
query space, the query is applied to
all data files in the directory. This is the default for query space when lspec is
a directory name. Multiple ldir/*’s may be specified.
usage Displays
usage information based on the usage log file for the space named sname. If sname is not specified, usage for all named spaces is displayed.
Options
-recursive
Recursively processes all subdirectories of lspec should it be a directory.
Notes
1)
The
query space subcommand is only
useful when a cached file system has been defined with the oss.cache directive.
2)
The
query usage subcommand is only
useful with usage logging has been enabled with the oss.usage directive.
3)
Usage
for non-XA spaces contains limited information and is not necessarily accurate
relative to other non-XA spaces.
4)
Usage
information is displayed in bytes with the following tags:
a.
Space the name of
the space.
b.
Used bytes
currently recognized by xrootd as being used.
c.
Staged bytes
staged by the pre-stage daemon.
d.
Purged bytes
purged by the purge daemon.
e.
Adjust the
correction factor determined by audit
usage –fix.
f.
Effective (Used + Staged – Purged + Adjust)
5)
The
staged, purged, and adjust
values are periodically reset to zero when the xrootd daemon re-computes the quantity it considers in-use based on
the previous values.
6)
You
must quote or escape ldir when
specifying ldir with an asterisk on
the frm_admin command line.
reloc lfn sname[:sdir]
Function
Relocate a data file from one space to
another.
Parameters
lfn Is the logical name of the file to be
relocated.
sname Is the name of the space in which the
file is to reside.
sdir Is a specific directory associated with
sname, in which the file is to
reside.
Notes
1)
The
reloc subcommand is only supported
for XA space targets. That is, the file may reside in any space but may only be
relocated to an XA space.
2)
If
lfn already exists in sname, then you must specify sdir and it must differ from the
directory in which the data file resides.
rm [options] lspec [lspec [. . .]]
options: [-echo]
[-force] [-recursive]
lspec: lfn | ldir[/*]
Function
Remove one or more files from local
disk.
Parameters
lfn Is the logical name of a file to be
removed. Multiple lfn’s may be
specified.
ldir Is the logical name of a directory to
be removed. The directory must be effectively empty. Multiple ldir’s may be specified.
ldir/* Is the logical name of a directory. All
entries in the directory, but not the directory itself are removed. Removal
fails if the directory contains another directory. In this case, you must use
the –recursive option. Multiple ldir/*’s
may be specified.
Options
echo Displays
the physical name of every removed file.
force Does
not ask for permission prior to removing a file.
recursive
Recursively
removes all files and directories starting with ldir before removing ldir
itself.
Notes
1)
The
recursive option only applies to
directories and is ignored if lspec
is not a directory.
2)
You
must quote or escape ldir when
specifying ldir with an asterisk on
the frm_admin command line.
Not Yet
Implemented
Function
Copy modified files from the local disk to a Mass Storage System.
Options
Notes
frm_pstga [ options ]
options: [-c cfn] [-d] [-k {num | sz{k|m|g}}]
[-l logfn]
[-n
name]
Function
Add,
delete, and list entries in the frm_pstgd
request queue.
Options
-c configfn
The
configuration file name. The default name for the configuration file comes from
the environmental variable XRDCONFIGFN,
if set[1],
otherwise it defaults to “/opt/xrootd/etc/xrootd.cf”.
-d Turns on debugging mode. Additional
information is printed to describe various actions.
-k num | sz{k|m|g}
Keep
no more than num old log files. If sz is specified, the number of log files
kept (excluding the current log file) is determined by how much space they use.
Hence, kept log files will not exceed sz
bytes. The sz must be suffixed by k, m,
or g to indicate kilobytes, megabyte, or gigbytes,
respectively.
-l logfn
Routes
error messages and any trace output to logfn. By default, messages are
directed to standard error unless the environmental viable XRDLOGDIR is set[2],
in which case the logfn defaults to “$XRDLOGDIR/frm/pstgalog”. Refer to the
notes on how logfn is modified by the
–n option.
-n name
Assigns name to the frm_pstga
instance. The default name comes from
the environmental variable XRDNAME,
if set[3],
otherwise frm_pstga is unnamed. See
the notes on how to use this option.
Notes
5)
The
frm_pstga also accepts additional
directives from the configuration file, configfn.
These directives are described in the following section.
6)
The –n option allows you to run multiple
instances of frm_pstga with a common
configuration file. This is possible because the specified name is used to
modify various file system paths frm_pstga
uses for output files. By automatically differentiating such paths by instance
name prevents two frm_pstga
processes from interfering with each other.
7)
The
–n option modifies the logfn specified on the command line.
Assuming logfn is composed of “/path/fn”
and –n name is specified, the log file name becomes “/path/name/fn”.
8)
The frm_pstga command reads requests from
standard input and provides responses via standard out. This is compatible with
the requirements of the xrootd’s oss.stagecmd and oss.stagemsg directives and cmsd’s
cms.prep and cms.prepmsg directives. Refer to each respective manual for more
information.
9)
To
enable FIFO notification while using xrootd
you must specify
a.
frm_pstga as the staging command via the oss.stagecmd directive and
b.
Use
the async option, and
c.
pipe
requests into frm_pstga (i.e.,
specify “|”).
10) The frm_pstga command can also be used with any other program to manage
the pre-stage queue. Refer to the description of frm_pstga commands for more information.
In addition to
the directives prefixed by “frm.pstg”,
frm_pstga also uses certain xrd-specific directives, if specified,
for configuration. They are shown in gray below.
all.adminpath apath
frm.pstg.queuepath qpath
Directives
all.adminpath apath
Specifies
the fully qualified administrative path where various directories and special
files may be created to control execution. The default name for the apath comes from the environmental
variable XRDADMINPATH, if set[4],
otherwise it defaults to “/tmp”.
frm.pstg.queuepath qpath
Specifies
the directory where the pre-stage queue files and other special files reside.
The directory path and the files are automatically created if they are
missing. The default path is “/apath[/name]/frm” where apath comes from the specified or defaulted adminpath directive and name
from the –n command line option.
Notes
1)
The
frm_pstga communicates with frm_pstgd via a named UDP socket. This
socket is located “/apath[/name]/frm/pstg.udp”.
The following commands can be directed to frm_pstga via standard-in:
Add to queue: +[traceid] requestid notify prty mode lfn[?cgi]
Remove from queue: - requestid
List the queue: ? [varnames]
varnames: lfn | lfncgi | mode | note | prty | qwt | rid |
tid | tod | [varnames]
Add to queue (+) parameters
traceid
a
1- to- 256 character identifier describing the entity that caused the entry to
be added. See the notes for an explanation of the standard traceid format. A generic default is used if traceid is not specified.
requestid
a
1- to- 64 character identifier to be used to group this request into a unique
set of requests. This means that requestid
should be globally unique.
notify a 1- to- 512 character string
describing who should get notified upon completion of the request. Multiple
strings, totaling 512 characters, can be specified by each but the last one with
the carriage return (‘\r’) character. See the section on frm_pstgd messages for the actual message that is sent. The notify format[5]
is:
- no notification is to be sent.
file:////path send a special message via FIFO named path
udp://rhost:port/msg send msg via udp to rhost:port
udp://path/msg send msg via udp via local Unix path path
prty the character ‘0’, ‘1’, or ‘2’,
designating the request’s priority (0 being the lowest). If an invalid priority
is specified, ‘0’ is used. See frm_pstgd
on how request priorities are used.
mode The
processing mode as a sequence of characters:
r[x] - prestage a file in read-only mode. See below for the x values.
w[x] - prestage a file in read-write mode. See below for the x values.
* - end the requestid set and optionally send notification when the
requested set actually completes[6].
The r and w functions can be suffixed with additional letters to indicate how errors and successes are to be handled. As shown above, x can be a combination of the following:
f - send notification if the file cannot be pre-staged. This option is
unaffected by the q letter.
s - send notification upon successfully staging in the file[7].
q - do not send any notifications associated with this entry. By default,
only failure notices are sent.
lfn the logical file name of the file to be staged.
cgi opaque information to be forwarded to the staging transfer agent, if configured to accept this information (see frm_pstgd’s frm.pstg.xfrcmd configuration directive). The total amount of information, including the lfn and ‘?’ separator, cannot exceed 2,175 characters.
Remove from queue (-) parameters
requestid
a 1- to- 64 character identifier to be used to identify the requests that are to be removed. All pending requests associated with this identifier are removed. Requests already in progress remain are allowed to complete even though they are no longer in the queue.
List the queue (?) parameters
varnames
is an optional list of variable names, as described below. Information is listed in the order in which the variables are listed; each separated by a space. The default variable is lfn. Invalid varnames are silently ignored. Valid variables are:
|
Var |
Information |
Var |
Information |
Var |
Information |
|
lfn |
Logical File Name |
note |
Notification string |
rid |
requestid |
|
lfncgi |
lfn?[cgi string] |
prty |
Priority |
tid |
traceid |
|
mode |
Processing mode |
qwt |
Seconds in queue |
tod |
Time of day added |
frm_pstgd [ options ]
options: [-c cfn] [-d] [-k {num | sz{k|m|g}}]
[-l logfn]
[-n
name] [-s]
Function
Manage
the copying of files from a Mass Storage System to local disk.
Options
-c configfn
The configuration file name. The default name for the configuration file is “/opt/xrootd/etc/xrootd.cf”.
-d Turns on debugging mode. Additional
information is printed to describe various actions.
-k num | sz{k|m|g}
Keep
no more than num old log files. If sz is specified, the number of log files
kept (excluding the current log file) is determined by how much space they use.
Hence, kept log files will not exceed sz
bytes. The sz must be suffixed by k, m,
or g to indicate kilobytes, megabyte, or gigbytes,
respectively.
-l logfn
Routes
error messages and any trace output to logfn. By default, messages are
directed to standard error.
-n name
Assigns name to the frm_pstgd
instance. By default, the frm_pstgd
instance is unnamed. See the notes on how to use this option.
-s Logs staging statistics to the log file
or standard error.
Notes
1)
The
frm_pstgd also accepts additional
directives from the configuration file, configfn.
These directives are described in the following section.
In addition to
the directives prefixed by “frm.pstg”,
frm_pstgd also uses certain ofs, oss, and xrd-specific
directives, if already specified, for configuration. They are shown grayed-out
below.
all.adminpath apath
frm.pstg.stopfile sfn
frm.pstg.queuepath qpath
frm.pstg.waittime wsec
frm.pstg.xfrcmd cmd [ args ]
frm.pstg.xfrmax xmax
ofs.osslib libpath [ parms ]
oss.localroot lpath
oss.namelib npath [ parms ]
oss.remoteroot rpath
xrootd.monitor dest stage host:port
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
args: [text]
[var] [args]
var: $CGI | $LFN
| $PFN | $RFN | $NOTIFY | $OFLAG |
$PRTY | $RID | $USER | $eVar
Directives
all.adminpath apath
Specifies the fully qualified administrative path where various directories and special files may be created to control execution. The default is “/tmp”.
frm.pstg.stopfile sfn
Specifies the fully qualified “stop” file name. When sfn is present, new pre-stage requests are deferred until the file is no longer present. This effectively provides the ability to suspend pre-staging without having to kill the daemon. The default is “/apath/frm[/name]/STOPPSTG””, where apath comes from the adminpath directive and name from the –n command line option.
frm.pstg.queuepath qpath
Specifies the directory where the pre-stage queue files and other special files reside. The directory path and the files are automatically created if they are missing. The default path is “/apath/frm[/name]” where apath comes from the adminpath directive and name from the –n command line option.
frm.pstg.waittime wsec
wsec specifies the number of seconds to wait before checking the pre-stage queue for outstanding requests in an otherwise idle system. The default is 300 seconds. See the usage notes before changing the default.
frm.pstg.xfrcmd cmd
[ args ]
Specifies the absolute path of the program that frm_pstgd is to use to transfer a file from the remote MSS to local disk. The default command is:
“/opt/xrootd/utils/frm_xfr –p $OFLAG $RFN $PFN”
The args are arbitrary
command-specific tokens and may include special variables that will be
substituted each time the command is invoked (as used in the default command).
The following variables may be specified:
$CGI all of the opaque information specified after the question mark in the file path
$LFN logical file name
$PFN physical file name as modified by localroot or the namelib
$RFN remote MSS file name as modified by remoteroot or the namelib
$NOTIFY notification string. See the cms.prepmsg directive for details.
$OFLAG a character letter describing the file open processing flags:
w – O_WRONLY | O_RDWR r – O_RDONLY
$OPTS notification
and other options (see cms.prepmsg directive)
$PRTY request
priority
$RID request identifier
$TID original requesting client’s trace identification
$eVar any variable that has been passed
along with the file name as opaque
information (i.e., contained in $CGI).
frm.pstg.xfrmax xmax
xmax specifies the maximum number of files that may be transferred at the same time. The default is 1.
ofs.osslib libpath
[ parms ]
Specifies the absolute path to the shared library that contains the implementation of the storage system interface that frm_pstgd is to use for file system specific storage operations (e.g., create, rename, etc). The default is to use a built-in mechanism that is identical to what xrootd uses by default.
oss.localroot lpath
The path that is to be used as a prefix to any logical file name before using it as a local physical file name (i.e. to map lfn to local pfn). By default, no prefix is used. Also see the oss.namelib directive.
oss.namelib npath
[ parms ]
Specifies the absolute path to the shared library that contains the implementation of the name-to-name translation interface that frm_pstgd is to use to convert logical file names to local and remote physical file names. The default is to use a built-in mechanism that relies on the oss.localroot and oss.remote root directives.
oss.rmoteroot rpath
The path that is to be used as a prefix to any logical file name before using it as a remote physical file name (i.e. to map lfn to Mass Storage System pfn). By default, no prefix is used. Also see the oss.namelib directive.
When frm_pstgd is asked to send a notification
it uses one or two message formats as shown in each diagram below.
Successful: stage
OK lfn
Unsuccessful stage {ENOENT
| BAD} lfn [ emsg ]
Notification: file:////path
Where
lfn logical filename of the file that successfully staged in or whose staging failed.
ENOENT
staging failed because the file could not be found.
BAD staging failed for other reasons (see error_msg).
emsg an
optional error message describing the nature of the failure.
Successful: avail requestid
msg lfn
Unsuccessful: unavail requestid
msg lfn
Notification: udp://rhost:port/msg or udp://path/msg
Where
requestid
the requestid associate with the staging request.
msg the message, if any, present in the notification string.
lfn the logical filename of the file that successfully staged in or whose staging failed.
frm_xfr.hpss [ options ] [user@host:]sfn [user@host:]tfn
options: [-d] [-f] [-k keytab] [-m] [-n] [-p {r|w|mode}]
[-P port]
[-t tries] [-x pftpcmd] [-z]
Function
Copy a
file to local disk; typically, from a Mass Storage System.
Parameters
[user@host:]sfn
name of the source file to read. If it is prefixed by “user@host:”, then the file must exist in a pftp accessible Mass Storage system located at host and reachable via login as user. Otherwise, the file whose name is sfn must be present on local disk.
[user@host:]tfn
name of the source file to write. If it is prefixed by “user@host:”, then the file is to be written into a pftp accessible remote Mass Storage system located at host and reachable via login as user. Otherwise, the file will be written to local disk using the name sfn.
targetfn
The name of the file as it should exist on local disk.
Options
-d Turns on debugging.
-f over-writes any local file, even if it
has zero length. The –f option is the default for zero-length local files. It
has no effect on remote files.
-k keytab
specifies the pftp password’s location. The keytab must contain a single password that will be used when logging in as user@host. The default location is “/var/adm/xrootd/pftp/keyfile”.
-m when tfn is local, verifies
that tfn does not exist. Should tfn exist, the command fails with an error
message.
-n does not redirect standard error to standard out when invoking the xfrcmd. This is meant purely for
debugging purposes.
-p
{r | w | mode}
sets the permission bits for the target file. ‘r’ implies a mode of 0440, ‘w’ a mode of 0640, and mode is 1- to 4-character octal mode. The default mode is determined by the xfrcmd that is used to transfer the file.
-P
port
is the port number to contact when logging in using user@host. The default port number is 2021.
-t tries
The number of times to try a failing copy when the error indicates a transient condition. The default is 2.
-x xfrcmd
is the pftp command to be used to copy sfn to tfn. The default is to use “/opt/xrootd/utils/pftp_client”.
-z does not establish a new process group prior to executing the xfrcmd.
user user pswd
binary
setpblocksize 2097152
site
setcos cos
mkdir dirpath
●
●
●
pput localfn mssfn
quit
Transfer Command Stream When Sending a File to the MSS
Where:
user The user contained in “user@host:tfn” for the target file.
keyfn The password in the file identified by –k command line option.
cos The value specified with the –s command line option.
dirpath The path segment that needs to exist in order to store the file. There are as many mkdir commands as there are path segments to ensure that the complete target path exists in the MSS.
localfn The name of the file to be placed in the MSS as it is known on local disk.
mssfn The name of the file as it must be stored in the MSS.
user xfruser pswd
binary
setpblocksize 2097152
pget mssfn localfn
quit
Transfer Command Stream When Retrieving a File from the MSS
Where:
user The user contained in “user@host:tfn” for the target file.
keyfn The password in the file identified by –k command line option.
mssfn The name of the file as it exists in the MSS.
localfn The name of the file as it must be created on local disk.
Not Yet
Implemented
Function
Delete
unused files from the local disk.
Options
Notes
[1] The cmsd and xrootd set this
environmental variable if passed the –c
command line option.
[2] The cmsd and xrootd set this environmental variable if passed the –l command line option.
[3] The cmsd and xrootd set this environmental
variable if passed the –n command
line option.
[4] The programs cmsd and xrootd set this
environmental variable.
[5] The old mps_prep and mps_PreStage “mailto://” and “tcp://” notify options are not supported.
[6] This mode is not currently supported.
[7] The letter ‘n’ is a synonym for ‘s’.