dcache book.
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 sres-link-group
*/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
a) add these entries to the /opt/d-cache/config/PoolManager.conf for space reservation
psu create unit -store usatlas:sres@osm
psu create ugroup sres
psu addto ugroup sres usatlas:sres@osm
psu creat pool c-1-16_1
psu creat pool c-1-16_3
psu creat pool c-1-24_1
psu creat pool c-1-29_1
psu creat pool c-2-20_1
psu creat pool c-2-21_1
psu creat pool c-2-28_1
psu creat pool c-2-30_1
psu create pgroup SresPools
psu addto pgroup SresPools c-1-16_1
psu addto pgroup SresPools c-1-16_3
psu addto pgroup SresPools c-1-24_1
psu addto pgroup SresPools c-1-29_1
psu addto pgroup SresPools c-2-20_1
psu addto pgroup SresPools c-2-21_1
psu addto pgroup SresPools c-2-28_1
psu addto pgroup SresPools c-2-30_1
psu create link sres-link any-protocol sres world-net
psu set link sres-link -readpref=10 -writepref=10 -cachepref=10 -p2ppref=-1
psu add link sres-link SresPools
psu create linkGroup sres-link-group
psu addto linkGroup sres-link-group sres-link
psu set linkGroup attribute sres-link-group HSM=none
psu set linkGroup custodialAllowed sres-link-group false
psu set linkGroup onlineAllowed sres-link-group true
psu set linkGroup nearlineAllowed sres-link-group true
psu set linkGroup replicaAllowed sres-link-group true
psu set linkGroup outputAllowed sres-link-group true
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 (head02 at AGLT2)
$ mkdir /pnfs/aglt2.org/data/sres
$cd /pnfs/aglt2.org/data/sres
$ grep "" $(cat ".(tags)()")
.(tag)(OSMTemplate):StoreName usatlas
.(tag)(sGroup):resilient
$ echo "sres">".(tag)(sGroup)"
$ echo "ONLINE" > ".(tag)(AccessLatency)"
$ echo "REPLICA" > ".(tag)(RetentionPolicy)"
$ grep "" $(cat ".(tags)()")
.(tag)(OSMTemplate):StoreName usatlas
.(tag)(sGroup):sres
.(tag)(AccessLatency):ONLINE
.(tag)(RetentionPolicy):REPLICA
NOTE: the subdir sres will inheritate the tags of its parent dir /pnfs/aglt2.org/data. so we need to change some of these tags.
4 verification about the space reservation
1) make a reservation of space with 200GB for 100 hours..
wuwj@c-1-15 /pnfs/aglt2.org/data/sres$ srm-reserve-space --debug=true --retention_policy=REPLICA --access_latency=ONLINE -lifetime=360000 -desired_size=200000000000 -guaranteed_size=200000000000 -space_desc=wutest-token srm://head01.aglt2.org:8443
Space token =40055
lifetime = null
access latency = ONLINE
retention policy = REPLICA
guaranteed size = null
total size = 200000000000
2) get the token back if you forget it
wuwj@c-1-15 /pnfs/aglt2.org/data/sres$ srm-get-space-tokens srm://head01.aglt2.org:8443
/usr/java/jdk1.5.0_10/bin/java
Space Reservation Tokens:
40046
40055
3) get the metadata of the tokens
wuwj@c-1-15 /pnfs/aglt2.org/data/sres$ srm-get-space-metadata srm://head01.aglt2.org:8443 40055
/usr/java/jdk1.5.0_10/bin/java
Space Reservation with token=40055
owner:VoGroup=usatlas3 VoRole=null
totalSize:200000000000
guaranteedSize:200000000000
unusedSize:200000000000
lifetimeAssigned:360000
lifetimeLeft:359713
accessLatency:ONLINE
retentionPolicy:REPLICA
4) copy file to dcache with your token
wuwj@c-1-15 /pnfs/aglt2.org/data/sres$ srmcp --debug=true -srm_protocol_version=2 --retention_policy=REPLICA --access_latency=ONLINE -space_token=40055 file:////tmp/dd100M1 srm://head01.aglt2.org:8443/srm/managerv2?SFN=pnfs/aglt2.org/data/sres/wutest10
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
2) check space reservation related database tables on srm server node (head01)
$psql -U srmdcache dcache
dcache=> select * from srmspace where id='40055';
id | vogroup | vorole | retentionpolicy | accesslatency | linkgroupid | sizeinbytes | creationtime | lifetime | description | state | usedspaceinbytes | allocatedspaceinbytes
-------+----------+--------+-----------------+---------------+-------------+--------------+---------------+-----------+--------------+-------+------------------+-----------------------
40055 | usatlas3 | | 2 | 1 | 10000 | 200000000000 | 1203531690058 | 360000000 | wutest-token | 0 | 104857600 | 0
(1 row)
dcache=> select * from srmspacefile where spacereservationid='40055';
id | vogroup | vorole | spacereservationid | sizeinbytes | creationtime | lifetime | pnfspath | pnfsid | state
-------+----------+--------+--------------------+-------------+---------------+----------+------------------------------------+--------------------------+-------
40056 | usatlas3 | | 40055 | 104857600 | 1203532083777 | 14399792 | /pnfs/aglt2.org/data/sres/wutest10 | 0001000000000000002E9968 | 2
(1 row)
More related tables are there in the dcache database.
3) ssh to the admin interface for management
[head01.aglt2.org] (local) admin > cd SrmSpaceManager
[head01.aglt2.org] (SrmSpaceManager) admin >
-- WenjingWu - 20 Feb 2008