How a associate a directory to certain pools

user case: we need to designate certain pools for sc07,which means when we write data to a certain directory, data will always go to the associated pools..we do this as follows:

1. create a special directory on the pnfs server(head02 in our case,we name the directory as /pnfs/aglt2.org/sc07data)..

root@head02 ~#source /usr/etc/pnfsSetup
root@head02 ~#export PATH=$PATH:/opt/pnfs/tools
root@head02 ~#mdb create data4 /opt/pnfsdb/pnfs/databases/data4 (we already have admin, data1,data2, data3)
root@head02 ~#touch /opt/pnfsdb/pnfs/databases/data4
root@head02 ~#mdb update
root@head02 ~#mdb show
  ID   Name         Type    Status       Path  
 ---------------------------------------------- 
   0    admin         r     enabled (r)   /opt/pnfsdb/pnfs/databases/admin
   1    data1         r     enabled (r)   /opt/pnfsdb/pnfs/databases/data1
   2    data2         r     enabled (r)   /opt/pnfsdb/pnfs/databases/data2
   3    data3         r     enabled (r)   /opt/pnfsdb/pnfs/databases/data3
   4    data4         r     enabled (r)   /opt/pnfsdb/pnfs/databases/data4
root@head02 ~# cd /pnfs/aglt2.org/
root@head02 ~#mkdir '.(4)(sc07data)'             (4 is the ID for /opt/pnfsdb/pnfs/databases/data4)
root@head02 ~#/opt/pnfs/tools/sclient getroot ${shmkey} 0
root@head02 ~#/opt/pnfs/tools/sclient getroot ${shmkey} 4 0000000000000000000010E0  (0000000000000000000010E0 is get from the previous command)
root@head02 ~#cd sc07data/
root@head02 ~#echo 'StoreName usatlas'>'.(tag)(OSMTemplate)'
root@head02 ~#echo 'sc07'>'.(tag)(sGroup)'
root@head02 ~#cat '.(tag)(OSMTemplate)'    (check the storage class is correctly set)
root@head02 ~#cat '.(tag)(sGroup)'
root@head02 ~#chmod 777 /pnfs/aglt2.org/sc07data  (make sure of the permission of the directory)
root@head02 ~#

2. make configurations on the PoolManager (in our case, on head01 /opt/d-cache/config/PoolManager.conf)

2.1 add these lines to PoolManager.conf

##added for sc07
psu create unit -store   usatlas:sc07@osm
psu create ugroup sc07 
psu addto ugroup sc07 usatlas:sc07@osm
##add pools 
psu create pool umfs07_1
psu create pool umfs07_2
psu create pool umfs07_3
psu create pool umfs07_4
psu create pool umfs09_1
psu create pool umfs09_2
psu create pool umfs09_3
psu create pool umfs09_4
psu create pool umfs10_1
psu create pool umfs10_2
psu create pool umfs10_3
psu create pool umfs10_4
psu create pool umfs11_1
psu create pool umfs11_2
psu create pool umfs11_3
psu create pool umfs11_4
##add pools to a group
psu create pgroup sc07pools
psu addto pgroup sc07pools umfs07_1
psu addto pgroup sc07pools umfs07_2
psu addto pgroup sc07pools umfs07_3
psu addto pgroup sc07pools umfs07_4
psu addto pgroup sc07pools umfs09_1
psu addto pgroup sc07pools umfs09_2
psu addto pgroup sc07pools umfs09_3
psu addto pgroup sc07pools umfs09_4
psu addto pgroup sc07pools umfs10_1
psu addto pgroup sc07pools umfs10_2
psu addto pgroup sc07pools umfs10_3
psu addto pgroup sc07pools umfs10_4
psu addto pgroup sc07pools umfs11_1
psu addto pgroup sc07pools umfs11_2
psu addto pgroup sc07pools umfs11_3
psu addto pgroup sc07pools umfs11_4
### create link to associate pool with directory
psu create link sc07-link any-protocol sc07 world-net
psu set link sc07-link -readpref=10 -writepref=10 -cachepref=10 -p2ppref=-1
psu add link sc07-link sc07pools
##any-protocol and world-net are tow units: you should have them like this
##psu create unit -net    0.0.0.0/255.255.255.255
##psu create unit -net    0.0.0.0/0.0.0.0
##psu create unit -protocol */*
##psu create ugroup any-protocol
##psu addto ugroup any-protocol */*
##psu create ugroup world-net
##psu addto ugroup world-net 0.0.0.0/0.0.0.0

2.2 restart dcache-core service

root@head01 /opt/d-cache/config#service dcache-core restart

3 test

write some file to /pnfs/aglt2.org/sc07data and check if this file is physically stored on the associated pools.
wuwj@c-1-15 /pnfs/aglt2.org/sc07data$ dccp -d 2 /tmp/hosta /pnfs/aglt2.org/sc07data/test8 ( you could do this from any dcache client)
root@head01 /opt/d-cache/config# ssh -l admin -c blowfish -p 22223 localhost
admin@localhost's password: 

    dCache Admin (VII) (user=admin)


(local) admin > cd PnfsManager
(PnfsManager) admin > pnfsidof /pnfs/aglt2.org/sc07data/test8
000400000000000000001240
(PnfsManager) admin > cacheinfoof 000400000000000000001240
 umfs10_4
(PnfsManager) admin > 

-- WenjingWu - 14 Nov 2007
Topic revision: r7 - 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