БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В grid. the glite3 architecture...

46
БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID

Upload: lee-robertson

Post on 27-Dec-2015

233 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID

Page 2: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

The gLite3 Architecture Security Service:

Grid Security Infrastructure (GSI)

Secure Sockets Layer (SSL) communication protocol

IS - Information Service: 1.Globus Monitoring and Discovery Service (MDS)

discovery and to publish the resource status2. Relational Grid Monitoring Architecture (R-GMA)

accounting, monitoring and publication

Data Management: SE - Storage Element , Protocols Catalogues File TransferSRM

Workload Management Services: Workload Management System (WMS)

Local Resource Management System (batch) Worker Nodes (WNs)

UI - User Interface: list all the resourcessubmit/cancel/retrieve jobs, output, status, logging …

copy, replicate and delete files from the Gridretrieve the status of different resources from the IS

Page 3: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Начало работыUI = lxpub04.jinr.ru

lxpub01.jinr.ru, lxpub02.jinr.ru, lxpub03.jinr.ru

ssh lxpubXX.jinr.ru

source /opt/ui/external/etc/profile.d/grid-env.sh

*Standard Proxy ($X509_USER_PROXY =/tmp/x509up_<uid>)

lcgce01://etc/grid_security/grid_mapfile

Configuration file:

$EDG_LOCATION=/opt/ui/edg$GLITE_LOCATION=/opt/ui/glite

lxpub03:~ > grid-proxy-init

lxpub03:~ > grid-proxy-info

lxpub03:~ > grid-proxy-destroy

Page 4: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

*VOMS Proxies (Standard Grid proxy$X509_USER_PROXY=/tmp/x509up_u<uid>

+ full VOMS proxy)Configuration file:

$GLITE_LOCATION=/opt/ui/glite$GLITE_LOCATION/etc/vomses, /opt/glite/etc/vomses

$ voms-proxy-init --voms <alias>:<group name> [Role=<role name>]

lxpub03:~ > voms-proxy-init --voms atlas

lxpub03:~ > voms-proxy-info -all

lxpub03:~ > voms-proxy-destroy

Page 5: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

*Creating a long-term proxy and storing it in MyProxy Server

$ myproxy-init -s <myproxy_server> -d -n, where :

-s <myproxy server>=MyProxy Server-d option instructs the server to associate the user DN to the proxy

lxpub03:~ > echo $MYPROXY_SERVER lcgpx01.jinr.ru

lxpub03:~ > myproxy-init -s lcgpx01 -d –n

Your identity: /C=RU/O=RDIG/OU=users/OU=jinr.ru/CN=Natalia GromovaEnter GRID pass phrase for this identity:Creating proxy ...................................... DoneProxy Verify OKYour proxy is valid until: Thu Apr 17 17:09:55 2008A proxy valid for 168 hours (7.0 days) for user /C=RU/O=RDIG/OU=users/OU=jinr.ru/

lxpub03:~ > myproxy-destroy -s lcgpx01 -dDefault MyProxy credential for user /C=RU/O=RDIG/OU=users/OU=jinr.ru/CN=Natalie gromova was successfully removed.

Page 6: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Information Service (IS)

Two IS systems are used in gLite 3.1 :

1. MDS - Globus Monitoring and Discovery

Service :

2. Relational Grid Monitoring Architecture (R-GMA)

Page 7: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

MDS - Globus Monitoring and Discovery Service :

-lcg-infosites (VO-specific information on existing Grid resources ) -lcg-info (list either CEs or SE)

-Local GRIS (The first level of MDS information publication is the GRIS, provides specific information for a particular service)

-Site BDII (collects information about all resources present at a site i.e. data from all GRISes at the site )

Relational Grid Monitoring Architecture (R-GMA)

https://lcgmon01.gridpp.rl.ac.uk:8443/R-GMA/index.html

Page 8: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

lcg-infosites

Command can be used to obtain VO-specific information on existing Grid resources.

Syntax:

lcg-infosites --vo <vo> <option> -v <verbosity> -f <site> --is <bdii>

-vo <vo> : the name of the VO<option> :

-ce: the number of CPUs, running jobs, waiting jobs and CE names -v 1: only the CE names;-v 2: the cluster names, the amount of RAM, the operating system name and version and the processormodel;-se: the names of the SEs supporting the VO, the type of storage system and the used and available space;-v 1: only the SE names;all: the information given by ce and se; together; -closeSE: the names of the CEs supporting the VO and their close SEs;-tag: the software tags published by each CE supporting the VO;

Page 9: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

-lfc: the hostname of the LFC catalogues available to the VO;-lfcLocal: the hostname of the local LFC catalogues available to the VO;-rb: the hostname and port of the RBs available to the VO;-dli: the Data Location Index servers available to the VO;-dliLocal: the local Data Location Index servers available to the VO;-vobox: the VO boxes available to the VO;-fts: the endpoints of the FTS servers available to the VO;-sitenames: the names of all WLCG/EGEE sites;-is <bdii>: the BDII to query ($LCG_GFAL_INFOSYS=lcgbdii.jinr.ru:2170)-f <site>: the information printed to the specified site

Page 10: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Example - Obtaining information about computing resources

lxpub03:~ > lcg-infosites --vo atlas ce

valor del bdii: lcgbdii.jinr.ru:2170#CPU Free Total Jobs Running Waiting ComputingElement---------------------------------------------------------- 40 18 0 0 0ce.ui.savba.sk:2119/jobmanager-pbs-atlas 330 83 4 2 2lcgce01.jinr.ru:2119/jobmanager-lcgpbs-atlas 330 83 4 2 2lcgce02.jinr.ru:2119/jobmanager-lcgpbs-atlas

lxpub03:~ > lcg-infosites --vo atlas ce | grep jinr

valor del bdii: lcgbdii.jinr.ru:2170 11 8 2 0 2 lgdce01.jinr.ru:2119/jobmanager-lcgpbs-atlas

Page 11: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Example - Obtaining information about storage resources

lxpub03:~ > lcg-infosites --vo atlas se Avail Space(Kb) Used Space(Kb) Type SEs------------------------------------------------------------------------------------------14462833655808 2537166995456 n.a storm-fe.cr.cnaf.infn.itn.a 999999 n.a atlasse01.ihep.ac.cn30863580252 12578843986 n.a lxfs07.jinr.ru….

Example - Host name of LFC the catalogues VO

lxpub03:~ > lcg-infosites --vo atlas lfc prod-lfc-atlas-central.cern.ch

Example - Listing local LFC servers

lxpub03:~ > lcg-infosites --vo atlas lfcLocal lfc.ihep.ac.cnlcg04.usatlas.bnl.govprod-lfc-atlas-local.cern.ch....lxpub03:~ > lcg-infosites --vo atlas lfcLocal | grep jinrlcglfc01.jinr.ru

Page 12: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

lcg-info

The lcg-info command can be used to list CEs / Ses satisfying a given set of conditions on their attributes. The information is taken from the BDII specified by the $LCG_GFAL_ INFOSYS environment variable.

Syntax:

lcg-info [--list-ce | --list-se] [--query <query>] [--attrs <attrs>]

where:

--list-ce,--list-se must be used to indicate if CEs or SEs should be listed.

--query

option introduces a filter (conditions to be fulfilled) to the elements of the list

--attrs option may be used to specify which attributes to print.

Page 13: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Example - Get the list of supported attributes

lxpub03:~ > lcg-info --list-attrs

Attribute name* Glue object class Glue attribute name EstRespTime GlueCE GlueCEStateEstimatedResponseTimeWorstRespTime GlueCE GlueCEStateWorstResponseTime TotalJobs GlueCE GlueCEStateTotalJobs TotalCPUs GlueCE GlueCEInfoTotalCPUs MaxRunningJobs GlueCE GlueCEPolicyMaxRunningJobs CE GlueCE GlueCEUniqueID CEStatus GlueCE GlueCEStateStatus CEVOs GlueCE GlueCEAccessControlBaseRule FreeCPUs GlueCE GlueCEStateFreeCPUs RunningJobs GlueCE GlueCEStateRunningJobs MaxWCTime GlueCE GlueCEPolicyMaxWallClockTime Accesspoint GlueCESEBind GlueCESEBindCEAccesspoint CloseCE GlueCESEBindGroup GlueCESEBindGroupCEUniqueID ...GLUE: Grid Laboratory for a Uniform Environment* see "gLite3 user guide"

Page 14: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Example - List all the CEs satisfying given conditions and print the desired attributes

(How many jobs are running and how many free CPUs there are on CEs that have an Athlon CPU and have Scientific Linux):

lxpub03:~ > lcg-info --list-ce --query Processor=*thlon*,OS=*Scientific* --attrs 'RunningJobs,FreeCPUs‘

- CE: alice003.nipne.ro:2119/jobmanager-lcgpbs-alice - RunningJobs 0 - FreeCPUs 2

- CE: alice003.nipne.ro:2119/jobmanager-lcgpbs-dteam - RunningJobs 0 - FreeCPUs 2

- CE: alice003.nipne.ro:2119/jobmanager-lcgpbs-ops - RunningJobs 0 - FreeCPUs 2

- CE: ce02.lip.pt:2119/jobmanager-lcgsge-atlasgrid - RunningJobs 1 - FreeCPUs 48....

Page 15: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

The Local GRIS (Grid Resource Information Service)

$ ldapsearch -x -h <hostname> -p <port> -b "mds-vo-name= ..., o=grid"

where:

-x simple authentication (instead of LDAPs SASL) -h hostname -p port (2135 or 2170) -b “mds-vo-name=local(2135)/resource(2170) “ (GRIS level) “mds-vo-name=<sitename> “ (site level) “mds-vo-name=mds-vo-name=<sitename>, mds-vo-name=local “

(top-level BDII) ldapsearch -x -h <hostname> -p 2135 -b "mds-vo-name=local, o=grid"

ldapsearch -x -h <hostname> -p 2170 -b "mds-vo-name=resource,o=grid"

where:

-x simple authentication (instead of LDAPs SASL) -h hostname -p port (= 2135 or 2170)

-b specify the initial entry for the search in the LDAP tree

Page 16: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Using the ldapsearch command to read the MDS:

ldapsearch -x -H <ldap_uri> -b "mds-vo-name=local, o=grid"

where:

ldap_uri = ldap://hostname:port

Example - Interrogating the GRIS on a Computing Element

ldapsearch -x -h lxb2006.cern.ch -p 2135 -b "mds-vo-name=local, o=grid"

or:

ldapsearch -x -H ldap://lxb2006.cern.ch:2135 -b "mds-vo-name=local, o=grid"

Page 17: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

lxpub03:~ > ldapsearch -x -h lcgce01.jinr.ru -p 2135 -b "mds-vo-name=local, o=grid" | less

version: 2

## filter: (objectclass=*)# requesting: ALL## lcgce01.jinr.ru:2119/jobmanager-lcgpbs-alice, local, griddn: GlueCEUniqueID=lcgce01.jinr.ru:2119/jobmanager-lcgpbs-alice,mds-vo-name=lo cal,o=gridobjectClass: GlueCETopobjectClass: GlueCEGlueCEHostingCluster: lcgce01.jinr.ruGlueCEName: aliceGlueCEUniqueID: lcgce01.jinr.ru:2119/jobmanager-lcgpbs-aliceGlueCEInfoGatekeeperPort: 2119GlueCEInfoHostName: lcgce01.jinr.ru .....

Page 18: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Example -To test site GIIS :

lxpub03:~ > ldapsearch -x -H ldap://lcgsite.jinr.ru:2170 \ -b mds-vo-name=JINR-LCG2, o=grid | less

# extended LDIF## LDAPv3# base <mds-vo-name=JINR-LCG2,o=grid> with scope sub# filter: (objectclass=*)# requesting: ALL#....# lxfs07.jinr.ru, lcgce01.jinr.ru:2119/jobmanager-lcgpbs-hone, JINR-LCG2, griddn: GlueCESEBindSEUniqueID=lxfs07.jinr.ru,GlueCESEBindGroupCEUniqueID=lcgce01.jinr.ru:2119/jobmanager-lcgpbs-hone,Mds-Vo-name=JINR-LCG2,o=gridGlueCESEBindSEUniqueID: lxfs07.jinr.ruGlueCESEBindCEUniqueID: lcgce01.jinr.ru:2119/jobmanager-lcgpbs-honeGlueCESEBindMountInfo: /pnfs/jinr.ru/data

# VO-atlas-production-12.0.6, lcgce01.jinr.ru, lcgce01.jinr.ru, JINR-LCG2, griddn: GlueLocationLocalID=VO-atlas-production-12.0.6,GlueSubClusterUniqueID=lcgce01.jinr.ru,GlueClusterUniqueID=lcgce01.jinr.ru,Mds-Vo-name=JINR-LCG2,o=gridGlueLocationLocalID: VO-atlas-production-12.0.6GlueLocationName: VO-atlas-production-12.0.6GlueLocationVersion: ProdGlueLocationPath: $VO_ATLAS_SW_DIR……

Page 19: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

MONITORING

http://goc.grid.sinica.edu.tw/gstat/

https://lcg-sam.cern.ch:8443/sam/sam.py

https://goc.gridops.org/site

Page 20: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Data Manager System

•Storage Elements

-Types SE-Data Channel Protocols (GridFTP,srm,ftp ..)

-Storage Resource Manager (SRM)

•Catalogs

-File Catalog-Replica catalog -File Authorization Service-Metadata Catalog

•File Transfer

-File Transfer Service-File Placement Service

Page 21: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

• The Storage Element is the service which allows a user or an application to store data for future retrieval

• All data in a SE must be considered read-only and therefore can not be changed unless physically removed and replaced.

• Different VOs might enforce different policies for space quota management.

Storage Elements (SE)

Page 22: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

• Types of Storage Elements :

-Classic SE: GridFTP server (gsiftp, insecure RFIO daemon)-CASTOR: a tape mass storage system (RFIO)-dCache: It consists of a server and one or more pool nodes (gsidcap)-LCG Disk pool manager: disk pool manager, suitable for small sites (max 10 TB of total space)

• Data Channel Protocols :

GSIFTP (GridFTP) ~ File Transfer FTP-likegsidcap (GSI dCache Access Protocol) ~ I/O Remote file accessinsecure RFIO (Remote File I/O) ~ I/O Remote file access secure RFIO(gsirfio) ~ I/O Remote file access

• SRM (Storage Resource Manager ) :

-is a service interacting with local SE and providing the GRID-interface for the external world.- has been designed to be the single interface for the management of disk and tape storage resources.- Srm-protocol is a storage management protocol and not a file access one.

Page 23: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

File Names in gLite 3.1

*Grid Unique IDentifier (GUID):guid:<36_bytes_unique_string>guid:38ed3f60-c402-11d7-a6b0-f53ee5a37e1d *Logical File Name (LFN) or User Alias:lfn:<any_string>lfn:importantResults/Test1240.dat , lfn:/grid/<MyVO>/<MyDirs>/<MyFile>

*Storage URL (SURL)= Physical File Name (PFN) <sfn|srm>://<SE_hostname>/<some_string>

where: sfn - files located in SEs without a SRM interface srm - SRM-managed SEs

sfn://<hostname><Accesspoint><VO_path><filename>srm://srm.cern.ch/castor/cern.ch/grid/dteam/doe/file1

*Transport URL (TURL)<protocol>://<some_string>gsiftp://tbed0101.cern.ch/data/dteam/doe/file1

where :<protocol> = (GSIFTP, RFIO, gsidcap) , supported by the SE to access the file

Page 24: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

File Catalogue in gLite 3.1

File Catalogue is the service which maintains mappings between LFN(s), GUID, SURL(s).

Grid file it is both physically present in a SE and registered in the File Catalogue LFC.

Client tools :

lfc-* commands for LFC catalogue define the match between LFN (Logical File Name), SURL(Site URL)

lcg-* commands to upload/download files to/from Grid (SE) replicate data and interact with the file catalogues.

Page 25: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

LFC Commands lfc-*

structure of the LFC : /grid/<VO>/<subpaths>

Environment for lfc-*

LCG_CATALOG_TYPE=lfcLCG_LOCATION=/opt/lcgLCG_TMP=/tmpLCG_GFAL_INFOSYS=lcgbdii.jinr.ru:2170LFC_HOST= "name of the LFC server“LFC_HOME=/grid/atlas/MYDIR

lxpub03:~ > lcg-infosites --vo atlas lfcprod-lfc-atlas-central.cern.ch

lxpub03:~ > lcg-infosites --vo atlas lfcLocal | grep jinrlcglfc01.jinr.ru

lxpub03:~ > export LFC_HOST=lcglfc01.jinr.rulxpub03:~ > export LFC_CATALOG_TYPE=lfc

Page 26: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

LFC Commands lfc-*

lfc-chmod Change access mode of a LFC file/directorylfc-chown Change owner and group of a LFC file/directorylfc-delcomment Delete the comment associated with a file/directorylfc-getacl Get file/directory access control listslfc-ln Make a symbolic link to a file/directorylfc-ls List file/directory entries in a directorylfc-mkdir Create directorylfc-rename Rename a file/directorylfc-rm Remove a file/directorylfc-setacl Set file/directory access control listslfc-setcomment Add/replace a commentlfc-entergrpmap Defines a new group entry in the Virtua tablelfc-enterusrmap Defines a new user entry in Virtual ID tablelfc-modifygrpmap Modifies a group entry corresponding to a given virtual gidlfc-modifyusrmap Modifies a user entry corresponding to a given virtual uidlfc-rmgrpmap Suppresses group entry corresponding to a given virtual gid or group namelfc-rmusrmap Suppresses user entry corresponding to a given virtual

uid or user name.

Page 27: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Examples :

*Listing the entries of a LFC directory :

lxpub03:~ > lfc-ls /grid/aliceatlasbiomedcmsdteamfusionhonelhcbopsgstest

*Creating directories in the LFC :

lxpub03:~ > lfc-mkdir /grid/atlas/tutorial

lxpub03:~ > lfc-ls -l /grid/atlas/

drwxrwxr-x 0 103 112 0 Apr 10 11:43 SAMdrwxrwxr-x 0 107 102 0 Apr 10 21:25 tutorial

Page 28: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Examples : *Creation of symbolic links

lxpub03:~ > lfc-ln -s /grid/atlas/tutorial /grid/atlas/example

lxpub03:~ > lfc-ls -l /grid/atlas/

drwxrwxr-x 0 103 112 0 Apr 10 11:43 SAMlrwxrwxrwx 1 107 102 0 Apr 10 21:27 example ->

/grid/atlas/tutorialdrwxrwxr-x 0 107 102 0 Apr 10 21:25 tutorial

*Adding metadata information to LFC entries

lxpub03:~ > lfc-setcomment /grid/atlas/example "Simple Test“

lxpub03:~ > lfc-ls --comment /grid/atlas/examplegrid/atlas/example Simple Test

*Removing LFNs from the LFC

lxpub03:~ > lfc-rm /grid/atlas/example

Page 29: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Examples : *Access Control Lists :

* a user (user); * a group of users (group); * any other user (other); * the maximum permissions granted to specific users or groups (mask).

permissions: read (r), write (w), execute (x)

*Print the ACL of a directory

lxpub03:~ > lfc-getacl /grid/atlas/SAM# file: /grid/atlas/SAM# owner: /C=IT/O=INFN/OU=Personal Certificate/L=Roma 1/CN=Alessandro Di Girolamo# group: atlas/Role=lcgadminuser::rwxgroup::rwx #effective:rwxother::r-xdefault:user::rwxdefault:group::rwxdefault:other::r-x

Page 30: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

File and Replica Management Client Tools LCG Data Management Client Tools

The LCG Data Management tools lcg_util allow users:• to copy files between UI,CE,WN,SE; • to register entries in the file catalogue and • replicate files between SEs.

*Replica Management (FTS)

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 protocollcg-sd Sets file status to "Done" for a given SURL in an SRM's request

Page 31: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

*File Catalogue Interaction (FTS<-->LFS)

lcg-aa Adds an alias in the catalogue for a given GUIDlcg-ra Removes an alias in the catalogue for a given GUIDlcg-rf Registers in the catalogue a file residing on an SElcg-uf Unregisters in the the catalogue a file residing on an SElcg-la Lists the aliases for a given LFN, GUID or SURLlcg-lg Gets the GUID for a given LFN or SURLlcg-lr Lists the replicas for a given LFN, GUID or SURL

Page 32: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Environment for lcg-*

LCG_GFAL_INFOSYS= lcgbdii.jinr.ru:2170LFC_HOST = lcglfc01.jinr.ruLFC_HOME = /grid/atlas/tutorial LCG_GFAL_VO =atlasVO_ATLAS_DEFAULT_SE= lxfs07.jinr.ru

lxpub03:~ > echo $LFC_HOST lcglfc01.jinr.ru

lxpub03:~ > echo $LCG_GFAL_INFOSYSlcgbdii.jinr.ru:2170

lxpub03:~ > echo $VO_ATLAS_DEFAULT_SElxfs07.jinr.ru

Page 33: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

Examples

*Uploading a file to the Grid

Syntax:

lcg-cr [--config config_file] [-d dest_file | dest_host] [-g guid] [-h |--help][-i | --insecure] [-l lfn] [-n nbstreams] [-P relative_path] [-t timeout] [-v |--verbose][--vo vo] src_file

where:

dest_file= SURL (sfn://, srm://) -d lxb0710.cern.ch -d sfn://lxb0710.cern.ch/data/dteam/my_file -d lxb0710.cern.ch -P my_dir/my_file

dest_host = SEguid = GUID filelfn = LFNvo = VOsrc_file = file:/// , gsiftp:///

Page 34: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

lxpub04:~/data > lcg-cr -v --vo atlas -d lxdpm104.cern.ch -l lfn:/grid/atlas/tutorial/File2.txt file:///afs/jinr.ru/user/g/grom/data/testFile.txt

Using grid catalog type: lfcUsing grid catalog : lcglfc01.jinr.ruUsing LFN : /grid/atlas/tutorial/File2.txtUsing SURL : srm://lxdpm104.cern.ch/dpm/cern.ch/home/atlas/generated/2008-04-14/file8232e17f-6186-4f73-95b3-dc3f6d496fd1Source URL: file:///afs/jinr.ru/user/g/grom/data/testFile.txtFile size: 24VO name: atlasDestination specified: lxdpm104.cern.chDestination URL for copy:gsiftp://lxdpm104.cern.ch/lxdpm104.cern.ch:/data01/atlas/2008-04-14/file8232e17f-6186-4f73-95b3-dc3f6d496fd1.141352.0# streams: 1# set timeout to 0 secondsAlias registered in Catalog: lfn:/grid/atlas/tutorial/File2.txt 24 bytes 0.01 KB/sec avg 0.01 KB/sec instTransfer took 2040 msDestination URL registered in Catalog: srm://lxdpm104.cern.ch/dpm/cern.ch/home/atlas/generated/2008-04-14/file8232e17f-6186-4f73-95b3-dc3f6d496fd1guid:da781a56-5450-470e-9ae9-7e2950dd1d1fguid:da781a56-5450-470e-9ae9-7e2950dd1d1f

Page 35: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

lxpub04:~/data > lfc-ls -l /grid/atlas/tutorial

-rw-rw-r-- 1 107 102 24 Apr 14 16:48 File2.txt-rw-rw-r-- 1 107 102 5 Apr 14 16:54 new-rw-rw-r-- 1 107 102 19896 Apr 14 16:42 test

Page 36: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

*Copies a file from one SE to another SE and registers it in the catalogue (replicate)

Once a file is stored on an SE and registered in the catalogue, the file can be replicated using the lcg-rep command

Syntax:

lcg-rep [--config config_file] [-d dest_file | dest_host] [-h | --help] [-i | --insecure] [-n nbstreams] [-P relative_path] [-t timeout] [-v | --verbose] [--vo vo] src_file

where:

-d dest_file = SURL file (sfn://,srm://) -dest_host = SE src_file = source file : LFN/GUID/SURL

lxpub04:~/data > lcg-infosites --vo atlas se | grep cern

1000000000000 500000000000 n.a castorsrm.cern.ch 236930000 34904 n.a lxdpm104.cern.ch 300000000000 160000000000 n.a srm-atlas.cern.ch 1000000000000 500000000000 n.a srm.cern.ch ....

Page 37: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

lxpub04:~/data >lcg-rep -v --vo atlas -d srm-atlas.cern.ch guid:da781a56-5450-470e-9ae9-7e2950dd1d1f

Using grid catalog type: lfc Using grid catalog : lcglfc01.jinr.ru srm://srm-atlas.cern.ch/castor/cern.ch/grid/atlas/generated/2008-04-14/file8267edf1-60e8-46b7-a16b-bcfee2b16484: Source URL: guid:da781a56-5450-470e-9ae9-7e2950dd1d1f File size: 24 VO name: atlasDestination specified: srm-atlas.cern.ch Source URL for copy: gsiftp://lxdpm104.cern.ch/lxdpm104.cern.ch:/data01/atlas/2008-04-14/file8232e17f-6186-4f73-95b3-dc3f6d496fd1.141352.0 Destination URL for copy: gsiftp://lxfsrd1004.cern.ch:2811//castor/cern.ch/grid/atlas/generated/2008-04-14/file8267edf1-60e8-46b7-a16b-bcfee2b16484 # streams: 1 # set timeout to 0 24 bytes 0.03 KB/sec avg 0.03 KB/sec inst Transfer took 15140 ms srm://srm-atlas.cern.ch/castor/cern.ch/grid/atlas/generated/2008-04-14/file8267edf1-60e8-46b7-a16b-bcfee2b16484: Destination URL registered in LRC: srm://srm-atlas.cern.ch/castor/cern.ch/grid/atlas/generated/2008-04-14/file8267edf1-60e8-46b7-a16b-bcfee2b16484

Page 38: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

*Listing replicas, GUIDs and aliases

The lcg-lr command allows users to list all the replicas of a file registered in the file catalogue:

Syntax:

lcg-lr [--config config_file] [-h | --help] [-i | --insecure] [--vo vo] file

lxpub04:~/data > lcg-lr --vo atlas lfn:/grid/atlas/tutorial/File2.txt

srm://lxdpm104.cern.ch/dpm/cern.ch/home/atlas/generated/2008-04-14/file8232e17f-6186-4f73-95b3-dc3f6d496fd1

srm://srm-atlas.cern.ch/castor/cern.ch/grid/atlas/generated/2008-04-14/file8267edf1-60e8-46b7-a16b-bcfee2b16484

Page 39: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

*Copies a Grid file to a local destination (download)

Syntax:

lcg-cp [-h | --help] [-i | --insecure] [--config config_file] [-n nbstreams] [-t timeout] [-v | --verbose] [--vo vo] src_file dest_file

lxpub0:~/data > lcg-cp -v --vo atlas lfn:testFile.txt file:///$PWD/testFile_from-grid.txt

Using grid catalog type: lfc Using grid catalog : lcglfc01.jinr.ru VO name: atlas srm://srm-atlas.cern.ch/castor/cern.ch/grid/atlas/generated/2008-04-14/file8267edf1-60e8-46b7-a16b-bcfee2b1 Source URL: lfn:/grid/atlas/tutorial/File2.txt File size: 24 Source URL for copy:gsiftp://lxfsrd1004.cern.ch:2811//castor/cern.ch/grid/atlas/generated/2008-04-14/file8267edf1-60e8-46b7-a16b-bcfee2b16484 Destination URL: file:/afs/jinr.ru/user/g/grom/data/File2_from-Grid.txt # streams: 1 # set timeout to

0 (seconds) 0 bytes 0.00 KB/sec avg 0.00 KB/sec inst Transfer took 4010 ms testFile_from.txt

Page 40: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

lxpub04:~/data > ls -l total 691

-rw-r--r-- 1 grom lcta 5 Apr 14 16:52 new -rw-r--r-- 1 grom lcta 24 Apr 12 2007 testFile.txt -rw-r--r-- 1 grom lcta 24 Apr 13 2007 testFile_from.txt

Page 41: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

*Gets the GUID for a given LFN or SURL

Syntax:

lcg-lg [--config config_file] [-h | --help] [-i | --insecure] [--vo vo] lfn_or_surl

lxpub04:~/data > lcg-lg --vo atlas lfn:/grid/atlas/tutorial/File2.txt

guid:da781a56-5450-470e-9ae9-7e2950dd1d1f

Page 42: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

*Gets the TURL for a given SURL and transfer protocol

Syntax: lcg-gt [-t timeout] surl protocol

lxpub04:~/data > lcg-gt srm://lxdpm104.cern.ch/dpm/cern.ch/home/atlas/generated/2008-04-14/file8232e17f-6186-4f73-95b3-dc3f6d496fd1 gsiftp

gsiftp://lxdpm104.cern.ch/lxdpm104.cern.ch:/data01/atlas/2008-04-14/file8232e17f-6186-4f73-95b3-dc3f6d496fd1.141352.0141380

Page 43: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

*Adds an alias in the catalogue for a given GUID

Syntax:

lcg-aa [--config config_file] [-h | --help] [-i | --insecure] [--vo vo] guid lfn

lxpub04:~/data > lcg-aa --vo atlas da781a56-5450-470e-9ae9-7e2950dd1d1f lfn:/grid/atlas/tutorial/Dubl_File2

lxpub04:~/data > lfc-ls -l /grid/atlas/tutorial/

lrwxrwxrwx 1 107 102 0 Apr 14 17:40 Dubl_File2 -> /grid/atlas/tutorial/File2.txt -rw-rw-r-- 1 107 102 24 Apr 14 16:48 File2.txt -rw-rw-r-- 1 107 102 5 Apr 14 16:54 new -rw-rw-r-- 1 107 102 19896 Apr 14 16:42 test

Page 44: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

*Lists the aliases for a given LFN, GUID or SURL

Syntax:

lcg-la [--config config_file] [-h | --help] [-i | --insecure] [--vo vo] file

lxpub04:~/data > lcg-la --vo atlas lfn:/grid/atlas/tutorial/File2.txt

lfn:/grid/atlas/tutorial/File2.txt lfn:/grid/atlas/tutorial/Dubl_File2

Page 45: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

*Deletes one file (either one replica or all replicas)

Syntax:

lcg-del [-a] [--config config_file] [-h | --help] [-i | --insecure] [-t timeout][-s se] [-v | --verbose] [--vo vo] file

lxpub04:~/data > lfc-ls -l /grid/atlas/tutorial

lrwxrwxrwx 1 107 102 0 Apr 14 17:40 Dubl_File2 -> /grid/atlas/tutorial/File2.txt-rw-rw-r-- 1 107 102 24 Apr 14 16:48 File2.txt-rw-rw-r-- 1 107 102 5 Apr 14 16:54 new-rw-rw-r-- 1 107 102 19896 Apr 14 16:42 test

lxpub04:~/data > lfc-getacl /grid/atlas/tutorial

# file: /grid/atlas/tutorial# owner: /C=RU/O=RDIG/OU=users/OU=jinr.ru/CN=Natalia Gromova# group: atlasuser::rwxgroup::rwx #effective:rwxother::r-xdefault:user::rwxdefault:group::rwxdefault:other::r-x

Page 46: БАЗОВЫЕ СРЕДСТВА РАБОТЫ С ФАЙЛАМИ В GRID. The gLite3 Architecture Security Service: Grid Security Infrastructure (GSI) Secure Sockets Layer (SSL) communication

lxpub04:~/data > lcg-del -v -a --vo atlas lfn:test

VO name: atlasUsing GUID : 7e7795b5-6838-4e58-93af-e56238867aabset timeout to 0 seconds

srm://lxdpm104.cern.ch/dpm/cern.ch/home/atlas/generated/2008-04-14/file37070a30-9e01-42a2-9ef6-8d2806056a03 is deleted

srm://lxdpm104.cern.ch/dpm/cern.ch/home/atlas/generated/2008-04-14/file37070a30-9e01-42a2-9ef6-8d2806056a03 is unregistered

lxpub04:~/data > lfc-ls -l /grid/atlas/tutorial

lrwxrwxrwx 1 107 102 0 Apr 14 17:40 Dubl_File2 -> /grid/atlas/tutorial/File2.txt-rw-rw-r-- 1 107 102 24 Apr 14 16:48 File2.txt-rw-rw-r-- 1 107 102 5 Apr 14 16:54 new