From T3_KR_KNU
Revision as of 08:53, 3 May 2016 by Hanbi (Talk | contribs) (uberftp 의 단점)

Jump to: navigation, search

1 uberftp 사용법

uberftp는 Grid 환경에서 Storege Element를 일반 ftp client 처럼 쉽게 사용할수 있는 툴입니다.

그리드 인증기반의 프로그램이므로 사용하기전에 반드시 다음과 같이 인증절차를 진행해야 합니다.

$ voms-proxy-init --voms cms

uberftp는 interactive 모드, 혹은 command line 모드로 사용가능합니다.

  • Interactive 모드
$ uberftp cluster142.knu.ac.kr

interactive 모드의 경우에는 과거에 혹시 ftp client를 사용하신 경험이 있다면 쉽게 이해하실수 있을 거라고 생각되는데 긴 srm url를 입력할 필요없이 서버명으로 접속가능하며 cd 명령어로 디렉토리를 오가면서 데이터 전송이나 업로드 작업을 진행할 수 있습니다.

사용자 홈디렉토리는 /pnfs/knu.ac.kr/data/cms/store/user/"CERN ID" 입니다. 경북대 ID가 아니라 CERN ID임을 유의해주십시요.
혹시 본인의 디렉토리가 생성되지 않았다면 lcg_knu@knu.ac.kr 로 연락주세요.

$ uberftp cluster142.knu.ac.kr
220 GSI FTP door ready
200 User :globus-mapping: logged in
UberFTP (2.8)> cd /pnfs/knu.ac.kr/data/cms/store/user/testid
UberFTP (2.8)> ls
drwx------  1 testid      testid               512 11? 30  2012 CMSSW_1_6_12
-r--------  1 testid      testid               546 11? 30  2012 histograms_7.root
-r--------  1 testid      testid             22018 11? 30  2012 output_3.root
-r--------  1 testid      testid             21673 11? 30  2012 output_2.root
-r--------  1 testid      testid               546 11? 30  2012 histograms_6.root
-r--------  1 testid      testid             22018 11? 30  2012 output_6.root
-r--------  1 testid      testid             22018 11? 30  2012 output_9.root
  • Command line 모드
$ uberftp cluster142.knu.ac.kr "ls /pnfs/knu.ac.kr/data/cms/store/user/(userid)"

command line 모드에서는 다음과 같이 한줄의 명령어로 즉각적인 결과를 확인할 수 있습니다.

$ uberftp cluster142.knu.ac.kr "ls /pnfs/knu.ac.kr/data/cms/store/user/testid"
220 GSI FTP door ready
200 User :globus-mapping: logged in
drwx------  1 testid      testid               512 11? 30  2012 CMSSW_1_6_12
-r--------  1 testid      testid               546 11? 30  2012 histograms_7.root
-r--------  1 testid      testid             22018 11? 30  2012 output_3.root
-r--------  1 testid      testid             21673 11? 30  2012 output_2.root
-r--------  1 testid      testid               546 11? 30  2012 histograms_6.root
-r--------  1 testid      testid             22018 11? 30  2012 output_6.root
-r--------  1 testid      testid             22018 11? 30  2012 output_9.root
-r--------  1 testid      testid               546 11? 30  2012 histograms_3.root

2 uberftp 의 장점

  • "?" 나 "*" 와 같은 와일드 카드가 사용 가능합니다.
UberFTP (2.8)> ls output_?.root
-rw-r--r--  77420    1399              22018  Dec  1 07:06  output_3.root
-rw-r--r--  77420    1399              21673  Dec  1 07:06  output_2.root
-rw-r--r--  77420    1399              22018  Dec  1 07:06  output_6.root
  • 파일을 받고 올릴때 "-r" 옵션을 주면 디렉토리를 그대로 업로드 할 수 있습니다.
$ get -r directory
$ put -r directory 
  • 디렉토리 삭제도 가능합니다.
$ rm -r directory 
  • 1000개 파일 제한 문제가 없습니다.

lcg-ls나 gfal-ls 명령을 사용할 때 해당 디렉토리에 1000개 이상의 파일이 존재한다면, 한번에 1000개 이상의 파일을 리스트 할수 없는 제한이 있는데 uberftp에는 그런 제한이 없습니다.

3 uberftp 의 단점

  • 병렬 전송을 지원하지 않습니다. 때문에 원거리 데이터 전송에서는 병렬 전송을 지원하는 프로그램과 비교하여 상대적으로 전송속도가 느릴수 있습니다.

4 uberftp 사용시 주의 사항

  • "-r" 옵션으로 데이터를 대량으로 삭제할때 해당 디렉토리를 반드시 확인해주세요. 한번 삭제한 데이터는 되돌릴 수 없습니다.
  • 대량으로 파일들을 올리고 받을때는 디스크 여유공간과 업로드할 데이터의 크기를 사전에 반드시 확인해 주시기 바랍니다. 의도치 않게 디스크 여유 공간보다 많은 데이터를 전송할수 있습니다.
  • Storage Element의 여유 공간을 확인하는 방법을 모르신다면 클릭

5 help 명령 사용하기

자세한 사용법은 help 명령을 통해서 확인할수 있습니다.

UberFTP (2.8)> help
Usage "help [topic]" where topic is one of:
!               ?               active          ascii           binary
blksize         bugs            bye             cat             cd
cdup            chgrp           chmod           cksum           cos
close           dcau            debug           dir             family
get             glob            hash            help            keepalive
lcat            lcd             lcdup           lchgrp          lchmod
lclose          ldir            link            llink           lls
llscos          llsfam          lmkdir          lopen           lpwd
lquote          lrename         lrm             lrmdir          ls
lscos           lsfam           lsize           lstage          lsymlink
mget            mkdir           mode            mput            open
order           parallel        passive         pbsz            pget
pput            prot            put             pwd             quit
quote           rename          resume          retry           rm
rmdir           runique         size            stage           sunique
symlink         tcpbuf          versions        wait

파일을 업로드하는 put 명령어 대한 자세한 도움말을 확인해봅시다.

UberFTP (2.8)> help put
Store file(s) to the remote service. If <source> implies multiple
transfers, either through regular expressions or by using the recursive
feature, then [destination] must be a directory. If [destination] is not
specified, <source> is used.
Usage: put [-r] <source> [destination]
-r   Recursively transfer the given directory.