IO with EOS command lines

User can access (list and read) files in CERN EOS from non lxplus nodes, without being authenticated.

In order to get full permission(write/delete), one should use CERN account to get Kerberos authentication.
-bash-4.1$ kinit wwu@CERN.CH
Password for wwu@CERN.CH: 
-bash-4.1$ klist 
Ticket cache: FILE:/tmp/krb5cc_256396_pJ3N3w
Default principal: wwu@CERN.CH
Valid starting     Expires            Service principal
02/21/19 11:18:13  02/22/19 12:18:18  krbtgt/CERN.CH@CERN.CH   
renew until 02/28/19 11:18:13

-bash-4.2$  export EOS_MGM_URL=root://

-bash-4.2$ eos ls -l /eos/atlas/atlasdatadisk/rucio/test.1
-rw-r--r--   2 atlas003 zp             960608 Nov 21  2017 test.1

-bash-4.2$ eos cp /eos/atlas/atlasdatadisk/rucio/test.1 /tmp/file6
[eos-cp] path=/eos/atlas/atlasdatadisk/rucio/test.1 size=960608

[eos-cp] going to copy 1 files and 960.61 kB
[eoscp] test.1                   Total 0.92 MB   |====================| 100.00 % [0.6 MB/s]

[eos-cp] copied 1/1 files and 960.61 kB in 2.75 seconds with 349.58 kB/s

Direct IO through ROOT

User can also do directly IO to ESO from root, more information can be find here
TFile *file = TFile::Open("root://eosatlas//eos/atlas/atlascerngroupdisk/phys-higgs/HSG1/MxAOD/h012/Archive.h012.SmallFiles_LessThan100Mb/data16/data16_13TeV.periodAll25ns_410ipb_onlyToroidIssues.physics_Main.MxAOD.p2623.h012.root");
xrdcp local.file root://eosuser//eos/user/t/tkouba/dest_file

lxplus FUSE mounted

EOS is fuse-mounted on, so user can use standard linux file system commands to access the files.
-bash-4.1$ hostname

-bash-4.1$ id
uid=56951(wwu) gid=1307(zp) groups=1307(zp),1097570081 context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

-bash-4.1$ cp /etc/hosts /eos/user/w/wwu/hosts

-bash-4.1$ ls -l /eos/user/w/wwu/hosts
-rw-r--r--. 1 wwu zp 158 Feb 19 19:39 /eos/user/w/wwu/hosts

-bash-4.1$ cp /eos/user/w/wwu/hosts /tmp/file1

-- WenjingWu - 19 Feb 2019
Topic revision: r2 - 21 Feb 2019, 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