progetti:icarus:data
Differences
This shows you the differences between two versions of the page.
| progetti:icarus:data [2023/11/24 08:36] – created tenti@infn.it | progetti:icarus:data [2025/10/23 14:48] (current) – [Personal Certificate and VO Enrollment] vpia@infn.it | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Data handling at CNAF ====== | ||
| + | ==== Personal Certificate and VO Enrollment ==== | ||
| + | To read and write the storage areas using [[https:// | ||
| + | Once you have a valid certificate, | ||
| + | |||
| + | ==== Read/Write storage areas ==== | ||
| + | Once enrolled, you need create a proxy. Instructions on how to create it are [[https:// | ||
| + | |||
| + | The usefull tools to handle files are: | ||
| + | * **gfal-ls**: | ||
| + | * **gfal-copy**: | ||
| + | * **gfal-rm**: | ||
| + | * **gfal-mkdir**: | ||
| + | Detailed information about **gfal utils** can be found [[https:// | ||
| + | |||
| + | ==== Create proxy with fermilab VOMS extensions ==== | ||
| + | Being // | ||
| + | |||
| + | source / | ||
| + | setup cigetcert | ||
| + | cigetcert -i 'Fermi National Accelerator Laboratory' | ||
| + | voms-proxy-init -noregen -rfc -voms ' | ||
| + | |||
| + | or in alternative: | ||
| + | |||
| + | kx509 | ||
| + | voms-proxy-init -noregen -rfc -voms ' | ||
| + | |||
| + | ==== Samweb ==== | ||
| + | It is possible to use samweb at CNAF. First create a proxy with fermilab VOMS extensions, then: | ||
| + | |||
| + | source / | ||
| + | setup fife_utils | ||
| + | |||
| + | In the following links to webpage with usefull info: | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ==== Locate a file ==== | ||
| + | To locate a file which filename is // | ||
| + | |||
| + | filename=" | ||
| + | md5=$(echo -n " | ||
| + | ls -lrt / | ||
| + | |||
| + | ==== Example: how to get the list of the file paths for a samweb selection ==== | ||
| + | * First, you get the list of the files from samweb | ||
| + | |||
| + | samweb -e icarus list-files " | ||
| + | |||
| + | * Then, you have to convert the filename into filepath using the following commands: | ||
| + | |||
| + | for filename in $(cat list_filenames.txt); | ||
| + | do | ||
| + | md5=$(echo -n " | ||
| + | filepath="/ | ||
| + | if [ -f ${filepath} ]; | ||
| + | then | ||
| + | echo ${filepath} >> list_filepaths.txt; | ||
| + | else | ||
| + | echo ${filename} >> list_missing_files.txt; | ||
| + | fi; | ||
| + | done; | ||
| + | |||
| + | * You will have: | ||
| + | * the list of the path of the existing files in // | ||
| + | * the list of the name of the missing files in // | ||
| + | |||
| + | |||
| + | ==== File transfer from FNAL machines ==== | ||
| + | To be able to copy files from FNAL to CNAF you need (**only once**): | ||
| + | * to be enrolled in the VO. See [[https:// | ||
| + | * copy '' | ||
| + | |||
| + | scp -r ~/.globes " | ||
| + | |||
| + | * to create '' | ||
| + | |||
| + | mkdir -p ~/vomses | ||
| + | |||
| + | * copy the content of /etc/vomses in the CNAF machines in the created folder, using the following command on the CNAF machines: | ||
| + | |||
| + | scp -r / | ||
| + | |||
| + | Then, you do, ignoring possible errors: | ||
| + | |||
| + | voms-proxy-init --voms icarus-exp.org --valid 72:00 -vomses ~/ | ||
| + | gfal-ls srm:// | ||
| + | |||
| + | where <space token> can be: | ||
| + | * icarus for tape (i.e. / | ||
| + | * icarusplain for plain area on disk (i.e. / | ||
| + | * icarusdata for not plain area on disk (i.e. / | ||
| + | |||
| + | ==== File transfer\access from CNAF machines ==== | ||
| + | * First, you create a proxy with fermilab VOMS extensions or in alternative a token: | ||
| + | |||
| + | source / | ||
| + | export BEARER_TOKEN_FILE=/ | ||
| + | htgettoken -a htvaultprod.fnal.gov -i icarus | ||
| + | export BEARER_TOKEN=$(cat ${BEARER_TOKEN_FILE}) | ||
| + | |||
| + | then you should be able to copy files from FNAL: | ||
| + | |||
| + | xrdcp xroots:// | ||
| + | xrdcp file-test.root xroots:// | ||
| + | gfal-ls https:// | ||
| + | gfal-ls gsiftp:// | ||
| + | gfal-copy file-test.root https:// | ||
| + | |||
| + | * you can also access remote file: | ||
| + | |||
| + | $> root -l | ||
| + | root [0] TFile *_file0 = TFile:: | ||
| + | |||
| + | |||
| + | ==== Support ==== | ||
| + | For any kind of support refer to [[mailto: | ||
