Skip to content

EOS disk layout CGI

At creation time, we can inject the layout properties of a file. We do it by appending cgi parameters to the file name with xrdcp:

/eos/file_path?eos.layout.type=type&eos.layout.checksum=checksum&eos.layout.blockchecksum=block_checksum&eos.layout.nstripes=number_of_stripes&eos.layout.blocksize=block_size

Force the file to have a raid 6 layout by CGI parameters

Create a file in your local disk:

touch testFile

Create a directory in EOS in the default space (no layout policy is specified)

eos mkdir /eos/tmp

Copy the local file into the newly created EOS directory with the correct CGI attributes:

xrdcp -f ./testFile 'root://localhost//eos/tmp/testFile?eos.layout.type=raid6&eos.layout.checksum=adler&eos.layout.blockchecksum=crc32c&eos.layout.nstripes=10&eos.layout.blocksize=64M'

Verify that the file has 10 stripes, has a raid6 layout and that the space of each stripes is default :

EOS Console [root://localhost] |/eos/tmp/> file info testFile
  File: '/eos/tmp/testFile'  Flags: 0644
  Size: 12
Modify: Thu Apr 23 13:58:35 2020 Timestamp: 1587643115.616137000
Change: Thu Apr 23 13:58:35 2020 Timestamp: 1587643115.446599272
Birth : Thu Apr 23 13:58:35 2020 Timestamp: 1587643115.446599272
  CUid: 3 CGid: 4  Fxid: 1000356e8 Fid: 4295186152    Pid: 4294967297   Pxid: 100000001
XStype: adler    XS: 1c f2 04 47    ETAGs: "1152980253317005312:1cf20447"
Layout: raid6 Stripes: 10 Blocksize: 64M LayoutId: 20670942
  #Rep: 10
┌───┬──────┬────────────────────────┬────────────────┬────────────────┬──────────┬──────────────┬────────────┬────────┬────────────────────────┐
│no.│ fs-id│                    host│      schedgroup│            path│      boot│  configstatus│       drain│  active│                  geotag│
└───┴──────┴────────────────────────┴────────────────┴────────────────┴──────────┴──────────────┴────────────┴────────┴────────────────────────┘
 0     1991    eosctafst0105.cern.ch        default.0        /data1109     booted             rw      nodrain   online                     flat 
 1     1996    eosctafst0105.cern.ch        default.0        /data1114     booted             rw      nodrain   online                     flat 
 2     1988    eosctafst0105.cern.ch        default.0        /data1106     booted             rw      nodrain   online                     flat 
 3     1994    eosctafst0105.cern.ch        default.0        /data1112     booted             rw      nodrain   online                     flat 
 4     1984    eosctafst0105.cern.ch        default.0        /data1102     booted             rw      nodrain   online                     flat 
 5     1985    eosctafst0105.cern.ch        default.0        /data1103     booted             rw      nodrain   online                     flat 
 6     1986    eosctafst0105.cern.ch        default.0        /data1104     booted             rw      nodrain   online                     flat 
 7     1992    eosctafst0105.cern.ch        default.0        /data1110     booted             rw      nodrain   online                     flat 
 8     1993    eosctafst0105.cern.ch        default.0        /data1111     booted             rw      nodrain   online                     flat 
 9     1987    eosctafst0105.cern.ch        default.0        /data1105     booted             rw      nodrain   online                     flat 

*******

Set the space of a file at file creation

Create a file in your local disk:

touch testFile

Create a directory in EOS in the default space (no layout policy is specified)

eos mkdir /eos/tmp

Copy the local file into the newly created EOS directory with the correct CGI attributes:

xrdcp -f ./testFile 'root://localhost//eos/tmp/testFile?eos.space=spinners'

Verify that the file is there and is in the spinners space:

file info testFile
  File: '/eos/ctaalicero/tmp/testFile'  Flags: 0644
  Size: 12
Modify: Thu Apr 23 14:33:37 2020 Timestamp: 1587645217.97107000
Change: Thu Apr 23 14:33:37 2020 Timestamp: 1587645217.67590452
Birth : Thu Apr 23 14:33:37 2020 Timestamp: 1587645217.67590452
  CUid: 3 CGid: 4  Fxid: 1000356ec Fid: 4295186156    Pid: 4294967297   Pxid: 100000001
XStype: adler    XS: 1c f2 04 47    ETAGs: "1152980254390747136:1cf20447"
Layout: plain Stripes: 1 Blocksize: 4k LayoutId: 00100002
  #Rep: 1
┌───┬──────┬────────────────────────┬────────────────┬────────────────┬──────────┬──────────────┬────────────┬────────┬────────────────────────┐
│no.│ fs-id│                    host│      schedgroup│            path│      boot│  configstatus│       drain│  active│                  geotag│
└───┴──────┴────────────────────────┴────────────────┴────────────────┴──────────┴──────────────┴────────────┴────────┴────────────────────────┘
 0      157      lxfsrd14c03.cern.ch      spinners.18          /data30     booted             rw      nodrain   online                     flat 

*******

A remark

The spinner space has its layout configured as the following :

policy.blockchecksum             := crc32c
policy.blocksize                 := 64M
policy.bloksize                  := 64M
policy.layout                    := raid6
policy.nstripes                  := 10

Nevertheless, the file has a layout "Plain" with one stripe. This shows that the file inherits its layout his parent directory layout configuration and not from the space policy configuration https://eos-docs.web.cern.ch/eos-docs/using/policies.html?highlight=polcies.