########################################################### xrootd.fslib /opt/xrootd/lib/libXrdxCastor2Ofs.so xrootd.async off ########################################################### xrootd.seclib /opt/xrootd/lib/libXrdSec.so sec.protocol /opt/xrootd/lib unix ########################################################### all.export / nolock all.trace none ofs.trace none ########################################################### xrd.port 1094 ofs.authlib /opt/xrootd/lib/libXrdxCastor2ServerAcc.so ofs.authorize ########################################################### xcastor2.fs / xcastor2.capability true xcastor2.publickey /opt/xrootd/keys/pkey.pem xcastor2.ratelimiter true ########################################################### xcastor2.proc /var/log/xroot/server/ xcastor2.procuser root@lxbra0301 xcastor2.procuser root@lxbra0302 ###########################################################
############################################################################ xcastor2.mapcerncertificates true xcastor2.gridmapfile /etc/grid-security/grid-mapfile xcastor2.vomsmapfile /etc/grid-security/voms-mapfile # virtual roles xcastor2.role apeters :root: ############################################################################ xrootd.seclib /opt/xrootd/lib/libXrdSec.so # UNIX authentication sec.protocol /opt/xrootd/lib/ unix # SSL authentication sec.protocol /opt/xrootd/lib ssl -d:10 # KRB authentication sec.protocol /opt/xrootd/lib krb5 host/<host>@CERN.CH # you can tie the authentication methods to cern host reg expr. sec.protbind * only krb5 ssl # f.e. sec.protbind lxfsrc* only krb5 ############################################################################Namespace Mapping
############################################################################ xcastor2.nsmap / /Standard xrootd configuration parameters
############################################################################ # the Ofs plugin xrootd.fslib /opt/xrootd/lib/libXrdxCastor2Fs.so xrd.async off xrd.sched mint 16 maxt 1024 idle 128 all.export / all.role manager # currently we have two xCastor2 manager nodes, which are loadbalanced as 'x2castor.cern.ch' all.manager lxbra0301.cern.ch 2131 all.manager lxbra0302.cern.ch 2131 # the file descriptor limits oss.fdlimit 16384 32768 ############################################################################Stager Policy Interface
############################################################################ # note: syntax is <stagerhost>::<serviceclass> schedall|schedread|schedwrite # [,nohsm][,cache] xcastor2.stagerpolicy castorcms:default schedall xcastor2.stagerpolicy castoralice::default schedwrite,nohsm xcastor2.stagerpolicy castorcert1::xrootd schedwrite,nohsm xcastor2.stagerpolicy castorcert2::xrootd schedwrite,nohsm,cache # directory to cache locations xcastor2.locationcache /pool ############################################################################Default Stager Map
############################################################################ # note: the directories have to be terminated with a trailing '/' # the value can be <stagehost> or <stagehost>::<serviceclass> xcastor2.stagermap /castor/cern.ch/alice/ castoralice xcastor2.stagermap /castor/cern.ch/atlas/ castoratlas xcastor2.stagermap /castor/cern.ch/cms/ castorcms xcastor2.stagermap /castor/cern.ch/lhcb/ castorlhcb xcastor2.stagermap /castor/cern.ch/dev/ castorcert2::xrootd xcastor2.stagermap default castorpublicThe mapping is done from namespace directories to stager/svc class pairs.
############################################################################ #everything under atlas goes to t3 stager xcastor2.stagermap /castor/cern.ch/atlas/ cernt3::default #everything under atlas for group 1337 tries first the t3 stager, then the t0 stager xcastor2.stagermap /castor/cern.ch/atlas/::gid:1337 cernt3::default,castoratlas::atlasuser ############################################################################ # ALL people cannot stage in t3 xcastor2.stagerpolicy cernt3::default schedwrite,cache,nohsm,nostage # BUT group 1337 can stage xcastor2.stagerpolicy cernt3::default::gid:1337 schedwrite,cache,nohsm # group 1337 can read from the t0 pool, but only via scheduling xcastor2.stagerpolicy castoratlas::atlasuser::gid:1337 schedall,nohsm,nostage,ronly ############################################################################There is also the possiblity to supply wildcards in the stagermap entries. A wildcard in the service class means, that all user specified service classes are also ccepted. Some for stager host, so the pass all policy is therefore:
xcastor2.stagemap / *::*
x2cp <local-file> /castor/cern.chas:
xrdcp <local-file> root://x2castor.cern.ch//castor/cern.ch/..... -ODstageHost=<stagehost>&svcClass=<svcClass>.For ROOT this could be negotiated to automatically append the query tags for '/castor/' URLs in TXNetFile in one of the next releases. Otherwise the default mapping on server side will probably cover the standard cases.
xcastor2.stagermap uid:12345 castoralice xcastor2.stagermap gid:1338 castorcms::xrootd
xcastor2fs.stagermap #key# #value#
xcastor2fs.stagerpolicy #key# #value##key# can be:
############################################################################ # specifies the xrootd port on disk servers xcastor2.targetport 1094 # issues token/capabilities to do authorization on the disk servers xcastor2.capability true # location of the private key for capabilities (signature private key) xcastor2.privatekey /opt/xrootd/keys/key.pem # location of the private key for a specific stager xcastor2.privatekey /opt/xrootd/keys/key-stager1.pem castoralice xcastor2.privatekey /opt/xrootd/keys/key-stager2.pem castorcms # validity of issued tokens - synchronize the clocks! xcastor2.tokenlocktime 10 # location of the proc interface to see access statistics xcastor2.proc /var/log/xroot/manager1094 ############################################################################Multi Service Configuration and current Manager deployment
Each disk server has a predefined number of transfer slots and target rate at which transfers are running. The transfers are PUSHs from source to destination and are executed by a scheduled thread running inside the xrootd server. Transfers run only, if the client has source and destination open. If the client disconnects running transfers will stop and go into error status. A daemon restart interrupts all running transfers and leads to a transfer error without possibility for recovery (sync implementation).
The OFS plug-in running on disk servers supports the following new configuration directives (given are the defaults – no change of configuration necessary to get these values):
xcastor2.thirdparty yes xcastor2.thirdparty.slots 5 xcastor2.thirdparty.slotrate 10 xcastor2.thirdparty.statedirectory /var/log/xroot/server/transfer
An executed transfer creates typically 4 files in the state directory:
# the transfer definition /var/log/xroot/server/transfer1/fff35a24-449b-11de-9e04-000ffe9c324f # the transfer log file /var/log/xroot/server/transfer1/fff35a24-449b-11de-9e04-000ffe9c324f.log # the progress bar file ( only source side) /var/log/xroot/server/transfer1/fff35a24-449b-11de-9e04-000ffe9c324f.progress # the state of a transfer in (int) format /var/log/xroot/server/transfer1/fff35a24-449b-11de-9e04-000ffe9c324f.stateThese state file are automatically removed after 24 hours.
# set ten slots x2proc thirdpartycopyslots 10 # set a rate of 25 Mb/s x2proc thirdpartycopyslotrate 25
xrd3cp root://<source-host>//<source> root://<dest-host//<dest> usage: xrd3cp [-c] [-d] [-D] [-v] [-l <uuid>] [-s <uuid>] <SOURCE-URL> <DST-URL> -d enable xrd3cp debug -D enable XrdClient debug -v verbose details about the transfer -n disable the progress bar -l <uuid> retrieve transfer logs from both ends for transfer <uuid> -s <uuid> retrieve transfer status from both ends for transfer <uuid>
Write (scheduled through Castor) : 15 files/s [ LFS scheduling limit ] Read with castor bypass (krb5 authenticated) : 30 files/s [ krb5 replay cache limited ] Read with castor bypass (unix authenticated) : 480 files/s [ limited by single nameserver instance ] after reconfiguration of NS/strager > 700 (not yet limited, client limited) Read with castor bypass (ssl+sessions) : 430 files/s Read with castor prep2get(unix authenticated) : 300 files/s Read with castor scheduling(unix authneticated) : 15 files/s [ LFS scheduling limit ]
Write (scheduled through Castor) : 2.7 sec per open Read with castor bypass(unix authenticated) : 0.6 sec per open Read with castor prep2get(unix authenticated) : 1.1 sec per open Read with castor scheduling(unix authenticated) : 9.5 sec per open
Write (scheduled through Castor) : 500 ms per open Read with castor bypass (unix) : 14 ms per open (13ms Cns_stat) Read with castor bypass (x509) : 14 ms per open (13ms Cns_stat) Read with castor prep2get : 80 ms per open Read with castor scheduling : 510 ms per open
Unix 44ms krb5 53ms ssl 66ms (first authentication to establish session) ssl* 49ms (using session mechanism)
wassh -l root -c c2itdc/diskonly '/opt/xrootd/bin/x2proc thirdpartycopyslotrate 1This should result in a transfer reduction to of 6 x 5 x 1 Mb/s = 30 Mb/s
/opt/xrootd/etc/keys/pkey.pem
/opt/xrootd/etc/keys/key.pem
rm -rf key.pem cert.pem certreq.pem pkey.pem && openssl genrsa -rand 12938467 -out key.pem 512 '\' openssl req -new -inform PEM -key key.pem -outform PEM -out certreq.pem && '\' openssl x509 -days 3650 -signkey key.pem -in certreq.pem -req -out cert.pem && '\' openssl x509 -pubkey -in cert.pem > pkey.pem && rm -rf cert.pem certreq.pem && '\' echo "Your new keypair is private-key: ${PWD}/key.pem public-key: ${PWD}/pkey.pem"
############################################################################ xcastor2.nsmap / / xcastor2.fs / # -- load ALICE authorization library xcastor2.authlib /opt/xrootd/lib/libXrdAliceTokenAcc.so # -- enforce authorization in xcastor2fs plugin xcastor2.authorize 1 # -- some special hosts of the DAQ system can access without authorization, # they are specified via exact, ??, * or range matches alicetokenacc.noauthzhost alicedaq[01-10].cern.ch alicetokenacc.noauthzhost alicedaq*.cern.ch alicetokenacc.noauthzhost alicedaq??.cern.ch alicetokenacc.noauthzhost alicedaq01.cern.ch # -- ALICE acts always as user 'aliprod' in Castor # all users are mapped to aliprod xcastor2.role * :aliprod: ############################################################################ xrootd.seclib /opt/xrootd/lib/libXrdSec.so # Only UNIX authentication ! - No Krb5 ! sec.protocol /opt/xrootd/lib/ unix ############################################################################ sec.protbind * only unix ############################################################################If the storage defines a mapping e.g. the storage manages an internal prefix, the authorization plugin needs an additional parameter to 'undo' the prefix, e.g.:
xcastor2.nsmap / /castor/cern.ch/alice/storage/ alicetokenacc.truncateprefix /castor/cern.ch/alice/storage
################################################################# # --------------------------------------------------------------- # our exported namespace all.export /castor # --------------------------------------------------------------- # we are a global redirector all.role meta manager # --------------------------------------------------------------- # if we want debug .... #all.trace all debug # --------------------------------------------------------------- # we are the global redirector hosts all.meta lxbra0301.cern.ch all.meta lxbra0302.cern.ch # --------------------------------------------------------------- # use libXrdOfs to enable global redirection xrootd.fslib /opt/xrootd/lib/libXrdOfs.so # --------------------------------------------------------------- # we use a fast startup and wait atleast 500ms for fast responses cms.delay startup 5 hold 500 # --------------------------------------------------------------- #################################################################You can deploy redundant global redirectors. The attaching manager nodes have to reference the global redirectors via entries in there configuration file like:
all.manager meta <global redirector name>:2131There is currently one restriction for the setup. Manager nodes subscribing to global redirectors are advertised to run on port 1094. Therefore don't change the manager node's xrootd port.
xcastor2.setfilesizeonclose trueThe manager configuration file has to allow ALL disk servers to authenticate with UNIX authentication. You can specify hostlists with wildcards
sec.protbind lxc2disk* unix
xcastor2.procuser root@managernode1 xcastor2.procuser root@managernode2Manager Configuration Example:
xcastor2.locationcache /var/tmp/xroot-locationcache xcastor2.stagerpolicy castorcms::* schedwrite,nohsm,cache
<span id="hidsubpartcontentdiscussion">xcastor2.privatekey /opt/xrootd/keys/key-atlas.pem castoratlas xcastor2.privatekey /opt/xrootd/keys/key-cms.pem castorcms xcastor2.privatekey /opt/xrootd/keys/key-t3.pem cernt3 </span>If no stager is given in the configuration line, the key is assumed to be a default key which has to be used if no other key definition matches.
xcastor2.posc trueA prerequisite for this to work is, that manager nodes allow 'unix' authentication for disk server nodes. The disk server nodes callback to the manager to do a cleanup of an interrupted transfer under the ID of the initiating client. The unix authentication is allowed by adding as the first protbind rule
sec.protbind lxfs*.cern.ch only unixThere is an additional security mechanism in place: only hosts which recieved previously a redirection can cleanup a file in the namespace.
xrdcp /tmp/myfile root://<stagerhost>//castor/cern.ch/.....Upload a file to a xCastor2 pool providing manual stager/svcclass mapping:
xrdcp /tmp/myfile root://<stagerhost>//castor/cern.ch/..... -ODstageHost=<stagerHost>\&svcClass=<svcClass>Download a file from a xCastor2 pool using automatic stager/svcclass mapping:
xrdcp root://<stagerhost>//castor/cern.ch/..... /tmp/myfileDownload a file from a xCastor2 pool using manual stager/svcclass mapping:
xrdcp root://<stagerhost>//castor/cern.ch/..... /tmp/myfile -OSstageHost=<stagerHost>\&svcClass=<svcClass>To debug the sequence of redirection, add the '-d' flag at the end of the command line.
xrdcp /tmp/myfile root://<stagerhost>//castor/cern.ch/..... -ODmode=444This example set's the permissions to read-only for all.
# stat a directory xrd castorcms stat /castor/cern.ch/cms # stat a file - it also returns if the file is staged in the mode bits xrd castorcms stat /castor/cern.ch/cms/higgs.root # check if a file is online xrd castorcms isfileonline /castor/cern.ch/cms/higgs.root # create a directory xrd castorcms mkdir /castor/cern.ch/cms/newdir # delete a file xrd castorcms rm /castor/cern.ch/cms/higgs.root # change permissions ---- Attention: it is impossible to set a file world writable via xrd chmod xrd castorcms chmod /castor/cern.ch/cms/higgs.root 4 # check if a file is staged xrd castorcms isfileonline /castor/cern.ch/cms/higgs.rootFor stager deletions two additional opaque flags can be specified for an 'xrd rm' call:
# remove a file from the associated stager but leave in the namespace xrd rm /castor/cern.ch/cms/higgs.root?stagerm=1&nodelete # remove a file from teh associated stager and force removal from the namespace xrd rm /castor/cern.ch/cms/higgs.root?stagerm=1 # remove a file from the namespace - the physical space on a pool get's freed later asynchronous xrd rm /castor/cern.ch/cms/higgs.rootTo free space immedeatly, the 1st or 2nd example should be used.
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-CVS20080517_pext-8.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xcastor2fs-1.0.2-12.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-castormon-1.0.2-3.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-service-simple-1.0.3-3.noarch.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-20090306.1107.x86_64.rpm /afs/cern.ch/project/dm/xCastor2/rpms/xrootd-debuginfo-20090306.1107-1.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xcastor2fs-1.0.5-1.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xcastor2util-1.0.5-1.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-alicetokenacc-1.0.0-1.x86_64.rpm /afs/cern.ch/project/dm/xCastor2/rpms/tokenauthz-1.1.5-1.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-20090306.1107-2.x86_64.rpm /afs/cern.ch/project/dm/xCastor2/rpms/xrootd-debuginfo-20090306.1107-2.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xcastor2fs-1.0.6-11.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xcastor2util-1.0.6-3.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-alicetokenacc-1.1.0-1.x86_64.rpm /afs/cern.ch/project/dm/xCastor2/rpms/tokenauthz-1.1.5-1.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-20090306.1107-2.x86_64.rpm /afs/cern.ch/project/dm/xCastor2/rpms/xrootd-debuginfo-20090306.1107-2.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xcastor2fs-1.0.8-2.x86_64.rpm /afs/cern.ch/project/dm/xCastor2/rpms/xrootd-libtransfermanager-1.0.1-2.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xcastor2util-1.0.6-3.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xrd3cp-1.0.0-2.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-alicetokenacc-1.1.0-1.x86_64.rpm /afs/cern.ch/project/dm/xCastor2/rpms/tokenauthz-1.1.5-1.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-20090629.1236-1.x86_64.rpm /afs/cern.ch/project/dm/xCastor2/rpms/xrootd-debuginfo-20090629.1236-1.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xcastor2fs-1.0.9-5.x86_64.rpm /afs/cern.ch/project/dm/xCastor2/rpms/xrootd-libtransfermanager-1.0.1-4.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xcastor2util-1.0.6-3.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xrd3cp-1.0.0-4.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-alicetokenacc-1.1.0-1.x86_64.rpm /afs/cern.ch/project/dm/xCastor2/rpms/tokenauthz-1.1.5-1.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-secssl-3.0.4-5.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-20090629.1236-9.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xcastor2fs-1.0.9-15.x86_64.rpm /afs/cern.ch/project/dm/xCastor2/rpms/xrootd-libtransfermanager-1.0.1-6.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xcastor2util-1.0.6-3.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-xrd3cp-1.0.0-4.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-alicetokenacc-1.1.0-3.x86_64.rpm /afs/cern.ch/project/dm/xCastor2/rpms/tokenauthz-1.1.5-1.x86_64.rpm
/afs/cern.ch/project/dm/xCastor2/rpms/xrootd-secssl-4.4.0-0.x86_64.rpm
xrootd-server-3.0.2 xrootd-devel-3.0.2
xrootd-xcastor2fs-1.0.9-18 xrootd-libtransfermanager-1.0.3-0
* SLC4http://project-arda-dev.web.cern.ch/project-arda-dev/xrootd/rpms/slc4/tokenauthz-1.1.5-1.x86_64.rpm
* SLC5http://project-arda-dev.web.cern.ch/project-arda-dev/xrootd/rpms/slc5/tokenauthz-1.1.5-1.x86_64.rpm
xrootd-server-3.0.4 xrootd-devel-3.0.4
xrootd-xcastor2fs_2111-1.1.0-1 xrootd-libtransfermanager-1.0.4-0
xrootd-server-3.0.4 xrootd-devel-3.0.4
xrootd-xcastor2fs_2112-1.1.0-1 xrootd-libtransfermanager-1.0.4-0
* SLC4http://project-arda-dev.web.cern.ch/project-arda-dev/xrootd/rpms/slc4/tokenauthz-1.1.5-1.x86_64.rpm
* SLC5http://project-arda-dev.web.cern.ch/project-arda-dev/xrootd/rpms/slc5/tokenauthz-1.1.5-1.x86_64.rpm
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
![]() |
thirdparty.png | r1 | manage | 40.4 K | 2009-05-27 - 15:47 | AndreasPeters | |
![]() |
thirdparty1.png | r1 | manage | 36.7 K | 2009-05-27 - 15:50 | AndreasPeters | |
![]() |
thirdparty2.png | r1 | manage | 4.5 K | 2009-05-27 - 18:00 | AndreasPeters | |
![]() |
thirdparty3.png | r1 | manage | 25.3 K | 2009-06-02 - 11:20 | AndreasPeters | |
![]() |
thirdparty4.png | r1 | manage | 23.9 K | 2009-06-02 - 11:22 | AndreasPeters | |
![]() |
thirdparty5.png | r1 | manage | 5.1 K | 2009-06-02 - 14:35 | AndreasPeters | |
![]() |
xCastor2-FIO.pdf | r1 | manage | 137.0 K | 2008-10-15 - 12:12 | AndreasPeters | Presentation about Deployment Issues for xCastor2 (morning meeting) |
![]() |
xCastor2.gif | r1 | manage | 66.8 K | 2008-09-18 - 12:34 | AndreasPeters | |
![]() |
xrd.example | r5 r4 r3 r2 r1 | manage | 2.3 K | 2012-02-17 - 14:31 | AndreasPeters | Manager Configuration File Template |
![]() |
xrootd-release-notes-2.1.10.txt | r3 r2 r1 | manage | 28.9 K | 2011-03-10 - 17:10 | AndreasPeters | xrootd release notes v2.1.10 |
![]() |
xrootd-release-notes-2.1.11.txt | r7 r6 r5 r4 r3 | manage | 30.5 K | 2011-08-01 - 11:22 | AndreasPeters | xrootd release notes v2.1.11 |
![]() |
xrootd-release-notes-2.1.11_12.txt | r2 r1 | manage | 31.3 K | 2012-02-17 - 14:40 | AndreasPeters | xrootd release notes v2.1.11/12 |
![]() |
xrootd-release-notes-2.1.8-10.txt | r1 | manage | 18.0 K | 2010-01-11 - 10:14 | UnknownUser | xrootd release notes v2.1.8-10 |
![]() |
xrootd-release-notes-2.1.8-2.txt | r4 r3 r2 r1 | manage | 1.9 K | 2008-10-09 - 10:59 | AndreasPeters | xrootd release notes v2.1.8-2 |
![]() |
xrootd-release-notes-2.1.8-6.txt | r2 r1 | manage | 4.7 K | 2009-03-10 - 11:56 | AndreasPeters | xrootd release notes v2.1.8-6 |
![]() |
xrootd-release-notes-2.1.8-7.txt | r9 r8 r7 r6 r5 | manage | 10.3 K | 2009-06-02 - 11:19 | AndreasPeters | |
![]() |
xrootd-release-notes-2.1.8-8.txt | r1 | manage | 13.0 K | 2009-06-08 - 16:46 | AndreasPeters | xrootd release notes v2.1.8-8 |
![]() |
xrootd-release-notes-2.1.8-p6.txt | r1 | manage | 2.4 K | 2009-02-12 - 10:06 | AndreasPeters | Release Notes for the 2.1.8-6 pre-release |
![]() |
xrootd-release-notes-2.1.9.txt | r22 r21 r20 r19 r18 | manage | 25.4 K | 2010-10-21 - 03:52 | AndreasPeters | xrootd release notes v2.1.9 |