Setup Atlas Space Token

background

details about why space revervation is needed, refer to srm space reservationdcache book.

steps to set up space reservation

1. enable srm space reservation in configuration files

a-1) add or uncomment or modify these entries of /opt/d-cache/config/dCacheSetup on the head node which runs srm server (head01 at AGLT2)

srmSpaceManagerEnabled=yes
srmImplicitSpaceManagerEnabled=no 
SpaceManagerDefaultRetentionPolicy=REPLICA
SpaceManagerDefaultAccessLatency=NEARLINE
SpaceManagerReserveSpaceForNonSRMTransfers=false
SpaceManagerLinkGroupAuthorizationFileName=/opt/d-cache/etc/LinkGroupAuthorization.conf

a-2) modify the following entry of /opt/d-cache/config/srm.batch on srm server node (head01)

set context -c srmSpaceManagerEnabled yes

a-3) customize the LinkGroupAuthorization.conf
$ vi /opt/d-cache/etc/LinkGroupAuthorization.conf


LinkGroup atlasmcdisk-link-group
atlas/Role=*

LinkGroup atlasdatadisk-link-group 
atlas/Role=*



This /Role= gives permission to users belonging to all VOs.. if you want to specify the space for certain VOs, do usatlas1/Role=* instead.. more information about this , refer to dcache book Vo Based Authentication

a-4) restart dcache-core service to apply the changes of configurations

b-1) uncomment and modify this entry of /opt/d-cache/config/dCacheSetup on all nodes which run gridftp doors (all pool nodes at AGLT2)
srmSpaceManagerEnabled=yes

b-2) restart dcache-core services on all gridftp door nodes

2 make up the PoolManager.conf

a) add these entries to the /opt/d-cache/config/PoolManager.conf for space reservation

psu create unit -store  usatlas:atlas@osm

psu create ugroup atlas
psu addto ugroup atlas usatlas:atlas@osm

psu create pool umfs05_1
psu create pool umfs07_1
psu create pool umfs08_1
psu create pool umfs09_1
....

psu create pgroup AtlasPools
psu addto pgroup AtlasPools umfs05_1
psu addto pgroup AtlasPools umfs07_1
psu addto pgroup AtlasPools umfs08_1
psu addto pgroup AtlasPools umfs09_1
....
psu create link atlas-link any-protocol atlas world-net
psu set link atlas-link -readpref=10 -writepref=10 -cachepref=10 -p2ppref=-1
psu add link atlas-link AtlasPools

psu create linkGroup atlasmcdisk-link-group
psu set linkGroup custodialAllowed atlasmcdisk-link-group false
psu set linkGroup replicaAllowed atlasmcdisk-link-group true
psu set linkGroup nearlineAllowed atlasmcdisk-link-group true
psu set linkGroup outputAllowed atlasmcdisk-link-group true
psu set linkGroup onlineAllowed atlasmcdisk-link-group true
psu set linkGroup attribute atlasmcdisk-link-group HSM=none
psu addto linkGroup atlasmcdisk-link-group atlas-link



b) apply the changes

[head01.aglt2.org] (local) admin > cd PoolManager
[head01.aglt2.org] (PoolManager) admin > reload -yes

3 tag the destination directories on the pnfs server

$ mkdir /pnfs/aglt2.org/atlasmcdisk
$cd /pnfs/aglt2.org/atlasmcdik

$echo "atlas">".(tag)(sGroup)"
$echo "StoreName usatlas" > ".(tag)(OSMTemplate)"
$ echo  "ONLINE" > ".(tag)(AccessLatency)"
$ echo  "REPLICA" > ".(tag)(RetentionPolicy)"

$ grep "" $(cat ".(tags)()")
.(tag)(OSMTemplate):StoreName usatlas
.(tag)(sGroup):atlas
.(tag)(AccessLatency):ONLINE
.(tag)(RetentionPolicy):REPLICA

Note: if you want to assign this directory a seperate database(this is recommended), please refer to our wiki page: https://hep.pa.msu.edu/twiki/bin/view/AGLT2/AssociateDirectoryToPools

4 Make the reservation from the admin interface

root@head01 /opt/d-cache/config# ssh -l admin -c blowfish -p 22223 localhost

    dCache Admin (VII) (user=admin)


[head01.aglt2.org] (local) admin > cd SrmSpaceManager
[head01.aglt2.org] (SrmSpaceManager) admin > reserve -vog=/atlas -vor=*  -acclat=ONLINE -retpol=REPLICA -desc=ATLASMCDISK -lgid=210000 70744055021871 "-1" 
[head01.aglt2.org] (SrmSpaceManager) admin > ls -l                                                                                                        
Reservations:
210005 voGroup:usatlas3 voRole:null linkGroupId:210000 size:7000000000000 created:Thu Apr 10 15:06:39 EDT 2008 lifetime:36000000000ms  expiration:Mon Jun 01 07:06:39 EDT 2009 descr:data16-token state:RESERVED used:6624198481544 allocated:53008 
470010 voGroup:atlas voRole:* linkGroupId:210000 size:70744055021871 created:Wed Apr 30 15:11:56 EDT 2008 lifetime:-1ms  expiration:NEVER descr:ATLASMCDISK state:RESERVED used:0 allocated:0 
470007 voGroup:atlas voRole:* linkGroupId:390027 size:96463499984500 created:Wed Apr 30 14:56:01 EDT 2008 lifetime:-1ms  expiration:NEVER descr:ATLASDATADISK state:RESERVED used:0 allocated:0 
total number of reservations: 3
total number of bytes reserved: 174207555006371

Note: 210000 is the linkgroup id , you can find this id in your database by:
root@head01 ~# psql -U srmdcache dcache
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

dcache=> select * from srmlinkgroup;
   id   |           name           | freespaceinbytes | lastupdatetime | onlineallowed | nearlineallowed | replicaallowed | outputallowed | custodialallowed | reservedspaceinbytes 
--------+--------------------------+------------------+----------------+---------------+-----------------+----------------+---------------+------------------+----------------------
 200002 | sres-link-group          |    1898375529700 |  1209653724000 |             1 |               1 |              1 |             1 |                0 |                    0
 210000 | atlasmcdisk-link-group   |   90744055021871 |  1209653724000 |             1 |               1 |              1 |             1 |                0 |       71081084380667
 390027 | atlasdatadisk-link-group |   96785622531700 |  1209653724000 |             1 |               1 |              1 |             1 |                0 |       96463499984500
(3 rows)

dcache=> 

70744055021871 is the size you assign for this space token, -1 means this token never expire.

4 verify this token with srm command

1) copy file to dcache with this token (srmcp can only recongnize the digital token number instead of its description)
wuwj@c-1-15 /pnfs/aglt2.org/data/sres$ srmcp --debug=true  -srm_protocol_version=2  --retention_policy=REPLICA --access_latency=ONLINE  -space_token=470010 file:////tmp/dd100M1  srm://head01.aglt2.org:8443/srm/managerv2?SFN=pnfs/aglt2.org/atlasmcdisk

Note: since you have associate the linkgroup which allocate this token to the dir /pnfs/aglt2.org/atlasmcdisk, so you can only write to this directory with this token...

Admin

1) watch your log file while you are doing these upwards commands on srm server nodes (head01)
root@head01 ~# tail -f /opt/d-cache/libexec/apache-tomcat-5.5.20/logs/catalina.out

-- WenjingWu - 01 May 2008
Topic revision: r10 - 08 Apr 2009, WenjingWu
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback