EGIIn SPIRE Grid Training for Power Users Institute

  • Slides: 33
Download presentation
EGI-In. SPIRE Grid Training for Power Users Institute of Physics Belgrade Hands-On Session: Data

EGI-In. SPIRE Grid Training for Power Users Institute of Physics Belgrade Hands-On Session: Data Management N GI AE G IS Danica Stojiljkovic (danica@ipb. ac. rs), Nikola Grkic (ngrkic@ipb. ac. rs) SCL, Institute of Physics Belgrade Serbia 28/05/2012 EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Overview • • Storage elements types Grid file names LFC Concept Data management examples

Overview • • Storage elements types Grid file names LFC Concept Data management examples Useful CLI commands Advanced Sandbox Management Useful links EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Overview • • Storage elements types Grid file names LFC Concept Data management examples

Overview • • Storage elements types Grid file names LFC Concept Data management examples Useful CLI commands Advanced Sandbox Management Useful links EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Storage elements types • In use in WLCG/EGI: – – – LCG Disk pool

Storage elements types • In use in WLCG/EGI: – – – LCG Disk pool manager (DPM) CASTOR d. Cache Sto. RM Best. MAN Classic SE (obsolete) • Resource management is done through Storage Resource Manager (SRM) interface – Hides the complexity of the resources EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Overview • • Storage elements types Grid file names LFC Concept Data management examples

Overview • • Storage elements types Grid file names LFC Concept Data management examples Useful CLI commands Advanced Sandbox Management Useful links EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Grid file • GRID file – Both physically present in a SE and registered

Grid file • GRID file – Both physically present in a SE and registered in the file catalogue – Files are write-once, read-many • Files cannot be changed unless remove or replaced EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Grid file names (1) • Grid Unique IDentifier (GUID) – Identifies a file uniquely,

Grid file names (1) • Grid Unique IDentifier (GUID) – Identifies a file uniquely, is of the form: • guid: <36_bytes_unique_string> • guid: 38 ed 3 f 60 -c 402 -11 d 7 -a 6 b 0 -f 53 ee 5 a 37 e 1 d • Logical File Name (LFN) or User Alias – Used to refer to a file in human readable form • lfn: /grid/<My. VO>/<My. Dirs>/<My. File> • lfn: /grid/aegis/vlada/outputs/output 1. txt EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Grid file names (2) • Storage URL (SURL) – Identifies a replica in a

Grid file names (2) • Storage URL (SURL) – Identifies a replica in a SE • <sfn|srm>: //<SE_hostname>/<some_string> • srm: //se. ipb. ac. rs/dpm/ipb. ac. rs/home/aegis/generated/2010 -10 -10/fileb 3469 b 96 -d 956 -4062 -9662 -4 da 7 e 203557 d • Transport URL (TURL) – Valid URI with the necessary information to access a file in a SE • <protocol>: //<some_string> • gsiftp: //se 2. ipb. ac. rs: /storage 8/aegis/2010 -1010/fileb 3469 b 96 -d 956 -4062 -96624 da 7 e 203557 d. 2015029. 0 EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Overview • • Storage elements types Grid file names LFC Concept Data management examples

Overview • • Storage elements types Grid file names LFC Concept Data management examples Useful CLI commands Advanced Sandbox Management Useful links EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

LFC arhitecture COMMENTS METADATA UID (JMBG) NAME NICKNAME ADDRESSES of CLONES EGI-In. SPIRE RI-261323

LFC arhitecture COMMENTS METADATA UID (JMBG) NAME NICKNAME ADDRESSES of CLONES EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

LFC(1) • LCG File Catalogue (LFC) – Provides System metadata – Maintains mappings between

LFC(1) • LCG File Catalogue (LFC) – Provides System metadata – Maintains mappings between LFN(s), GUID and SURL(s) – Provides single string user metadata EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

LFC(2) • Directory structure – /grid/<vo>/<you_create_it> – /grid/aegis/power • All members of given VO

LFC(2) • Directory structure – /grid/<vo>/<you_create_it> – /grid/aegis/power • All members of given VO have rw permissions in their directory EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

File and replica management • LCG Data Management tools ( lcg_utils) – High level

File and replica management • LCG Data Management tools ( lcg_utils) – High level tools – Hide the complexities of catalogue and SEs interaction – CLI, API EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Overview • • Storage elements types Grid file names LFC Concept Data management examples

Overview • • Storage elements types Grid file names LFC Concept Data management examples Useful CLI commands Advanced Sandbox Management Useful links EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Data management scheme EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Data management scheme EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Check grid environment • You can check whether variables are set: $ echo $LFC_HOST

Check grid environment • You can check whether variables are set: $ echo $LFC_HOST (address of LFC server) $ echo $LCG_CATALOG_TYPE (catalog type) • define variables with: $ export LFC_HOST=lfc. ipb. ac. rs $ export LCG_CATALOG_TYPE=lfc • User can get list of available LFC server with command: $ lcg-infosites --vo aegis lfc • You can also list available SE, CE. . . EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Data Management Examples (1) • Listing the entries of a LFC directory $ lfc-ls

Data Management Examples (1) • Listing the entries of a LFC directory $ lfc-ls /grid/aegis/power danica src. tgz • Creating directories in the LFC $ lfc-mkdir /grid/aegis/power/new_dir $ lfc-ls -l /grid/aegis/power drwxrwxr-x 0 124 101 -rw-rw-r-1 210 101 EGI-In. SPIRE RI-261323 0 May 28 11: 53 danica 0 May 28 14: 53 new_dir 191 May 27 18: 40 src. tgz Grid Training for Power Users www. egi. eu

Data Management Examples (2) • Upload a file $ lcg-cr file: /home/danica/input. txt guid:

Data Management Examples (2) • Upload a file $ lcg-cr file: /home/danica/input. txt guid: 830 e 7 a 82 -f 9 fb-4 c 04 -aafd-e 24 a 5 f 25 acdb • Specify lfn: $ lcg-cr -l lfn: /grid/aegis/power/danica/input. txt file: /home/danica/input. txt guid: 25 fdcd 16 -bc 76 -4458 -9 c 1 a-8 c 597 fb 33194 • List available SEs $ lcg-infosites --vo aegis se • Replicate a file (one replica per SE) $ lcg-rep -d grid 15. rcub. bg. ac. rs lfn: /grid/aegis/power/danica/input. txt EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Data Management Examples (3) • List guid $ lcg-lg lfn: /grid/aegis/power/danica/input. txt guid: 25

Data Management Examples (3) • List guid $ lcg-lg lfn: /grid/aegis/power/danica/input. txt guid: 25 fdcd 16 -bc 76 -4458 -9 c 1 a-8 c 597 fb 33194 • Listing files and directories $ lcg-ls -l lfn: /grid/aegis/power/danica/ -rw-rw-r-- 1 165 101 606 input. txt -rw-rw-r-- 1 165 101 12 result 1_link EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Data Management Examples (4) • Creation of symbolic links $ lfc-ln -s /grid/aegis/power/danica/input. txt

Data Management Examples (4) • Creation of symbolic links $ lfc-ln -s /grid/aegis/power/danica/input. txt /grid/aegis/power/danica/input_link $ lfc-ls -l /grid/aegis/power/danica/input_link rwxrwxrwx 1 165 101 0 Oct 10 16: 05 grid/aegis/power/danica/input_link -> /grid/aegis/power/danica/input • Adding metadata information to LFC entries $ lfc-setcomment /grid/aegis/power/danica/input. txt "best result“ $ lfc-ls --comment /grid/aegis/power/danica/input. txt best result EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Data Management Examples (5) • Removing LFNs from the LFC $ lfc-rm -r /grid/aegis/power/danica/result

Data Management Examples (5) • Removing LFNs from the LFC $ lfc-rm -r /grid/aegis/power/danica/result 1_link • Print the ACL of a directory $ lfc-getacl /grid/aegis/power/danica file: /grid/aegis/power/danica # owner: /C=RS/O=AEGIS/OU=Institute of Physics Belgrade/CN=Danica Stojiljkovic # group: aegis user: : rwx group: : rwx #effective: rwx other: : r-x default: user: : rwx default: group: : rwx default: other: : r-x EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Data Management Examples (6) • List replicas $ lcg-lr lfn: /grid/aegis/power/danica/input. txt srm: //grid

Data Management Examples (6) • List replicas $ lcg-lr lfn: /grid/aegis/power/danica/input. txt srm: //grid 15. rcub. bg. ac. rs/dpm/rcub. bg. ac. rs/home/aegis/gener ated/2010 -10 -10/file 531 a 6 e 7 f-ab 4 a-4 a 9 b-bb 9 f-a 2 d 9 a 693 e 615 srm: //se. ipb. ac. rs/dpm/ipb. ac. rs/home/aegis/generated/2010 -10 -10/fileb 3469 b 96 -d 956 -4062 -9662 -4 da 7 e 203557 d • Copying files out of the Grid (download) $ lcg-cp lfn: /grid/aegis/power/danica/input. txt file: /home/danica/input_1. txt • Deleting replicas $ lcg-del srm: //grid 15. rcub. bg. ac. rs/dpm/rcub. bg. ac. rs/home/aegis/ge nerated/2010 -10 -10/file 531 a 6 e 7 f-ab 4 a-4 a 9 b-bb 9 fa 2 d 9 a 693 e 615 $ lcg-del -a lfn: /grid/aegis/power/danica/input. txt EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Overview • • Storage elements types Grid file names LFC Concept Data management examples

Overview • • Storage elements types Grid file names LFC Concept Data management examples Useful CLI commands Advanced Sandbox Management Useful links EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

LFC commands • Unix-like LFC commands: – – – echo $LFC_HOST lfc-ls List file/directory

LFC commands • Unix-like LFC commands: – – – echo $LFC_HOST lfc-ls List file/directory entries in a directory lfc-mkdir Create directory lfc-ln Make a symbolic link to a file/directory lfc-ls List file/directory entries in a directory lfc-chmod Change access mode of a LFC file/directory lfc-chown Change owner and group of a LFC file/directory lfc-getacl Get file/directory access control lists lfc-setacl Set file/directory access control lists lfc-setcomment Set user comment on file/directory lfc-delcomment Delete user comment on file/directory • User needs a valid proxy for using these commands EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

lcg_utils commands (1) • Check environment – echo $LCG_GFAL_INFOSYS – echo VO_<VO>_DEFAULT_SE • •

lcg_utils commands (1) • Check environment – echo $LCG_GFAL_INFOSYS – echo VO_<VO>_DEFAULT_SE • • • lcg-cp Copies a Grid file to a local destination (download) lcg-cr Copies a file to a SE and registers the file in the catalogue (upload) lcg-del Deletes one file (either one replica or all replicas) lcg-rep Copies a file from one SE to another SE and registers it in the catalogue (replicate) lcg-gt Gets the TURL for a given SURL and transfer protocol EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

lcg_utils commands (2) • lcg-aa Adds an alias in the catalogue for a given

lcg_utils commands (2) • lcg-aa Adds an alias in the catalogue for a given GUID • lcg-ra Removes an alias in the catalogue for a given GUID • lcg-rf Registers in the catalogue a file residing on an SE • lcg-uf Unregisters in the catalogue a file residing on an SE • lcg-la Lists the aliases for a given LFN, GUID or SURL • lcg-lr Lists the replicas for a given LFN, GUID or SURL • lcg-ls Lists file information for given SURLs or LFNs EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Overview • • Storage elements types Grid file names LFC Concept Data management examples

Overview • • Storage elements types Grid file names LFC Concept Data management examples Useful CLI commands Advanced Sandbox Management Useful links EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Advanced Sandbox Management (1) • the input files do not have to be on

Advanced Sandbox Management (1) • the input files do not have to be on the host from which the job is submitted; • the output files are immediately available when the job ends, without having to issue a command to retrieve them; • the sandbox files do not have to go through the WMS host, which otherwise can easily become a bottleneck. EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Advanced Sandbox Management (2) • If the job input files are stored on a

Advanced Sandbox Management (2) • If the job input files are stored on a Grid. FTP server, it is possible to specify those files as. Grid. FTP URI in the Input. Sandbox attribute: Input. Sandbox = {"gsiftp: //lxb 0707. cern. ch/cms/doe/data/file. A, "file. B"}; EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Advanced Sandbox Management (3) • In order to store the output sandbox files to

Advanced Sandbox Management (3) • In order to store the output sandbox files to a Grid. FTP server, the Output. Sandbox. Dest. URI attribute must be used Output. Sandbox = {"file. A", "data/file. B", "file. C"}; Output. Sandbox. Dest. URI = {"gsiftp: //lxb 0707. cern. ch/cms/doe/file. A", "gsiftp: //lxb 0707. cern. ch/cms/doe/file. B", "file. C"}; EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Advanced Sandbox Management (4) • Another possibility is to use the Output. Sandbox. Base.

Advanced Sandbox Management (4) • Another possibility is to use the Output. Sandbox. Base. Dest. URI attribute to specify a base URI on a Grid. FTP server where the files listed in Output. Sandbox will be copied. Output. Sandbox = {"file. A", "file. B"}; Output. Sandbox. Base. Dest. URI = "gsiftp: //lxb 0707. cern. ch/cms/doe/"; • Note: the directory on the Grid. FTP where the files have to be copied must already exist EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Overview • • Storage elements types Grid file names LFC Concept Data management examples

Overview • • Storage elements types Grid file names LFC Concept Data management examples Useful CLI commands Advanced Sandbox Management Useful links EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu

Links • https: //edms. cern. ch/file/722398/1. 4/g. Lite-3 User. Guide. pdf • http: //wiki.

Links • https: //edms. cern. ch/file/722398/1. 4/g. Lite-3 User. Guide. pdf • http: //wiki. ipb. ac. rs/index. php/Grid_examples • http: //wiki. egee-see. org/index. php/SEEGRID_Wiki • http: //wiki. egeesee. org/index. php/SG_Data_Management_Hig h_Level_Tools EGI-In. SPIRE RI-261323 Grid Training for Power Users www. egi. eu