Skip to content

Instantly share code, notes, and snippets.

@arisfkiaras
Last active April 20, 2020 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arisfkiaras/ca12b5d9b722f0808e437b8dc09e7092 to your computer and use it in GitHub Desktop.
Save arisfkiaras/ca12b5d9b722f0808e437b8dc09e7092 to your computer and use it in GitHub Desktop.

See avaiable RSEs

$ rucio list-rses
CNAF-STORM
CNAF_CMS_TEMP
DESY-DCACHE
EULAKE-1
EULAKE-2
IN2P3-CC-DCACHE
INFN-NA-DPM
LAPP-DCACHE
LAPP-DPM
PIC-DCACHE
PIC-INJECT
SARA-DCACHE

See information about an RSE (useful for copying hostnames and ports)

rucio-admin rse info PIC-DCACHE
Settings:
=========
  third_party_copy_protocol: 1
  rse_type: DISK
  domain: [u'lan', u'wan']
  availability_delete: True
  delete_protocol: 1
  rse: PIC-DCACHE
  deterministic: True
  write_protocol: 1
  read_protocol: 1
  availability_read: True
  staging_area: False
  credentials: None
  availability_write: True
  lfn2pfn_algorithm: hash
  sign_url: None
  volatile: False
  verify_checksum: True
  id: dcee605ef2734b9ba295ba6eb0cc6be9
Attributes:
===========
  PIC-DCACHE: True
  fts: https://fts3-pilot.cern.ch:8446
  QOS: RAID
  verify_checksum: True
  lfn2pfn_algorithm: hash
Protocols:
==========
  davs
    extended_attributes: None
    hostname: door05.pic.es
    prefix: /rucio/pic_dcache
    domains: {u'wan': {u'read': 1, u'write': 1, u'third_party_copy': 1, u'delete': 1}, u'lan': {u'read': 1, u'write': 1, u'delete': 1}}
    scheme: davs
    port: 8452
    impl: rucio.rse.protocols.gfalv2.Default
  root
    extended_attributes: None
    hostname: xrootd.pic.es
    prefix: /pnfs/pic.es/data/escape/rucio/pic_dcache
    domains: {u'wan': {u'read': 1, u'write': 1, u'third_party_copy': 1, u'delete': 1}, u'lan': {u'read': 1, u'write': 1, u'delete': 1}}
    scheme: root
    port: 1094
    impl: rucio.rse.protocols.gfal.Default
Usage:
======
  rucio
    files: 19971
    used: 4762770870602
    rse: PIC-DCACHE
    updated_at: 2020-04-20 13:34:04
    free: None
    source: rucio
    total: 4762770870602
    rse_id: dcee605ef2734b9ba295ba6eb0cc6be9

Create a new RSE

$ rucio-admin rse add QOS-A-PIC
Added new deterministic RSE: QOS-A-PIC

Add protocol about RSE (endpoint:port//prefix)

$ rucio-admin rse add-protocol --hostname xrootd.pic.es --scheme root --prefix '/pnfs/pic.es/tape/' --port 1094 QOS-A-PIC

Add attribute on RSE

$ rucio-admin rse set-attribute --rse QOS-A-PIC --key QOS --value A
Added new RSE attribute for QOS-A-PIC: QOS-A

List RSE with QOS=A

$ rucio list-rses --expression 'QOS=A'
QOS-A-PIC

Upload a file to a random site

$ rucio upload test_qos --scope testing --rse DESY-DCACHE
2020-04-20 16:01:52,856	INFO	Preparing upload for file test_qos
2020-04-20 16:01:53,037	INFO	Successfully added replica in Rucio catalogue at DESY-DCACHE
2020-04-20 16:01:53,178	INFO	Successfully added replication rule at DESY-DCACHE
2020-04-20 16:01:53,799	INFO	Trying upload with davs to DESY-DCACHE
2020-04-20 16:01:54,821	INFO	Successfully uploaded file test_qos

Make the file avaiable on a QOS=B Site

$ rucio add-rule testing:test_qos 1 'QOS=B'
1f87409a72934e0bab2e9168ae3f5d58

Check file transfer status

$ rucio list-rules testing:test_qos
ID                                ACCOUNT    SCOPE:NAME        STATE[OK/REPL/STUCK]    RSE_EXPRESSION      COPIES  EXPIRES (UTC)    CREATED (UTC)
--------------------------------  ---------  ----------------  ----------------------  ----------------  --------  ---------------  -------------------
1a97227b69034c5d9c3528d542831bde  root       testing:test_qos  OK[1/0/0]               DESY-DCACHE              1                   2020-04-20 14:01:53
1f87409a72934e0bab2e9168ae3f5d58  root       testing:test_qos  REPLICATING[0/1/0]      QOS=B                    1                   2020-04-20 14:06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment