Setup Atlas Space Token


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)


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

LinkGroup atlasdatadisk-link-group 

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)

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

[] (local) admin > cd PoolManager
[] (PoolManager) admin > reload -yes

3 tag the destination directories on the pnfs server

$ mkdir /pnfs/
$cd /pnfs/

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

$ grep "" $(cat ".(tags)()")
.(tag)(OSMTemplate):StoreName usatlas

Note: if you want to assign this directory a seperate database(this is recommended), please refer to our wiki page:

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)

[] (local) admin > cd SrmSpaceManager
[] (SrmSpaceManager) admin > reserve -vog=/atlas -vor=*  -acclat=ONLINE -retpol=REPLICA -desc=ATLASMCDISK -lgid=210000 70744055021871 "-1" 
[] (SrmSpaceManager) admin > ls -l                                                                                                        
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)


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/$ srmcp --debug=true  -srm_protocol_version=2  --retention_policy=REPLICA --access_latency=ONLINE  -space_token=470010 file:////tmp/dd100M1  srm://

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


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 - 23:35:52 - 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