Adding pool: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
m (7 revisions imported)
 
(5 intermediate revisions by one other user not shown)
Line 2: Line 2:
Following example is for smd experiment.
Following example is for smd experiment.


== Set up pool on data machine ==
= Set up pool on data machine =


Assume we set data pool on data machine trdata05.
Assume we set data pool on data machine trdata05 (ssh root@trdata05).


Create the pool
Create the pool (with 600GB of space)


<pre>
<pre>
Line 20: Line 20:
</pre>
</pre>


groupadd -g 4226 trek
Note: nothing in dcache prevents you from oversubscribing the space on a particular machine.  Ie, you could allocate two pools with 15TB of space on a device with just 20TB of space overall.  You need to check that yourself.
adduser -u 4226 -g trek trek


mount -o intr,rw,noac,hard,nfsvers=3 trdata00:/pnfs /pnfs
= Configuration on trdata00 =


# mkdir /pnfs/triumf.ca/data/trek
Next steps are on trdata00 (ssh root@trdata00)
mkdir: cannot create directory `/pnfs/triumf.ca/data/trek': Permission
denied


OK... follow my instructions from t2ksrm ops
First, if dcache PNFS is not mounted, mount it


/opt/d-cache/bin/chimera-cli.sh Mkdir /pnfs/triumf.ca/data/trek
<pre>
echo "data" | /opt/d-cache/bin/chimera-cli.sh Writetag
mount -o intr,rw,noac,hard,nfsvers=3 trdata00:/pnfs /pnfs
/pnfs/triumf.ca/data/trek sGroup
</pre>
echo "StoreName trekdata" | /opt/d-cache/bin/chimera-cli.sh Writetag
/pnfs/triumf.ca/data/trek OSMTemplate


# cd /pnfs/triumf.ca/data/trek/
Now create a local user, with the same UID as the experiments user account.
root@trdata00:/pnfs/triumf.ca/data/trek
# cat '.(tag)(OSMTemplate)'
StoreName trekdata
root@trdata00:/pnfs/triumf.ca/data/trek
# cat '.(tag)(sGroup)'


<pre>
groupadd -g 6016 smd
adduser -u 6016 -g smd smd
</pre>


/opt/d-cache/bin/chimera-cli.sh Chown /pnfs/triumf.ca/data/trek 4226
Now create the top level directory in dcache for smd
/opt/d-cache/bin/chimera-cli.sh Chgrp /pnfs/triumf.ca/data/trek 4226




trdata05
<pre>
/opt/d-cache/bin/chimera-cli.sh Mkdir /pnfs/triumf.ca/data/smd
echo "data" | /opt/d-cache/bin/chimera-cli.sh Writetag /pnfs/triumf.ca/data/smd sGroup
echo "StoreName smd" | /opt/d-cache/bin/chimera-cli.sh Writetag /pnfs/triumf.ca/data/smd OSMTemplate
</pre>


/opt/d-cache/bin/dcache pool create --size=600G
Check that this worked
/data/dcache/pool/trek_05_00 trek_05_00 trdata05_00PoolDomain
Created a pool in /data/dcache/pool/trek_05_00. The pool was added to
trdata05_00PoolDomain in file:/opt/d-cache//etc/layouts/trdata05.conf.


service dcache restart
<pre>
# cd /pnfs/triumf.ca/data/smd/
root@trdata00:/pnfs/triumf.ca/data/smd
# cat '.(tag)(OSMTemplate)'
StoreName smd
root@trdata00:/pnfs/triumf.ca/data/smd
# cat '.(tag)(sGroup)'
data
</pre>


Damn, data is going to wrong pool... why?
Make the directory belong to the right user


<pre>
/opt/d-cache/bin/chimera-cli.sh Chown /pnfs/triumf.ca/data/smd 6016
/opt/d-cache/bin/chimera-cli.sh Chgrp /pnfs/triumf.ca/data/smd 6016
</pre>


OK, maybe these are why all the new pools have been added to default
= Admin Configuration on trdata00 =
pool group


psu addto pgroup default lixe_03_01
Now we do the last setup with the obscure dcache interface.
psu addto pgroup default pienu_06
psu addto pgroup default lixe_03_03
psu addto pgroup default iris_05_00
psu addto pgroup default tactic_05_00
psu addto pgroup default tigress_05_00
psu addto pgroup default t2km11_05_00
psu addto pgroup default tmpPool
psu addto pgroup default t2km11_04
psu addto pgroup default trek_05_00
psu addto pgroup default titan_05_00


So try editting this and then do this:
<pre>
ssh -c blowfish -p 22223 -l admin trdata00
</pre>


"It can also be loaded into a running system with the *reload* command.  
(there is a password...)
In this chapter we will describe the commands allowed in this file. "


so modify this file and then do this:
<pre>
cd PoolManager
psu create pgroup smd-pgroup
psu create pool smd_05_00
psu addto pgroup smd-pgroup smd_05_00
psu removefrom pgroup default smd_05_00
psu create unit -store smd:data@osm
psu create ugroup smd-cond
psu addto ugroup smd-cond smd:data@osm
psu create link smd-link smd-cond
psu set link smd-link -readpref=10 -writepref=10 -cachepref=10 -p2ppread=-1
psu add link smd-link smd-pgroup
save
..
logoff
</pre>


[trdata00.triumf.ca] (local) admin > cd PoolManager
= Test =  
[trdata00.triumf.ca] (PoolManager) admin > reload
  This command destroys the current setup
  and replaces it by the setup on disk
  Please use 'reload -yes' if you really want
  to do that.
[trdata00.triumf.ca] (PoolManager) admin > reload -yes
 
 
t2km11 copies work
 
[t2km11@ladd00] dccp snapshot.png /daq/pnfs/triumf.ca/data/t2km11/test/.
122078 bytes (119 kiB) in 1 seconds (119 kiB/s)
 
pienu copy works
 
[pienu@ladd00 ~]$ dccp vf48.c /daq/pnfs/triumf.ca/data/pienu/test/.
39609 bytes (38.7 kiB) in 0 seconds
 
iris copies work...
 
but trek doesn't !  Fix!!!
[trek@ladd00 ~]$ dccp tdc1.pdf /daq/pnfs/triumf.ca/data/trek/test/.
Failed open file in the dCache.
Can't open destination file : "No write pool available for
<size=0;new=true;stored=false;sClass=trekdata:data;cClass=-;hsm=osm;accessLatency=ONLINE;retentionPolicy=REPLICA;uid=4226;onerror=default;StoreName=trekdata;alloc-size=16608;gid=100;path=/daq/pnfs/triumf.ca/data/trek/test/./tdc1.pdf;timeout=-1;store=trekdata;group=data;bfid=<Unknown>;>
 
in the linkGroup [none]"
System error: Input/output error
 
Ah ha!  The command was supposed to be
 
echo "StoreName trekdata" | /opt/d-cache/bin/chimera-cli.sh Writetag
/pnfs/triumf.ca/data/trek OSMTemplate
 
right!  Right and the copy goes into the right pool, on trdata05.
 
So we have now fixed the default pools being used and got the trek pool
working!
 
 
 
OK, here's the other steps
 
 
[trdata00.triumf.ca] (local) admin > cd PoolManager
[trdata00.triumf.ca] (PoolManager) admin >
[trdata00.triumf.ca] (PoolManager) admin >
[trdata00.triumf.ca] (PoolManager) admin > psu create pgroup trek-pgroup
[trdata00.triumf.ca] (PoolManager) admin > psu create pool trek_05_00
java.lang.IllegalArgumentException: Duplicated entry : trek_05_00
[trdata00.triumf.ca] (PoolManager) admin > psu addto pgroup trek-pgroup trek_05_00
[trdata00.triumf.ca] (PoolManager) admin > psu create unit -store trek:data@osm
[trdata00.triumf.ca] (PoolManager) admin > psu create ugroup trek-cond
[trdata00.triumf.ca] (PoolManager) admin > psu addto ugroup trek-cond
Syntax error: (2) Invalid number of arguments
Help :
psu addto ugroup <uGroup> <unit>
[trdsm
[trdata00.triumf.ca] (PoolManager) admin >
[trdata00.triumf.ca] (PoolManager) admin > psu addto ugroup trek-cond trek:data@osm
java.lang.IllegalArgumentException: trek:data@osm already member of trek-cond
[trdata00.triumf.ca] (PoolManager) admin > psu create link trek-link trek-cond
[trdata00.triumf.ca] (PoolManager) admin > psu set link trek-link -readpref=10
-writepref=10 -cachepref=10 -p2ppref=-1
[trdata00.triumf.ca] (PoolManager) admin > psu add link trek-link trek-pgroup
[trdata00.triumf.ca] (PoolManager) admin > save
[trdata00.triumf.ca] (PoolManager) admin >


Finally test if it worked from some random DAQ machine


<pre>
mkdir /daq/pnfs/triumf.ca/data/smd/test
dccp /etc/exports /daq/pnfs/triumf.ca/data/smd/test/.
</pre>


mkdir /daq/pnfs/triumf.ca/data/trek/test
Success!
[trek@ladd00 ~]$ dccp tdc_CP_run1263.pdf/daq/pnfs/triumf.ca/data/trek/test/.

Latest revision as of 16:02, 16 September 2015

Following are the necessary steps to add a new pool group (ie add a new experiment) to trdata. Following example is for smd experiment.

Set up pool on data machine

Assume we set data pool on data machine trdata05 (ssh root@trdata05).

Create the pool (with 600GB of space)

/opt/d-cache/bin/dcache pool create --size=600G /data/dcache/pool/smd_05_00 smd_05_00 trdata05_00PoolDomain

in smd_05_00 05 indicates this is trdata05 and 00 means the first data device on this machine.

the restart dcache

service dcache restart

Note: nothing in dcache prevents you from oversubscribing the space on a particular machine. Ie, you could allocate two pools with 15TB of space on a device with just 20TB of space overall. You need to check that yourself.

Configuration on trdata00

Next steps are on trdata00 (ssh root@trdata00)

First, if dcache PNFS is not mounted, mount it

mount -o intr,rw,noac,hard,nfsvers=3 trdata00:/pnfs /pnfs

Now create a local user, with the same UID as the experiments user account.

groupadd -g 6016 smd
adduser -u 6016 -g smd smd

Now create the top level directory in dcache for smd


/opt/d-cache/bin/chimera-cli.sh Mkdir /pnfs/triumf.ca/data/smd 
echo "data" | /opt/d-cache/bin/chimera-cli.sh Writetag /pnfs/triumf.ca/data/smd sGroup
echo "StoreName smd" | /opt/d-cache/bin/chimera-cli.sh Writetag /pnfs/triumf.ca/data/smd OSMTemplate

Check that this worked

# cd /pnfs/triumf.ca/data/smd/
root@trdata00:/pnfs/triumf.ca/data/smd
# cat '.(tag)(OSMTemplate)'
StoreName smd
root@trdata00:/pnfs/triumf.ca/data/smd
# cat '.(tag)(sGroup)'
data

Make the directory belong to the right user

/opt/d-cache/bin/chimera-cli.sh Chown /pnfs/triumf.ca/data/smd 6016
/opt/d-cache/bin/chimera-cli.sh Chgrp /pnfs/triumf.ca/data/smd 6016

Admin Configuration on trdata00

Now we do the last setup with the obscure dcache interface.

ssh -c blowfish -p 22223 -l admin trdata00

(there is a password...)

cd PoolManager
psu create pgroup smd-pgroup
psu create pool smd_05_00
psu addto pgroup smd-pgroup smd_05_00
psu removefrom pgroup default smd_05_00
psu create unit -store smd:data@osm
psu create ugroup smd-cond
psu addto ugroup smd-cond smd:data@osm
psu create link smd-link smd-cond
psu set link smd-link -readpref=10 -writepref=10 -cachepref=10 -p2ppread=-1
psu add link smd-link smd-pgroup
save
..
logoff

Test

Finally test if it worked from some random DAQ machine

mkdir /daq/pnfs/triumf.ca/data/smd/test
dccp /etc/exports /daq/pnfs/triumf.ca/data/smd/test/.

Success!