-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrucioRequest.sh
executable file
·55 lines (54 loc) · 3.36 KB
/
rucioRequest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
echo "Hello Rucio Users !"
source /cvmfs/cms.cern.ch/cmsset_default.sh # cms_env
echo "setup your VOMS-PROXY !"
voms-proxy-init -voms cms -rfc -valid 192:00
source /cvmfs/cms.cern.ch/rucio/setup.sh
export RUCIO_ACCOUNT=kjaffel # Edit your CERN UserName
echo """
=====================================================================================================
- You can then issue the command
$ rucio --help # to understand all your options.
- You can list your quota at all sites via the command
$ rucio list-account-limits $ RUCIO_ACCOUNT.
- If you do not have quota in the right place (or enough), you should ask for a quota increase at
the RSE(Rucio Storage Elements) you would like to use.
To find out who to ask, you can query the RSE attributes to identify the accounts responsible for managing quota.
$ rucio list-rse-attributes T2_UCL_BE
- know more about Rucio here: https://twiki.cern.ch/twiki/bin/view/CMSPublic/Rucio
: https://twiki.cern.ch/twiki/bin/view/CMSPublic/RucioUserDocsContainers
=====================================================================================================
"""
declare -a requested_samples=($(cat requests/rucio__1.txt | tr '\n' ' '))
#=======================================================================================
# Create a User Container
#=======================================================================================
#container='ZAsamples_ul2016_nanov8andv9'
#container='HToZATo2L2B_bbH_signals_nanov9'
#container='HToZATo2L2B_ggH_signals_nanov9'
container='AToZHTo2L2B_ggH_signals_nanov9'
rucio add-container user.kjaffel:/Analyses/$container/USER
#=======================================================================================
for smp in ${requested_samples[*]}; do
#=======================================================================================
# ! To be used when you don't have enouh quota; ask IT for approval and then later you can increase
#=======================================================================================
#rucio add-rule cms:$smp 1 T2_BE_UCL
#rucio add-rule --ask-approval cms:$smp 1 T2_BE_UCL
#=======================================================================================
# ! Add some initial datasets to the Container
#=======================================================================================
rucio attach user.kjaffel:/Analyses/$container/USER cms:$smp
done
#=======================================================================================
# ! Subscribe/Transfer the container to a site
#=======================================================================================
rucio add-rule --account=kjaffel user.kjaffel:/Analyses/$container/USER 1 T2_BE_UCL
#=======================================================================================
# ! Check the current contents of the container
#=======================================================================================
rucio list-content user.kjaffel:/Analyses/$container/USER
#=======================================================================================
# ! Check status of transfered datasets
#=======================================================================================
rucio list-rules --account=kjaffel | grep "REPLICATING"