Storage Resource Managers (SRM
s) are
middleware components whose function is to provide dynamic space
allocation and file management on shared storage components on
the Grid. SRM
s support protocol negotiation and a reliable
replication mechanism. The SRM
specification standardizes the
interface, thus allowing for a uniform access to heterogeneous
storage elements.
SRM
interface consists of the five categories of functions:
Space Management, Data Transfer, Request Status, Directory and
Permission Functions. SRM
interface utilizes Grid Security
Infrastructure (GSI
) for authentications. SRM
service is a
Web Service implementation of a published WSDL
document. Please visit SRM Working Group
Page to see the SRM
Version 1.1 and SRM
Version
2.2 protocol specification documents.
SRM
defines a protocol name SRM
, and introduces a way to
address the files stored in the SRM
managed storage by
Site URL of the format
srm://<host>:<port>/[<web service
path>?SFN=]<path>
. Examples of the Site
URLs a.k.a. SRM
URLs are:
srm://fapl110.fnal.gov:8443/srm/managerv2?SFN=//pnfs/fnal.gov/data/test/file1, srm://fapl110.fnal.gov:8443/srm/managerv1?SFN=/pnfs/fnal.gov/data/test/file2 srm://srm.cern.ch:8443/castor/cern.ch/cms/store/cmsfile23
All SRM
functions that operate on files use Site URLs
(SURLs) for file references.
There are three functions for performing data transfers in
SRM
, namely srmPrepareToGet, srmPrepareToPut and
srmCopy. These are SRM
Version 2.2 names, in SRM
Version
1.1 they were called get, put and copy, but their roles were
essentially the same. These functions take list of
sources(srmPrepareToGet), destinations(srmPrepareToPut) or
both (srmCopy). The role of the srmPrepareToGet function is
to prepare the system for the receipt of the data into the
given file names, to make sure that the system has enough
space to store the files, that the user has sufficient
privileges to create the files in the paths designated by
the SURLs. The purpose of the srmPrepareToPut function is
to prepare the data stored in files, designated by the given
SURLs , that are already a part of the system for the
network access; SRM
needs again to check that the user has
sufficient privileges to access the files in the paths
designated by the SURLs. One of the features of
thesrmPrepareToGet and srmPrepareToPut functions is that
they both support transfer protocol negotiation. This means
that in case of both of these functions client supplies a
list of supported transfer protocols and SRM
server
computes the Transfer URL in the first protocol from the
list that it supports. Depending on the implementation the
real action in the Storage System performed in response to
this invocation may range from simple SURL to TURL
translation to a Stage from Tape to Disk Cache and dynamic
selection of the transfer host and transfer protocol
depending on the protocol availability and current load on
each of the transfer server load. It is a responsibility of
the client to perform the transfer and to notify the SRM
that it is done with the files. srmCopy function performs a
copy between a local and a remote storage system, it is
given a list of source – destination URL pairs. At least one
of the URLs in each pair must be an SURL of file in the
SRM
system contacted with the srmCopy request. Second URL
can be a local or remote SURL or URL in some other
transfer protocol. In case of srmCopy the SRM
system
performs data transfer itself, without data ever flowing
though the client’s computer.
The Data Transfer functions are asynchronous, initial SRM
call leads to the start of the execution of the client’s
request, and the functions return the request statuses, that
contain unique request tokens, that can be used in
subsequent calls for periodic polling of the status of the
request. Once the SRM
completes the requests, and clients
are done with the data transfers, clients notify the system
that they are done with the files and are ready to release
the associated resources, the client notifies the system by
execution of the srmReleaseFiles in case of srmPrepareToGet
or srmPutDone in case of srmPrepareToPut. In case of
srmCopy, system knows when the transfer is competed and
resources can be released, so it requires no special
function at the end.
Clients are free to cancel the requests at any time by execution of the srmAbortFiles or srmAbortRequest.
SRM
Version 2.2 introduces a concept of space
reservation. Space reservation is a promise by the storage
system to make certain amount of storage space of certain
type available for usage for a specified period of
time. Space reservation is made using srmReserveSpace
function. In case of successful reservation, a unique name,
called space token is assigned to the reservation. Space
token can be used during the transfer operations to tell the
system to put the files being manipulated or transferred
into an associated space reservation . A storage system
ensures that the reserved amount of the disk space is indeed
available, thus providing a guarantee that a client does not
run out of space until all space promised by the reservation
has been used. When files are deleted, the space is returned
to the space reservation.
A space reservation has a property called retention policy. Possible values of retention policy are Replica, Output and Custodial. The retention policy describes the quality of the storage service that will be provided for the data (files) stored in this space reservation. Replica corresponds to the lowest quality of the service, usually associated with storing a single copy of each file on the disk. Custodial is the highest quality service, usually interpreted as storage of the data on Tape. WLCG has decided not to use Output retention policy in its data grid. Output is an intermediate retention policy is stronger than Replica and weaker than Custodial, and in dCache Output retention policy will possibly be used for files managed by Resilient Manager, which will make several internal copies of each file, distributed on distinct instances of hardware. Once a file is written into a given space reservation, it inherits the reservation’s retention policy.
Another property of the space reservation is called access latency. The two values allowed are Nearline and Online. Nearline means that the data stored in this reservation are allowed to be stored in such a way that retrieving them might require storage system to perform additional preparatory steps (staging data from tape to a disk cache for example). Online means that data is readily available and it will not take long to start reading the date. In case of dCache Online means that there will always be a copy of the file on disk, while Nearline does not provide such guarantee. As with retention policy, once a file is written into a given space reservation, it inherits the reservation’s access latency.
DCache however only manages write space, i.e. only space on
disk can be reserved and only for write operations. Once
files are migrated to tape, and if no copy is required on
disk, space used by these files is returned back into space
reservation. When files are read back from tape and cached
on disk, they are not counted as part of any space. SRM
Space reservation can be assigned a non-unique description,
then the description cab be used in the future to discover
all space reservation with a given description.
Properties of the SRM
Space Reservations can be discovered
using SrmGetSpaceMetadata function. Space Reservations might
be released with srmReleaseSpace. For a complete description
of the available functions please see SRM
Version 2.2 Specification.
SRM
Version 2.2 srmPrepareToPut and srmCopy pull mode
transfers allow the user to specify a space reservation
token or a retention policy and an access latency. In the
protocol, any of these values are optional, and it is up to
the implementation to decide what to do, if these properties
are not specified. The specification does however require
that if a space reservation is given, then any access
latency or retention policy specified must match the same
properties of the space reservation.
Starting from SRM
Version 2.2, interface provides a
complete set of the directory management functions. These
are srmLs, srmRm, srmMkDir, srmRmDir and srmMv.
SRM
Version 2.2 support the following three space
permission functions, srmGetPermission, srmCheckPermission
and srmSetPermission. dCache contains a rudimentary
implementation of these functions that mostly allow setting
and checking of the Unix file permission.
dCache SRM
is implemented as Web Service Interface running
under Apache Tomcat application server and Axis Web Services
engine. This service starts a dCache SRM
domain with a main
SRM
cell and a number of other cells SRM
service relies
on. These are SrmSpaceManager, PinManager,
RemoteGsiftpCopyManager, etc. Of these services only SRM
and
SrmSpaceManager require special configuration.
dCache 1.8 PoolManager
supports new type of objects
called LinkGroups. Each link group corresponds to a number
of dCache pools in the following way: LinkGroup is a
collection of the Links, each of which is a collection of
the PoolGroups associated (Linked, hence a name “Link”) with
a set of the Pool Selection Units or PSUs. Each link group
knows about its available size, which is a sum of all
available sizes in all the pools included in this link
group. In addition link group has 5 boolean properties
called replicaAllowed, outputAllowed, custodialAllowed,
onlineAllowed and nearlineAllowed, the values of these
properties (true or false) can be configured in
PoolManager.conf
.
In dCache 1.8 each SRM
Space Reservation is made against
the total available disk space of a particular link
group. The total space in dCache that can be reserved is the
sum of the available sizes of all Link Groups. If dCache is
configured correctly each byte of disk space, that can be
reserved, belongs to one and only one Link Group. Therefore
it is important to make sure that no pool belongs to more
than one pool group, no Pool Group belongs to more than one
Link and no Link belongs to more than one LinkGroup.
Files written into a space made within a particular link group will end up on one of the pools referred to by this link group. The difference between the Link Group’s available space and the sum of all the current space reservation sizes is the available space in the link group.
In dCache, if a space reservation is specified, the file will be stored in it (assuming the user has permission to do so in the name space).
If the reservation token is not specified, and implicit
space reservation is enabled, then a space reservation will
be performed implicitly for each SRM
v1.1 and SRM
2.2
srmPrepareToPut or srmCopy in pull mode. If an Access
Latency and a Retention Policy are specified, the user
defined retention policy and default access latency. If the
user has not specified Access Latency or Retention Policy
(or if SRM
v1.1 is used) , the system will attempt to
extract special tags (not surprisingly called
“AccessLatency” and “RetentionPolicy”) from PNFS namespace
from the directory to which file is being written. If the
tags are present, then their values will determine the
default Access Latency or Retention Policy that will be used
for implicit space reservations. If the tags are not
present, then system wide defaults will be used. If no
implicit space reservation can be made, the transfer will
fail. (Note: some clients also have default values, which
are used when not explicitly specified by the user. I this
case server side defaults will have no effect. )
If the implicit space reservation is not enabled in dCache 1.8 the pools in the link groups will be excluded from consideration and only the remaining pools will be considered to be the candidates for storing the incoming data, and classical pool selection mechanism will be used. If the space reservation is not used and no LinkGroups are specified, the system behavior will be exactly the same as in dCache 1.7.
When SRM
Space Reservation request is executed, its
parameters, such as reservation size, lifetime, access
latency and retention policy as well as user’s Virtual
Organization (VO) membership information is forwarded to the
SRM
SpaceManager.
Space Manager uses a special file for listing all the Virtual Organizations (VOs) and all the VO Roles that are permitted to make reservations in the given link group. List of the allowed VOs and VO Roles, together with the total available space and replicaAllowed, outputAllowed, custodialAllowed, onlineAllowed and nearlineAllowed properties of the group is than matched against the information from the user request in order to determine if a given space reservation can be made in particular link group. Once a space reservation is created, no access control is performed, any user can attempt to store the files in this space reservation, provided he or she knows the exact space token.