LFC Practical

From MediaWiki

(Difference between revisions)
Jump to: navigation, search
(Created page with 'LHC Computing Grid i LCG File Catalog * Da bi rad sa LFC-om bio omogućen potrebno je podesiti promenljive koje definišu okruženje (environmental variables): * $LFC_HOST (adre…')
 
(13 intermediate revisions not shown)
Line 1: Line 1:
-
LHC Computing Grid i LCG File Catalog
+
'''LHC Computing Grid i LCG File Catalog'''
-
* Da bi rad sa LFC-om bio omogućen potrebno je podesiti promenljive koje definišu okruženje (environmental variables):
+
* In order to work with LFC user need to set environmental variables
-
* $LFC_HOST (adresa LFC servera)
+
** $LFC_HOST (address of LFC server)
-
* $LCG_CATALOG_TYPE (tip kataloga)
+
** $LCG_CATALOG_TYPE (catalog type)
-
* Možete proveriti da li su promenljive već definisane sa
+
* You can check whether variables are set with :
-
* echo $LFC_HOST
+
** echo $LFC_HOST
-
* echo $LCG_CATALOG_TYPE
+
** echo $LCG_CATALOG_TYPE
-
* Ukoliko nisu definisane potrebno je definisati ih sa
+
* If variables are not set, user can define them with:
-
* export LFC_HOST=grid02.rcub.bg.ac.yu
+
** export LFC_HOST=grid02.rcub.bg.ac.rs
-
* export LCG_CATALOG_TYPE=lfc
+
** export LCG_CATALOG_TYPE=lfc
-
* Lista dostupnih LFC servera dobija se naredbom
+
* User can get list of available LFC server with command:
-
* lcg-infosites --vo seegrid lfc
+
** lcg-infosites --vo sgdemo lfc
-
* na isti nacin mozete izlistati i dostupne SE,CE, najbliži CE nekom SE, RB... (pogledati man)
+
* You can also list available SE,CE ...
-
* Potrebno je kreirati proxy za odgovarajuću virtuelnu organizaciju (iz nekog zasad nas LFC_HOST neće da radi sa AEGIS organizacijom pa ćemo koristiti seegrid)
+
* User must make proxy for appropriate organization
-
* Sledi lista korisnih naredbi:
+
----
-
* lcg-cr – kopira fajl na SE i registruje ga u katalogu
+
-
* lcg-cp – kopira fajl sa grida na lokalnu destinaciju
+
-
* lcg-del – briše jedan fajl sa grida
+
-
* lcg-rep – pravi repliku fajla na još nekom SE
+
-
* lcg-aa – pravi novi alias (~novi LFN) u katalogu za zadati GUID ili postojeći LFN
+
-
* lcg-ra – briše postojeći alias za zadati GUID
+
-
* lcg-rf – registruje već postojeći fajl na SE-u u katalog
+
-
* lcg-uf – briše registraciju nekog fajla na SE iz kataloga
+
-
* lcg-la – ispisuje sve aliase za zadati SURL, GUID ili LFN
+
-
* lcg-lg – ispisuje GUID za zadati LFN ili SURL
+
-
* lcg-lr – ispisuje sve replike za zadati GUID, SURL ili LFN
+
-
* lfc-mkdir – kreira direktorijum u katalogu
 
-
* lfc-chmod – menja prava za korišćenje fajla ili direktorijuma
 
-
* lfc-chown – menja vlasnika fajla ili direktorijuma
 
-
* lfc-setcomment – dodaje komentar na fajl
 
-
* lfc-delcomment – briše komentar
 
-
* lfc-ln -s – kreira simbolički link na fajl/direktorijum
 
-
* lfc-ls – lista fajlove i direktorijume na zadatoj putanji
 
-
* lfc-rm – briše fajl/direktorijum iz kataloga
 
-
* lfc-rename – preimenuje fajl/direktorijum
 
 +
'''Useful commands :'''
-
Zadatak:
+
* lcg-cr –  copies file to SE and register in catalog
 +
* lcg-cp –  copies file from grid to local destination
 +
* lcg-del – delete one file from grid
 +
* lcg-rep – makes file replica on other SE
 +
* lcg-aa – makes new alias (new LFN) in catalog for given GUID or existing LFN
 +
* lcg-ra – delete existing alias for given GUID
 +
* lcg-rf – register existing file on SE into catalog
 +
* lcg-uf – delete register info of file on SE from catalog
 +
* lcg-la – LFN prints out all aliases for given SURL, GUID or LFN
 +
* lcg-lg – prints out GUID for given LFN or SURL
 +
* lcg-lr – prints out all replicas for given GUID, SURL or LFN
 +
* lfc-mkdir – create new directory in catalog
 +
* lfc-chmod – changes permissions for using a file or directory 
 +
* lfc-chown – changes owner of file or directory
 +
* lfc-setcomment – adds comment on file
 +
* lfc-delcomment – deletes comment
 +
* lfc-ln -s – creates symbolic link on file/directory
 +
* lfc-ls – lists content of given file or directory
 +
* lfc-rm – deletes file/directory from catalog
 +
* lfc-rename – renames fail/directory
-
# Kreirati direktorijum sa vašim imenom u katalogu u direktorijumu /grid/seegrid/
 
-
# Izlistati sadržaj direktorijuma /grid/seegrid
 
-
# Promeniti prava nad tim direktorijumom tako da drugi korisnici nemaju “write permissions”
 
-
# Izlistati dostupne SE
 
-
# Kreirati fajl file.txt
 
-
# Kopirati file.txt na neki od dostupnih SE i registrovati ga u kreiranom direktorijumu (iz tačke 1)
 
-
# Izlistati informacije o tom fajla u katalogu
 
-
# Napraviti repliku tog fajla na jos nekom SE-u
 
-
# Napraviti jos jedan alias za file.txt
 
-
# Izlistati informacije o tom aliasu
 
-
# Preimenovati taj alias
 
-
# Pronaći GUID za zadati alias
 
-
# Pronaći SURL za zadati GUID
 
-
# Registrovati fajl sa zadatim SURL-om
 
-
# zlistati sve replike za zadati LFN
 
-
# Izlistati sve aliase za zadati LFN
 
-
# Prebaciti fajl sa SE na lokalni računar
 
-
# Izbrisati fajl sa svih SE sve aliase
 
 +
----
 +
 +
 +
'''Hands on task: '''
 +
 +
# Create directory (name it with your username) in directory >>> Ubaci putanju <<<
 +
# List content of directory >>>Ubaci putanju<<<
 +
# Change permissions on your folder, so that other users don't have write permission.
 +
# List available Storage Elements
 +
# Create file file.txt on your UI
 +
# Copy file.txt on some other available SE i register file.txt in created folder
 +
# List informations about that file in catalog
 +
# Make replica of file on other SE
 +
# Make another alias for file.txt
 +
# List informations about alias
 +
# Rename alias
 +
# Find GUID for given alias
 +
# Find SURL for given alias
 +
# Register file with given SURL
 +
# List all replicas for given LFN
 +
# List all aliases for given LFN
 +
# Download file from SE to local computer
 +
 +
 +
----
 +
 +
 +
'''Syntax:'''
-
Sintaksa:
 
* lcg-cr [-d dest_file | dest_host][-h | --help][-l lfn][-v | --verbose] [--vo vo] src_file
* lcg-cr [-d dest_file | dest_host][-h | --help][-l lfn][-v | --verbose] [--vo vo] src_file
* lcg-cp [--vo vo]  src_file  dest_file
* lcg-cp [--vo vo]  src_file  dest_file

Latest revision as of 13:39, 8 December 2011

LHC Computing Grid i LCG File Catalog

  • In order to work with LFC user need to set environmental variables
    • $LFC_HOST (address of LFC server)
    • $LCG_CATALOG_TYPE (catalog type)
  • You can check whether variables are set with :
    • echo $LFC_HOST
    • echo $LCG_CATALOG_TYPE
  • If variables are not set, user can define them with:
    • export LFC_HOST=grid02.rcub.bg.ac.rs
    • export LCG_CATALOG_TYPE=lfc
  • User can get list of available LFC server with command:
    • lcg-infosites --vo sgdemo lfc
  • You can also list available SE,CE ...
  • User must make proxy for appropriate organization




Useful commands :

  • lcg-cr – copies file to SE and register in catalog
  • lcg-cp – copies file from grid to local destination
  • lcg-del – delete one file from grid
  • lcg-rep – makes file replica on other SE
  • lcg-aa – makes new alias (new LFN) in catalog for given GUID or existing LFN
  • lcg-ra – delete existing alias for given GUID
  • lcg-rf – register existing file on SE into catalog
  • lcg-uf – delete register info of file on SE from catalog
  • lcg-la – LFN prints out all aliases for given SURL, GUID or LFN
  • lcg-lg – prints out GUID for given LFN or SURL
  • lcg-lr – prints out all replicas for given GUID, SURL or LFN
  • lfc-mkdir – create new directory in catalog
  • lfc-chmod – changes permissions for using a file or directory
  • lfc-chown – changes owner of file or directory
  • lfc-setcomment – adds comment on file
  • lfc-delcomment – deletes comment
  • lfc-ln -s – creates symbolic link on file/directory
  • lfc-ls – lists content of given file or directory
  • lfc-rm – deletes file/directory from catalog
  • lfc-rename – renames fail/directory




Hands on task:

  1. Create directory (name it with your username) in directory >>> Ubaci putanju <<<
  2. List content of directory >>>Ubaci putanju<<<
  3. Change permissions on your folder, so that other users don't have write permission.
  4. List available Storage Elements
  5. Create file file.txt on your UI
  6. Copy file.txt on some other available SE i register file.txt in created folder
  7. List informations about that file in catalog
  8. Make replica of file on other SE
  9. Make another alias for file.txt
  10. List informations about alias
  11. Rename alias
  12. Find GUID for given alias
  13. Find SURL for given alias
  14. Register file with given SURL
  15. List all replicas for given LFN
  16. List all aliases for given LFN
  17. Download file from SE to local computer




Syntax:

  • lcg-cr [-d dest_file | dest_host][-h | --help][-l lfn][-v | --verbose] [--vo vo] src_file
  • lcg-cp [--vo vo] src_file dest_file
  • lcg-del [-a] [-s se] [--vo vo] file
  • lcg-rep [-d dest_file | dest_host] [--vo vo] src_file
  • lcg-aa [--vo vo] guid lfn
  • lcg-ra [--vo vo] guid lfn
  • lcg-rf [-g guid][-l lfn] [-v | --verbose] [--vo vo] surl
  • lcg-uf [--vo vo] guid surl
  • lcg-la [--vo vo] file
  • lcg-lg [--vo vo] lfn_or_surl
  • lcg-lr [--vo vo] file
  • lfc-mkdir dirname
  • lfc-chmod mode file
  • lfc-chown [-h] [-R] owner[:group] file
  • lfc-setcomment file comment
  • lfc-delcomment file
  • lfc-ln -s file [link] ili lfc-ln -s file...directory
  • lfc-ls [-cdilRTu] [--class] [--comment] [--deleted] path
  • lfc-rm [-f] [-i] file ili lfc-rm [-f] [-i] -r dirname...
  • lfc-rename oldname newname
Personal tools