Distributed Filesystems

Distributed Filesystem (DFS) is a file system which allows access to files from multiple hosts sharing via a computer network. This makes it possible for multiple users on multiple machines to share files and storage resources.

Operations

Distributed Filesystems are made up of three parts: Devices, Networks, and Filesystems. The API allows for basic creating, listing, destroying and retrieving of these pieces as well as more specific operations such as mounting a DFS or pinging a Network.

Note: Distributed Filesystems are complex in nature and information returned by a single node vary depending on the topology of your DFS. As such, when making calls to a system, you will only see information about what that individual node knows about the DFS.

Devices

The building blocks of a Distributed filesystem are the Metadata and Object Storage devices, which provide namespace operations and bulk IO services respectively.

There is also the Management Device, which is a global registry for configuration information that is functionally independent of any single instance.

These routes are dedicated to listing and retrieving device information

List Devices

Send this request to get back a list of all devices on a node.

Request Object

+ URL
  /api/v2/lustre/device

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

The response will be an object containing warnings (if any), raw output, and an array of all devices

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "warnings": "",
    "raw": "  0 UP mgc MGC192.168.7.64@tcp1 229455a9-8772-4 4\n  1 UP lov cowboy-clilov-ffff96d33e7d7800 466b0c0e-6f66-4 3\n  2 UP lmv cowboy-clilmv-ffff96d33e7d7800 466b0c0e-6f66-4 4\n  3 UP mdc cowboy-MDT0000-mdc-ffff96d33e7d7800 466b0c0e-6f66-4 4 192.168.7.64@tcp1\n  4 UP osc cowboy-OST0000-osc-ffff96d33e7d7800 466b0c0e-6f66-4 4 192.168.7.64@tcp1\n",
    "parsed": [
        {
            "status": "UP",
            "type": "mgc",
            "name": "MGC192.168.7.64@tcp1",
            "short_name": "MGC192.168.7.64@tcp1",
            "uuid": "229455a9-8772-4",
            "ref_count": "4"
        },
        {
            "status": "UP",
            "type": "lov",
            "name": "cowboy-clilov-ffff96d33e7d7800",
            "short_name": "cowboy-clilov",
            "index": "clilov",
            "uuid": "466b0c0e-6f66-4",
            "ref_count": "3",
            "filesystem": "cowboy"
        },
        {
            "status": "UP",
            "type": "lmv",
            "name": "cowboy-clilmv-ffff96d33e7d7800",
            "short_name": "cowboy-clilmv",
            "index": "clilmv",
            "uuid": "466b0c0e-6f66-4",
            "ref_count": "4",
            "filesystem": "cowboy"
        },
        {
            "status": "UP",
            "type": "mdc",
            "name": "cowboy-MDT0000-mdc-ffff96d33e7d7800",
            "short_name": "cowboy-MDT0000",
            "index": "MDT0000",
            "uuid": "466b0c0e-6f66-4",
            "ref_count": "4",
            "filesystem": "cowboy",
            "nid": "192.168.7.64@tcp1"
        },
        {
            "status": "UP",
            "type": "osc",
            "name": "cowboy-OST0000-osc-ffff96d33e7d7800",
            "short_name": "cowboy-OST0000",
            "index": "OST0000",
            "uuid": "466b0c0e-6f66-4",
            "ref_count": "4",
            "filesystem": "cowboy",
            "nid": "192.168.7.64@tcp1"
        }
    ]
}

Get Management Device Information

Send this request to get back information on a nodes Management Device

Request Object

+ URL
  /api/v2/lustre/device/mgs

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

The response will be an object containing Management Information

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
      "uuid": "MGS",
      "filesystems": [
          "cowboy"
      ],
      "fstype": "zfs",
      "mntdev": "Pool1/mgs"
  }

Get Object Storage/Metadata Information

Send this request to get back information on a nodes Object Storage and/or Metadata Device

Request Object

+ URL
  /api/v2/lustre/device/:device/details

+ Method
  GET

+ Parameters
  device (required) - name of the device i.e cowboy-MDT0000

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
      "devices": {
          "osd-zfs": {
              "name": "cowboy-MDT0000",
              "uuid": "cowboy-MDT0000-osd_UUID",
              "blocksize": "131072",
              "kbytesavail": "3722117120",
              "kbytesfree": "3722119168",
              "kbytestotal": "3722122240",
              "mntdev": "Pool1/cowboy_mdt_0"
          },
          "mdt": {
              "name": "cowboy-MDT0000",
              "uuid": "cowboy-MDT0000_UUID",
              "readonly": "0"
          },
          "mdd": {
              "name": "cowboy-MDT0000",
              "uuid": "cowboy-MDD0000_UUID"
          }
      },
      "mgs": "192.168.7.64@tcp1",
      "name": "cowboy-MDT0000",
      "filesystem": "cowboy",
      "type": "mdt",
      "index": "MDT0000"
  }

Networks

High-speed data network protocol that clients use to access the distributed filesystem. Supports Ethernet and RoCE over RDMA.

List Networks

Get a list of all distributed filesystem networks the node is a part of

Request Object

+ URL
  /api/v2/lustre/lnet

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

You will get back an array of networks

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  [
      {
          "net_type": "lo",
          "local_ni_s": [
              {
                  "nid": "0@lo",
                  "status": "up"
              }
          ]
      },
      {
          "net_type": "tcp1",
          "local_ni_s": [
              {
                  "nid": "192.168.7.64@tcp1",
                  "status": "up",
                  "interfaces": {
                      "0": "mgmt0"
                  }
              }
          ]
      }
  ]

Get Status

Get the current operational status of the network on the node

Request Object

+ URL
  /api/v2/lustre/lnet/status

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

You will get back a string denoting the status

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  "running\n"

Get Network Properties

Get the current global settings for the node’s network

Request Object

+ URL
  /api/v2/lustre/lnet/properties

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

You will get back an unparsed string of network properties

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  "global:\n    numa_range: 0\n    max_intf: 200\n    discovery: 1\n    drop_asym_route: 0\n    retry_count: 3\n    transaction_timeout: 10\n    health_sensitivity: 100\n    recovery_interval: 1\n    router_sensitivity: 100\n"

Prepare Network

Loads network interfaces configuration from module parameters

Request Object

+ URL
  /api/v2/lustre/lnet/prepare

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Reponse Object

Return of an empty string denotes a successful call

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  ""

Create Network

Add a distributed filesystem network

Request Object

+ URL
  /api/v2/lustre/lnet/add

+ Method
  POST

+ Parameters
  lnetName (string, required) network name (e.g tcp0)
  faceName (string, required) physical interface (e.g mgmt0)

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    lnetName: "tcp0",
    faceName: "mgmt0"
  }

Response Object

You will get an object with the parameters you passed in and a result containing a string of unparsed current network information

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
      "result": "net:\n  - net type: tcp1\n    local NI(s):\n      - nid: 192.168.7.64@tcp1\n        status: up\n        interfaces:\n          \"0\": mgmt0\n        statistics:\n          send_count: 709860\n          recv_count: 709865\n          drop_count: 0\n        sent_stats:\n          put: 708748\n          get: 1112\n          reply: 0\n          ack: 0\n          hello: 0\n        received_stats:\n          put: 708739\n          get: 603\n          reply: 509\n          ack: 14\n          hello: 0\n        dropped_stats:\n          put: 0\n          get: 0\n          reply: 0\n          ack: 0\n          hello: 0\n        health stats:\n          health value: 1000\n          interrupts: 0\n          dropped: 0\n          aborted: 0\n          no route: 0\n          timeouts: 1\n          error: 0\n        tunables:\n          peer_timeout: 180\n          peer_credits: 8\n          peer_buffer_credits: 0\n          credits: 256\n        dev cpt: 0\n        tcp bonding: 0\n        CPT: \"[0,1]\"\n  - net type: tcp3\n    local NI(s):\n      - nid: 192.168.7.64@tcp3\n        status: up\n        interfaces:\n          \"0\": mgmt0\n        statistics:\n          send_count: 0\n          recv_count: 0\n          drop_count: 0\n        sent_stats:\n          put: 0\n          get: 0\n          reply: 0\n          ack: 0\n          hello: 0\n        received_stats:\n          put: 0\n          get: 0\n          reply: 0\n          ack: 0\n          hello: 0\n        dropped_stats:\n          put: 0\n          get: 0\n          reply: 0\n          ack: 0\n          hello: 0\n        health stats:\n          health value: 1000\n          interrupts: 0\n          dropped: 0\n          aborted: 0\n          no route: 0\n          timeouts: 0\n          error: 0\n        tunables:\n          peer_timeout: 180\n          peer_credits: 8\n          peer_buffer_credits: 0\n          credits: 256\n        dev cpt: 0\n        tcp bonding: 0\n        CPT: \"[0,1]\"\n",
      "lnetName": "tcp3",
      "faceName": "mgmt0"
  }

Remove Network

Remove a distributed filesystem network

Request Object

+ URL
  /api/v2/lustre/lnet/remove

+ Parameters
  lnetName (string, required) network name (e.g tcp0)
  faceName (string, required) physical interface (e.g mgmt0)

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    lnetName: "tcp0",
    faceName: "mgmt0"
  }

Response Object

You will get an object with the parameters you passed in and a result containing a string of unparsed current network information

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
      "result": "net:\n  - net type: tcp1\n    local NI(s):\n      - nid: 192.168.7.64@tcp1\n        status: up\n        interfaces:\n          \"0\": mgmt0\n        statistics:\n          send_count: 709949\n          recv_count: 709955\n          drop_count: 0\n        sent_stats:\n          put: 708837\n          get: 1112\n          reply: 0\n          ack: 0\n          hello: 0\n        received_stats:\n          put: 708826\n          get: 603\n          reply: 509\n          ack: 17\n          hello: 0\n        dropped_stats:\n          put: 0\n          get: 0\n          reply: 0\n          ack: 0\n          hello: 0\n        health stats:\n          health value: 1000\n          interrupts: 0\n          dropped: 0\n          aborted: 0\n          no route: 0\n          timeouts: 1\n          error: 0\n        tunables:\n          peer_timeout: 180\n          peer_credits: 8\n          peer_buffer_credits: 0\n          credits: 256\n        dev cpt: 0\n        tcp bonding: 0\n        CPT: \"[0,1]\"\n",
      "lnetName": "tcp3",
      "faceName": "mgmt0"
  }

Import Network Configuration

Import a network configuration. You must import in YAML notation formatted as a JSON object. There are various online tool to help perform this conversion (e.g https://www.json2yaml.com/convert-yaml-to-json)

Request Object

+ URL
  /api/v2/lustre/lnet/import_config

+ Method
  POST

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "net": [
      {
        "net type": "tcp0",
        "local NI(s)": [
          {
            "nid": "192.168.7.64@tcp1",
            "status": "up",
            "interfaces": {
              "0": "mgmt0"
            },
            "statistics": {
              "send_count": 0,
              "recv_count": 0,
              "drop_count": 0
            },
            "sent_stats": {
              "put": 0,
              "get": 0,
              "reply": 0,
              "ack": 0,
              "hello": 0
            },
            "received_stats": {
              "put": 0,
              "get": 0,
              "reply": 0,
              "ack": 0,
              "hello": 0
            },
            "dropped_stats": {
              "put": 0,
              "get": 0,
              "reply": 0,
              "ack": 0,
              "hello": 0
            },
            "health stats": {
              "health value": 1000,
              "interrupts": 0,
              "dropped": 0,
              "aborted": 0,
              "no route": 0,
              "timeouts": 0,
              "error": 0
            },
            "tunables": {
              "peer_timeout": 180,
              "peer_credits": 8,
              "peer_buffer_credits": 0,
              "credits": 256
            },
            "dev cpt": 0,
            "tcp bonding": 0,
            "CPT": "[0,1]"
          }
        ]
      }
    ]
  }

Response Object

A successfull response will return a string of the temp file location of the network configuration

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  "/tmp/lnet_config.yaml"

Export Network Configuration

Request Object

+ URL
  /api/v2/lustre/lnet/export_config

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

You will get back an unparsed string of the current network configuration

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  "net:\n    - net type: lo\n      local NI(s):\n        - nid: 0@lo\n          status: up\n          statistics:\n              send_count: 8\n              recv_count: 8\n              drop_count: 0\n          sent_stats:\n              put: 6\n              get: 2\n              reply: 0\n              ack: 0\n              hello: 0\n          received_stats:\n              put: 3\n              get: 1\n              reply: 1\n              ack: 3\n              hello: 0\n          dropped_stats:\n              put: 0\n              get: 0\n              reply: 0\n              ack: 0\n              hello: 0\n          health stats:\n              health value: 7\n              interrupts: 0\n              dropped: 0\n              aborted: 0\n              no route: 0\n              timeouts: 0\n              error: 0\n          tunables:\n              peer_timeout: 0\n              peer_credits: 0\n              peer_buffer_credits: 0\n              credits: 0\n          dev cpt: 0\n          tcp bonding: 0\n          CPT: \"[0,1]\"\n    - net type: tcp1\n      local NI(s):\n        - nid: 192.168.7.64@tcp1\n          status: up\n          interfaces:\n              0: mgmt0\n          statistics:\n              send_count: 710076\n              recv_count: 710082\n              drop_count: 0\n          sent_stats:\n              put: 708964\n              get: 1112\n              reply: 0\n              ack: 0\n              hello: 0\n          received_stats:\n              put: 708953\n              get: 603\n              reply: 509\n              ack: 17\n              hello: 0\n          dropped_stats:\n              put: 0\n              get: 0\n              reply: 0\n              ack: 0\n              hello: 0\n          health stats:\n              health value: 1000\n              interrupts: 0\n              dropped: 0\n              aborted: 0\n              no route: 0\n              timeouts: 1\n              error: 0\n          tunables:\n              peer_timeout: 180\n              peer_credits: 8\n              peer_buffer_credits: 0\n              credits: 256\n          dev cpt: 0\n          tcp bonding: 0\n          CPT: \"[0,1]\"\npeer:\n    - primary nid: 192.168.6.77@tcp1\n      Multi-Rail: True\n      peer ni:\n        - nid: 192.168.6.77@tcp1\n          state: NA\n          max_ni_tx_credits: 8\n          available_tx_credits: 8\n          min_tx_credits: 5\n          tx_q_num_of_buf: 0\n          available_rtr_credits: 8\n          min_rtr_credits: 8\n          refcount: 1\n          statistics:\n              send_count: 39497\n              recv_count: 39499\n              drop_count: 0\n          sent_stats:\n              put: 38441\n              get: 1056\n              reply: 0\n              ack: 0\n              hello: 0\n          received_stats:\n              put: 38440\n              get: 574\n              reply: 482\n              ack: 3\n              hello: 0\n          dropped_stats:\n              put: 0\n              get: 0\n              reply: 0\n              ack: 0\n              hello: 0\n          health stats:\n              health value: 1000\n              dropped: 7\n              timeout: 0\n              error: 10\n              network timeout: 0\n    - primary nid: 192.168.7.64@tcp1\n      Multi-Rail: True\n      peer ni:\n        - nid: 0@lo\n          state: NA\n          max_ni_tx_credits: 0\n          available_tx_credits: 0\n          min_tx_credits: 0\n          tx_q_num_of_buf: 0\n          available_rtr_credits: 0\n          min_rtr_credits: 0\n          refcount: 1\n          statistics:\n              send_count: 0\n              recv_count: 8\n              drop_count: 0\n          sent_stats:\n              put: 0\n              get: 0\n              reply: 0\n              ack: 0\n              hello: 0\n          received_stats:\n              put: 3\n              get: 1\n              reply: 1\n              ack: 3\n              hello: 0\n          dropped_stats:\n              put: 0\n              get: 0\n              reply: 0\n              ack: 0\n              hello: 0\n          health stats:\n              health value: 1000\n              dropped: 0\n              timeout: 0\n              error: 0\n              network timeout: 0\n        - nid: 192.168.7.64@tcp1\n          state: NA\n          max_ni_tx_credits: 8\n          available_tx_credits: 8\n          min_tx_credits: 2\n          tx_q_num_of_buf: 0\n          available_rtr_credits: 8\n          min_rtr_credits: 8\n          refcount: 1\n          statistics:\n              send_count: 543622\n              recv_count: 543622\n              drop_count: 0\n          sent_stats:\n              put: 543582\n              get: 40\n              reply: 0\n              ack: 0\n              hello: 0\n          received_stats:\n              put: 543577\n              get: 20\n              reply: 20\n              ack: 5\n              hello: 0\n          dropped_stats:\n              put: 0\n              get: 0\n              reply: 0\n              ack: 0\n              hello: 0\n          health stats:\n              health value: 1000\n              dropped: 0\n              timeout: 0\n              error: 0\n              network timeout: 0\n    - primary nid: 192.168.7.62@tcp1\n      Multi-Rail: True\n      peer ni:\n        - nid: 192.168.7.62@tcp1\n          state: NA\n          max_ni_tx_credits: 8\n          available_tx_credits: 8\n          min_tx_credits: 4\n          tx_q_num_of_buf: 0\n          available_rtr_credits: 8\n          min_rtr_credits: 8\n          refcount: 1\n          statistics:\n              send_count: 126943\n              recv_count: 126947\n              drop_count: 0\n          sent_stats:\n              put: 126941\n              get: 2\n              reply: 0\n              ack: 0\n              hello: 0\n          received_stats:\n              put: 126936\n              get: 2\n              reply: 0\n              ack: 9\n              hello: 0\n          dropped_stats:\n              put: 0\n              get: 0\n              reply: 0\n              ack: 0\n              hello: 0\n          health stats:\n              health value: 1000\n              dropped: 0\n              timeout: 0\n              error: 0\n              network timeout: 0\nglobal:\n    numa_range: 0\n    max_intf: 200\n    discovery: 1\n    drop_asym_route: 0\n"

Verify Network Configuration

Verify the input as a valid network configuration. You must import in YAML notation formatted as a JSON object.

Request Object

+ URL
  /api/v2/lustre/lnet/show_config

+ Method
  POST

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "net": [
      {
        "net type": "tcp0",
        "local NI(s)": [
          {
            "nid": "192.168.7.64@tcp1",
            "status": "up",
            "interfaces": {
              "0": "mgmt0"
            },
            "statistics": {
              "send_count": 0,
              "recv_count": 0,
              "drop_count": 0
            },
            "sent_stats": {
              "put": 0,
              "get": 0,
              "reply": 0,
              "ack": 0,
              "hello": 0
            },
            "received_stats": {
              "put": 0,
              "get": 0,
              "reply": 0,
              "ack": 0,
              "hello": 0
            },
            "dropped_stats": {
              "put": 0,
              "get": 0,
              "reply": 0,
              "ack": 0,
              "hello": 0
            },
            "health stats": {
              "health value": 1000,
              "interrupts": 0,
              "dropped": 0,
              "aborted": 0,
              "no route": 0,
              "timeouts": 0,
              "error": 0
            },
            "tunables": {
              "peer_timeout": 180,
              "peer_credits": 8,
              "peer_buffer_credits": 0,
              "credits": 256
            },
            "dev cpt": 0,
            "tcp bonding": 0,
            "CPT": "[0,1]"
          }
        ]
      }
    ]
  }

Response Object

A successful verification will return an unparsed string of what the passed in configuration will look like in YAML format

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  "net:\n    - net type: lo\n      local NI(s):\n        - nid: 0@lo\n          status: up\n    - net type: tcp1\n      local NI(s):\n        - nid: 192.168.7.62@tcp1\n          status: up\n          interfaces:\n              0: mgmt0\n    - net type: tcp\n      local NI(s):\n        - nid: 192.168.7.62@tcp\n          status: up\n          interfaces:\n              0: mgmt0\n"

List Network Peers

List peers of each network identifier

Request Object

+ URL
  /api/v2/lustre/lnet/peer_list

+ Method
  GET

+ Parameters
  verbose (boolean) display detailed output per peer

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Returns an array of network identifiers and their peer information

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  [
      {
          "primary_nid": "192.168.7.64@tcp1",
          "multi_rail": true,
          "peer_ni": [
              {
                  "nid": "192.168.7.64@tcp1",
                  "state": "NA"
              }
          ]
      }
  ]

Ping Network

Ping a network identifier

Request Object

+ URL
  /api/v2/lustre/lnet/:nid/ping

+ Method
  GET

+ Parameter
  nid (required) pings the specified network identifier (e.g 192.168.7.62@tcp1)

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Returns an object with warnings, raw output, and parsed output of the ping

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
      "warnings": "",
      "raw": "12345-0@lo\n12345-192.168.7.62@tcp1\n12345-192.168.7.62@tcp\n",
      "parsed": [
          "12345-0@lo",
          "12345-192.168.7.62@tcp1",
          "12345-192.168.7.62@tcp"
      ]
  }

Filesystems

These routes are dedicated to the operations of listing and creating a distrubuted filesystem.

List Distributed Filesystems

List all distributed filesystems mounted as a client on this system

Request Object

+ URL
  /api/v2/lustre/fs

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Returns an array of all distributed filesystems where each filesystem is an object of warnings, raw and parsed output

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  [
    {
        "raw": "UUID                   1K-blocks        Used   Available Use% Mounted on\ncowboy-MDT0000_UUID   3722076544        3072  3722071424   1% /lfsmnt/cowboy[MDT:0]\ncowboy-OST0000_UUID   3722077184        3072  3722072064   1% /lfsmnt/cowboy[OST:0]\n\nfilesystem_summary:   3722077184        3072  3722072064   1% /lfsmnt/cowboy\n\n",
        "warnings": "",
        "parsed": [
            {
                "uuid": "cowboy-MDT0000_UUID",
                "1kblocks": "3722076544",
                "used": "3072",
                "available": "3722071424",
                "use": "1%",
                "mounted": "/lfsmnt/cowboy[MDT:0]",
                "filesystem": "cowboy",
                "index": "MDT0000",
                "name": "cowboy-MDT0000",
                "type": "MDT",
                "nid": "192.168.7.64@tcp1",
                "mgs": "192.168.7.64@tcp1"
            },
            {
                "uuid": "cowboy-OST0000_UUID",
                "1kblocks": "3722077184",
                "used": "3072",
                "available": "3722072064",
                "use": "1%",
                "mounted": "/lfsmnt/cowboy[OST:0]",
                "filesystem": "cowboy",
                "index": "OST0000",
                "name": "cowboy-OST0000",
                "type": "OST",
                "nid": "192.168.7.64@tcp1",
                "mgs": "192.168.7.64@tcp1"
            },
            {
                "uuid": "cowboy-summary",
                "1kblocks": "3722077184",
                "used": "3072",
                "available": "3722072064",
                "use": "1%",
                "mounted": "/lfsmnt/cowboy",
                "filesystem": "cowboy",
                "name": "summary",
                "mgs": "192.168.7.64@tcp1"
            }
        ]
    }
  ]

Get Distributed Filesystem

Get information on the specified distributed filesystem mounted as a client

Request Object

+ URL
  /api/v2/lustre/fs/:filesystem/details

+ Method
  GET

+ Parameters
  filesystem (required) name of distributed filesystem

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Returns an object of the requested distributed filesystems with warnings, raw and parsed output

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "raw": "UUID                   1K-blocks        Used   Available Use% Mounted on\ncowboy-MDT0000_UUID   3722076544        3072  3722071424   1% /lfsmnt/cowboy[MDT:0]\ncowboy-OST0000_UUID   3722077184        3072  3722072064   1% /lfsmnt/cowboy[OST:0]\n\nfilesystem_summary:   3722077184        3072  3722072064   1% /lfsmnt/cowboy\n\n",
    "warnings": "",
    "parsed": [
        {
            "uuid": "cowboy-MDT0000_UUID",
            "1kblocks": "3722076544",
            "used": "3072",
            "available": "3722071424",
            "use": "1%",
            "mounted": "/lfsmnt/cowboy[MDT:0]",
            "filesystem": "cowboy",
            "index": "MDT0000",
            "name": "cowboy-MDT0000",
            "type": "MDT",
            "nid": "192.168.7.64@tcp1",
            "mgs": "192.168.7.64@tcp1"
        },
        {
            "uuid": "cowboy-OST0000_UUID",
            "1kblocks": "3722077184",
            "used": "3072",
            "available": "3722072064",
            "use": "1%",
            "mounted": "/lfsmnt/cowboy[OST:0]",
            "filesystem": "cowboy",
            "index": "OST0000",
            "name": "cowboy-OST0000",
            "type": "OST",
            "nid": "192.168.7.64@tcp1",
            "mgs": "192.168.7.64@tcp1"
        },
        {
            "uuid": "cowboy-summary",
            "1kblocks": "3722077184",
            "used": "3072",
            "available": "3722072064",
            "use": "1%",
            "mounted": "/lfsmnt/cowboy",
            "filesystem": "cowboy",
            "name": "summary",
            "mgs": "192.168.7.64@tcp1"
        }
    ]
  }

Verify Distributed Filesystem Device

Verify the creation/configuration parameters of the device

Request Object

+ URL
  /api/v2/lustre/fs/verify

+ Method
  POST

+ Parameters
  fsName (string, required) name of device (e.g cowboy_mdt_0)
  poolName (string, required) name of pool (e.g Pool1)

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "fsName": "cowboy_mdt_0",
    "poolName": "Pool1"
  }

Response Object

Returns an object with passed in parameters and an unparsed string of parameters

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "result": "checking for existing Lustre data: found\n\n   Read previous values:\nTarget:     cowboy-MDT0000\nIndex:      0\nLustre FS:  cowboy\nMount type: zfs\nFlags:      0x1\n              (MDT )\nPersistent mount opts: \nParameters: mgsnode=192.168.7.64@tcp1\n\n   Permanent disk data:\nTarget:     cowboy-MDT0000\nIndex:      0\nLustre FS:  cowboy\nMount type: zfs\nFlags:      0x1\n              (MDT )\nPersistent mount opts: \nParameters: mgsnode=192.168.7.64@tcp1\n",
    "fsName": "cowboy_mdt_0",
    "poolName": "Pool1"
  }

Mount Distributed Filesystem

Mount a distributed filesystem as a client (with or without persistence)

Request Object

+ URL
  /api/v2/lustre/fs/mount

+ Method
  POST

+ Parameters
  fsName (string, required) name of filesystem (e.g cowboy)
  lnetId (string, required) name of management device network identifier (e.g 192.168.7.62@tcp1)
  persist (boolean) passing true will mount the DFS with persistence

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "fsName": "wildwest",
    "lnetId": "192.168.7.62@tcp1",
    "persist": true
  }

Response Object

Returns an object with the parameters and results of the mount

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
      "result": "wildwest has been mounted",
      "fsName": "wildwest",
      "lnetId": "192.168.7.62@tcp1",
      "mountLocation": "/lfsmnt/wildwest"
  }

Create Management Server

Create a Distributed Filesystem Management Server

Request Object

+ URL
  /api/v2/lustre/fs/create_mgs

+ Method
  POST

+ Parameters
  poolName (string, required) name of the pool to create MGS on (e.g cannon)
  persist (boolean) passing true will create mgs with persistence
  reformat (boolean) passing true will reformat the existing management server with passed in parameters. Use with caution as this will destroy the current management service and all devices which rely on it

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
      "poolName": "cannon",
      "persist": true,
  }

Response Object

Returns an object with pool name and result of creation

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "result": "Enabled lustre-mount@mgs.service",
    "poolName": "cannon"
  }

Create Object Storage Device

Create an Object Storage Device

Request Object

+ URL
  /api/v2/lustre/fs/create_ost

+ Method
  POST

+ Parameters
  fsName (string, required) name of filesystem
  poolName (string, required) name of pool
  index (string, required) index value of device
  mgs_node (string, required) nid of the managment server
  persist (boolean) passing true will create mgs with persistence

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    fsName: "wildwest",
    poolName: "cannon",
    index: "0",
    mgs_node: "192.168.7.62@tcp1",
    persist: true
  }

Response Object

Returns an object with the results of creation

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
      "result": "Enabled lustre-mount@wildwest_mdt_0.service",
      "fsName": "wildwest",
      "poolName": "cannon"
  }

Create Metadata Device

Request Object

+ URL
  /api/v2/lustre/fs/create_mdt

+ Method
  POST

+ Parameters
  fsName (string, required) name of filesystem
  poolName (string, required) name of pool
  index (string, required) index value of device
  mgs_node (string, required) nid of the managment server
  persist (boolean) passing true will create mgs with persistence

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "fsName": "wildwest",
    "poolName": "cannon",
    "index": "0",
    "mgs_node": "192.168.7.62@tcp1",
    "persist": true
  }

Response Object

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
      "result": "Enabled lustre-mount@wildwest_ost_0.service",
      "fsName": "wildwest",
      "poolName": "cannon"
  }

Get FLR Configurations

Use this route to retrieve the configurations for dfs-sync.service.

Request Object

+ URL
  /api/v2/lustre/flr/get

+ Method
  GET

+ Parameters

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body

Response Object

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "max_history_size": 50,
    "run_interval": 300,
    "directories": [
      "/lfsmnt/mydfs",
      "/lfsmnt/yourdfs"
    ]
  }

Update FLR Configurations

In order to update the existing FLR configurations, you need to make a request using this route and restart dfs-sync.service. Please include "directories" in the request body in order to make a request.

Request Object

+ URL
  /api/v2/lustre/flr/update

+ Method
  POST

+ Parameters
  directories (array, required, Body) An array of strings which represent the the absolute paths of DFS
  max_history_size  (number, optional, Body) the amount of synchronization histories that you want to keep. Default: 50
  run_interval  (number, optional, Body) The interval which DFS re-syncs files (seconds). Default: 300
  max_file_list  (number, optional, Body) It controls the number of files that get seen in the log error. Default: 300
  concurrency  (number, optional, Body) The maximum number of child threads
  verbosity  (number, optional, Body) The level of logging which refers to how detailed the generated message is

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "max_history_size": 50,
    "run_interval": 300,
    "max_file_list": 5,
    "concurrency": 1,
    "verbosity": 1,
    "directories": [
      "/lfsmnt/mydfs",
      "/lfsmnt/yourdfs"
    ]
  }

Response Object

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  "Successfully updated FLR config!"