From T3_KR_KNU
Jump to: navigation, search

xrootd 를 활용한 SE Data 사용 가이드

xrdcp client 사용하기

$ xrdcp root:// /some/local/path/test.file
  (참조 :

$ xrdcp /some/local/path/test.file root://

libXrdPosixPreload library 사용하기

$ export LD_PRELOAD=/usr/lib64/ 
$ echo “This is a new test” >./test 

$ mkdir xroot://
$ cp ./test xroot:// 

$ cp xroot:// ./test1
$ diff ./test1 ./test 

$ rm xroot://
$ rmdir xroot://

xrdfs 사용하기

$ echo “This is a new test” >./test 
$ cat ./test
“This is a new test”
$ xrdcp ./test xroot://
$ xrdfs cluster142 ls /store/user/(username)
$ xrdfs cat /store/user/(username)/test
“This is a test”
$ xrdfs
[] / > cd store/user/(username)
[] /store/user/(username) > ls
[] /store/user/(username) > ls test
[ERROR] Server responded with an error: [3012] Error when processing list response: Not a directory: /pnfs/

[] /store/user/(username) > cat test
“This is a test”

[] /store/user/(username) > mkdir testdir
[] /store/user/(username) > ls

[] /store/user/(username) > mv test testdir
[ERROR] Server responded with an error: [3005] Will not overwrite existing file (File exists:/pnfs/

[] /store/user/(username) > mv test testdir/test
[] /store/user/(username) > cd testdir
[] /store/user/(username)/testdir > ls

[] /store/user/(username)/testdir > rm test
[] /store/user/(username)/testdir > cd ..
[] /store/user/(username) > rmdir testdir
[] / > quit

$ xrdfs --help
   xrdfs [--no-cwd] host[:port]              - interactive mode
   xrdfs            host[:port] command args - batch mode

Available options:

  --no-cwd no CWD is being preset

Available commands:

    Exits from the program.

                              tpc           - support for third party copies
                              wan_port      - the port to use for wan copies
                              wan_window    - the wan_port window size
                              window        - the tcp window size
                              cms           - the status of the cmsd
                              role          - the role in a cluster
                              sitename      - the site name
                              version       - the version of the server
    checksumcancel <path>   File checksum cancellation
    checksum       <path>   File checksum
    opaque         <arg>    Implementation dependent
    opaquefile     <arg>    Implementation dependent
    space          <space>  Logical space stats
    stats          <what>   Server stats; <what> is a list
                            of letters indicating information
                            to be returned:
                              a - all statistics
                              p - protocol statistics
                              b - buffer usage statistics
                              s - scheduling statistics
                              d - device polling statistics
                              u - usage statistics
                              i - server identification
                              z - synchronized statistics
                              l - connection statistics
    xattr          <path>   Extended attributes

  rm <filename>
    Remove a file.

  rmdir <dirname>
    Remove a directory.

  truncate <filename> <length>
    Truncate a file.

  prepare [-c] [-f] [-s] [-w] [-p priority] filenames
    Prepare one or more files for access.
    -c co-locate staged files if possible
    -f refresh file access time even if the location is known
    -s stage the files to disk if they are not online
    -w the files will be accessed for modification
    -p priority of the request, 0 (lowest) - 3 (highest)

  cat [-o local file] file
    Print contents of a file to stdout.
    -o print to the specified local file

  tail [-c bytes] [-f] file
    Output last part of files to stdout.
    -c num_bytes out last num_bytes
    -f           output appended data as file grows

  spaceinfo path
    Get space statistics for given path.