Storage Devices

A storage device is any device attached to your OpenDrives system that’s designed and purposed to read, write, and retain data for a long period of time. It takes multiple storage devices to create a storage pool, and a storage pool is the basic building block for Local and Distributed Filesystems.

Basic Operations

The Basic operations for storage devices are mostly listing and viewing information related to the device.

List the Storage Devices

The storage devices available on any given OpenDrives system can be listed by the following:

Request Object

+ URL
  /api/v2/device/

+ Method
  GET

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

+ Body
  {}

Response Object

Sending this should get you back a valid response, an array of each storage device in the system. There’s a lot of data here, and its best not to request this route too frequently, as it will impact your performance slightly.

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

+ Body
  [
    {
      "devlinks": [
        "/dev/disk/by-id/ata-INTEL_SSDSC2BB120G4_CVWL442201TL120LGN",
        "/dev/disk/by-id/scsi-0ATA_INTEL_SSDSC2BB12_CVWL442201TL120LGN",
        "/dev/disk/by-id/scsi-1ATA_INTEL_SSDSC2BB120G4_CVWL442201TL120LGN",
        "/dev/disk/by-id/scsi-355cd2e404be1072c",
        "/dev/disk/by-id/scsi-SATA_INTEL_SSDSC2BB12_CVWL442201TL120LGN",
        "/dev/disk/by-id/wwn-0x55cd2e404be1072c",
        "/dev/disk/by-label/rpool",
        "/dev/disk/by-path/pci-0000:00:1f.2-ata-1",
        "/dev/disk/by-uuid/911892184360924259"
      ],
      "devname": "/dev/sda",
      "devpath": "/devices/pci0000:00/0000:00:1f.2/ata1/host1/target1:0:0/1:0:0:0/block/sda",
      "devtype": "disk",
      "dm_multipath_device_path": "0",
      "id_ata": "1",
      "id_bus": "ata",
      "id_fs_label": "rpool",
      "id_fs_label_enc": "rpool",
      "id_fs_type": "zfs_member",
      "id_fs_usage": "filesystem",
      "id_fs_uuid": "911892184360924259",
      "id_fs_uuid_enc": "911892184360924259",
      "id_fs_uuid_sub": "14487675038621446242",
      "id_fs_uuid_sub_enc": "14487675038621446242",
      "id_fs_version": "5000",
      "id_model": "INTEL_SSDSC2BB12",
      "id_model_enc": "INTEL\\x20SSDSC2BB12",
      "id_part_table_type": "gpt",
      "id_part_table_uuid": "092993b0-9d50-4d69-9801-7c5482051c19",
      "id_path": "pci-0000:00:1f.2-ata-1",
      "id_path_tag": "pci-0000_00_1f_2-ata-1",
      "id_revision": "0370",
      "id_scsi": "1",
      "id_scsi_inquiry": "1",
      "id_serial": "INTEL_SSDSC2BB120G4_CVWL442201TL120LGN",
      "id_serial_short": "CVWL442201TL120LGN",
      "id_type": "disk",
      "id_vendor": "ATA",
      "id_vendor_enc": "ATA\\x20\\x20\\x20\\x20\\x20",
      "id_wwn": "0x55cd2e404be1072c",
      "id_wwn_with_extension": "0x55cd2e404be1072c",
      "major": "8",
      "minor": "0",
      "mpath_sbin_path": "/sbin",
      "scsi_ident_lun_ata": "INTEL_SSDSC2BB120G4_CVWL442201TL120LGN",
      "scsi_ident_lun_naa_reg": "55cd2e404be1072c",
      "scsi_ident_lun_t10": "ATA_INTEL_SSDSC2BB120G4_CVWL442201TL120LGN",
      "scsi_ident_lun_vendor": "CVWL442201TL120LGN",
      "scsi_ident_serial": "CVWL442201TL120LGN",
      "scsi_model": "INTEL_SSDSC2BB12",
      "scsi_model_enc": "INTEL\\x20SSDSC2BB12",
      "scsi_revision": "0370",
      "scsi_tpgs": "0",
      "scsi_type": "disk",
      "scsi_vendor": "ATA",
      "scsi_vendor_enc": "ATA\\x20\\x20\\x20\\x20\\x20",
      "subsystem": "block",
      "tags": ":systemd:",
      "usec_initialized": "8981128",
      "syspath": "/sys/devices/pci0000:00/0000:00:1f.2/ata1/host1/target1:0:0/1:0:0:0/block/sda",
      "size_in_bytes": 120034123776,
      "partitions": [
        {
          "name": "sda1",
          "size": 1048576,
          "model": null,
          "vendor": null
        },
        {
          "name": "sda2",
          "size": 536870912,
          "model": null,
          "vendor": null
        },
        {
          "name": "sda3",
          "size": 119495138816,
          "model": null,
          "vendor": null
        }
      ],
      "model": "INTEL_SSDSC2BB12",
      "vendor": "ATA",
      "zfs_label_name": "rpool",
      "zfs_label_pool_guid": "911892184360924259",
      "zfs_label_conf_guid": "14487675038621446242",
      "zfs_label_state": 0,
      "zfs_label_state_name": "ACTIVE"
    },
    {
      "devlinks": [
        "/dev/disk/by-id/scsi-35000c5008387e583",
        "/dev/disk/by-id/scsi-SSEAGATE_ST4000NM0023_Z1Z8LQAZ0000C5415MGF",
        "/dev/disk/by-id/wwn-0x5000c5008387e583",
        "/dev/disk/by-path/pci-0000:82:00.0-sas-exp0x5003048001ecb4bf-phy25-lun-0"
      ],
      "devname": "/dev/sdaa",
      "devpath": "/devices/pci0000:80/0000:80:02.0/0000:82:00.0/host7/port-7:0/expander-7:0/port-7:0:13/end_device-7:0:13/target7:0:13/7:0:13:0/block/sdaa",
      "devtype": "disk",
      "dm_multipath_device_path": "0",
      "id_bus": "scsi",
      "id_model": "ST4000NM0023",
      "id_model_enc": "ST4000NM0023\\x20\\x20\\x20\\x20",
      "id_part_table_type": "gpt",
      "id_part_table_uuid": "de937cd0-71d0-384d-be82-777a290a93d4",
      "id_path": "pci-0000:82:00.0-sas-exp0x5003048001ecb4bf-phy25-lun-0",
      "id_path_tag": "pci-0000_82_00_0-sas-exp0x5003048001ecb4bf-phy25-lun-0",
      "id_revision": "0002",
      "id_scsi": "1",
      "id_scsi_inquiry": "1",
      "id_serial": "35000c5008387e583",
      "id_serial_short": "5000c5008387e583",
      "id_type": "disk",
      "id_vendor": "SEAGATE",
      "id_vendor_enc": "SEAGATE\\x20",
      "id_wwn": "0x5000c5008387e583",
      "id_wwn_with_extension": "0x5000c5008387e583",
      "major": "65",
      "minor": "160",
      "mpath_sbin_path": "/sbin",
      "scsi_ident_lun_naa_reg": "5000c5008387e583",
      "scsi_ident_port_naa_reg": "5000c5008387e581",
      "scsi_ident_port_relative": "1",
      "scsi_ident_serial": "Z1Z8LQAZ0000C5415MGF",
      "scsi_ident_target_naa_reg": "5000c5008387e580",
      "scsi_ident_target_name": "naa.5000C5008387E580",
      "scsi_model": "ST4000NM0023",
      "scsi_model_enc": "ST4000NM0023\\x20\\x20\\x20\\x20",
      "scsi_revision": "0002",
      "scsi_tpgs": "0",
      "scsi_type": "disk",
      "scsi_vendor": "SEAGATE",
      "scsi_vendor_enc": "SEAGATE\\x20",
      "subsystem": "block",
      "tags": ":systemd:",
      "usec_initialized": "17388214",
      "syspath": "/sys/devices/pci0000:80/0000:80:02.0/0000:82:00.0/host7/port-7:0/expander-7:0/port-7:0:13/end_device-7:0:13/target7:0:13/7:0:13:0/block/sdaa",
      "size_in_bytes": 4000787030016,
      "partitions": [
        {
          "name": "sdaa1",
          "size": 4000776716288,
          "model": null,
          "vendor": null
        },
        {
          "name": "sdaa9",
          "size": 8388608,
          "model": null,
          "vendor": null
        }
      ],
      "model": "ST4000NM0023",
      "vendor": "SEAGATE",
      "zfs_label_name": "B01",
      "zfs_label_pool_guid": "4462834617989817621",
      "zfs_label_conf_guid": "12425223738486003351",
      "zfs_label_state": 0,
      "zfs_label_state_name": "ACTIVE"
    }
  ]

Get Details of One Storage Device

If you know the serial of a particular storage device, you can just get back information on that particular device. The serial for devices is matched to the id_serial_short property.

Request Object

+ URL
  /api/v2/device/$deviceSerial/details

+ Method
  GET

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

+ Body
  {}

Response Object

Sending this should get you back a valid response, an array containing only the storage device you requested. Note this disk has a label of problematic:true, devices like this might be going bad and should be checked out by a support technician.

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

+ Body
  [
    {
      "devlinks": [
        "/dev/disk/by-id/scsi-35000c5008388109b",
        "/dev/disk/by-id/scsi-SSEAGATE_ST4000NM0023_Z1Z8LP7D0000R540VRD9",
        "/dev/disk/by-id/wwn-0x5000c5008388109b",
        "/dev/disk/by-path/pci-0000:05:00.0-sas-exp0x5003048017c5afbf-phy14-lun-0"
      ],
      "devname": "/dev/sdd",
      "devpath": "/devices/pci0000:00/0000:00:03.0/0000:05:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdd",
      "devtype": "disk",
      "dm_multipath_device_path": "0",
      "id_bus": "scsi",
      "id_model": "ST4000NM0023",
      "id_model_enc": "ST4000NM0023\\x20\\x20\\x20\\x20",
      "id_path": "pci-0000:05:00.0-sas-exp0x5003048017c5afbf-phy14-lun-0",
      "id_path_tag": "pci-0000_05_00_0-sas-exp0x5003048017c5afbf-phy14-lun-0",
      "id_revision": "0002",
      "id_scsi": "1",
      "id_scsi_inquiry": "1",
      "id_serial": "35000c5008388109b",
      "id_serial_short": "5000c5008388109b",
      "id_type": "disk",
      "id_vendor": "SEAGATE",
      "id_vendor_enc": "SEAGATE\\x20",
      "id_wwn": "0x5000c5008388109b",
      "id_wwn_with_extension": "0x5000c5008388109b",
      "major": "8",
      "minor": "48",
      "mpath_sbin_path": "/sbin",
      "scsi_ident_lun_naa_reg": "5000c5008388109b",
      "scsi_ident_port_naa_reg": "5000c50083881099",
      "scsi_ident_port_relative": "1",
      "scsi_ident_serial": "Z1Z8LP7D0000R540VRD9",
      "scsi_ident_target_naa_reg": "5000c50083881098",
      "scsi_ident_target_name": "naa.5000C50083881098",
      "scsi_model": "ST4000NM0023",
      "scsi_model_enc": "ST4000NM0023\\x20\\x20\\x20\\x20",
      "scsi_revision": "0002",
      "scsi_tpgs": "0",
      "scsi_type": "disk",
      "scsi_vendor": "SEAGATE",
      "scsi_vendor_enc": "SEAGATE\\x20",
      "subsystem": "block",
      "tags": ":systemd:",
      "usec_initialized": "117170587",
      "syspath": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdd",
      "problematic": true
    }
  ]

Find Devices

This route allows you to retrieve all devices with a certain label, all devices without a label, or both.

Request Object

+ URL
  /api/v2/device/find

+ Method
  POST


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

Response Object

Sending this should get you back a valid response, an array containing only the storage device you requested. Note this disk has a label of problematic:true, devices like this might be going bad and should be checked out by a support technician.

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

+ Body
  [
    {
      "devlinks": [
        "/dev/disk/by-id/scsi-35000c5008388109b",
        "/dev/disk/by-id/scsi-SSEAGATE_ST4000NM0023_Z1Z8LP7D0000R540VRD9",
        "/dev/disk/by-id/wwn-0x5000c5008388109b",
        "/dev/disk/by-path/pci-0000:05:00.0-sas-exp0x5003048017c5afbf-phy14-lun-0"
      ],
      "devname": "/dev/sdd",
      "devpath": "/devices/pci0000:00/0000:00:03.0/0000:05:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdd",
      "devtype": "disk",
      "dm_multipath_device_path": "0",
      "id_bus": "scsi",
      "id_model": "ST4000NM0023",
      "id_model_enc": "ST4000NM0023\\x20\\x20\\x20\\x20",
      "id_path": "pci-0000:05:00.0-sas-exp0x5003048017c5afbf-phy14-lun-0",
      "id_path_tag": "pci-0000_05_00_0-sas-exp0x5003048017c5afbf-phy14-lun-0",
      "id_revision": "0002",
      "id_scsi": "1",
      "id_scsi_inquiry": "1",
      "id_serial": "35000c5008388109b",
      "id_serial_short": "5000c5008388109b",
      "id_type": "disk",
      "id_vendor": "SEAGATE",
      "id_vendor_enc": "SEAGATE\\x20",
      "id_wwn": "0x5000c5008388109b",
      "id_wwn_with_extension": "0x5000c5008388109b",
      "major": "8",
      "minor": "48",
      "mpath_sbin_path": "/sbin",
      "scsi_ident_lun_naa_reg": "5000c5008388109b",
      "scsi_ident_port_naa_reg": "5000c50083881099",
      "scsi_ident_port_relative": "1",
      "scsi_ident_serial": "Z1Z8LP7D0000R540VRD9",
      "scsi_ident_target_naa_reg": "5000c50083881098",
      "scsi_ident_target_name": "naa.5000C50083881098",
      "scsi_model": "ST4000NM0023",
      "scsi_model_enc": "ST4000NM0023\\x20\\x20\\x20\\x20",
      "scsi_revision": "0002",
      "scsi_tpgs": "0",
      "scsi_type": "disk",
      "scsi_vendor": "SEAGATE",
      "scsi_vendor_enc": "SEAGATE\\x20",
      "subsystem": "block",
      "tags": ":systemd:",
      "usec_initialized": "117170587",
      "syspath": "/sys/devices/pci0000:00/0000:00:03.0/0000:05:00.0/host0/port-0:0/expander-0:0/port-0:0:2/end_device-0:0:2/target0:0:2/0:0:2:0/block/sdd",
      "problematic": true
    }
  ]

Analyize a Storage Device

You can often get the SMART output of a storage device by calling this route. If the device supports a SMART Scan, we will return its out to you.

Request Object

+ URL
  /api/v2/device/analysis

+ Method
  POST

+ Parameters
  path (string, required, Body) - the path of the device to be analyzed

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

+ Body
  {
    "path":"/dev/sdb"
  }

Response Object

You’ll receive back a raw text output of the SMART scan results

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

+ Body
  "smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.19.0-10-amd64] (local build)\nCopyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org\n\n=== START OF INFORMATION SECTION ===\nVendor:               SEAGATE\nProduct:              ST4000NM0023\nRevision:             0002\nCompliance:           SPC-4\nUser Capacity:        4,000,787,030,016 bytes [4.00 TB]\nLogical block size:   512 bytes\nLU is fully provisioned\nRotation Rate:        7200 rpm\nForm Factor:          3.5 inches\nLogical Unit id:      0x5000c50083880a5f\nSerial number:        Z1Z8LPBP0000R540VS2J\nDevice type:          disk\nTransport protocol:   SAS (SPL-3)\nLocal Time is:        Tue Aug  4 12:26:20 2020 PDT\nSMART support is:     Available - device has SMART capability.\nSMART support is:     Enabled\nTemperature Warning:  Enabled\n\n=== START OF READ SMART DATA SECTION ===\nSMART Health Status: OK\n\nCurrent Drive Temperature:     37 C\nDrive Trip Temperature:        60 C\n\nManufactured in week 16 of year 2015\nSpecified cycle count over device lifetime:  10000\nAccumulated start-stop cycles:  261\nSpecified load-unload count over device lifetime:  300000\nAccumulated load-unload cycles:  1948\nElements in grown defect list: 0\n\nVendor (Seagate) cache information\n  Blocks sent to initiator = 3014663933\n  Blocks received from initiator = 3203220614\n  Blocks read from cache and sent to initiator = 1894608868\n  Number of read and write commands whose size <= segment size = 111327602\n  Number of read and write commands whose size > segment size = 68369\n\nVendor (Seagate/Hitachi) factory information\n  number of hours powered up = 41020.95\n  number of minutes until next internal SMART test = 20\n\nError counter log:\n           Errors Corrected by           Total   Correction     Gigabytes    Total\n               ECC          rereads/    errors   algorithm      processed    uncorrected\n           fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors\nread:   1254848979        0         0  1254848979          0      16936.671           0\nwrite:         0        0         0         0          0      23688.694           0\n\nNon-medium error count:       10\n\nSMART Self-test log\nNum  Test              Status                 segment  LifeTime  LBA_first_err [SK ASC ASQ]\n     Description                              number   (hours)\n# 1  Background short  Completed                   -   16084                 - [-   -    -]\n# 2  Background short  Completed                   -   16083                 - [-   -    -]\n# 3  Background short  Completed                   -   16083                 - [-   -    -]\n\nLong (extended) Self Test duration: 32700 seconds [545.0 minutes]\n\n"

SED Operations

You can list or get information about the SED state of any or all devices. These are only relevant for systems with devices that are capable of Self-Encryption.

List SED Information for all Devices

The SED state of all the storage devices on any given OpenDrives system can be listed by the following:

Request Object

+ URL
  /api/v2/device/sed/list

+ Method
  POST

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

+ Parameters
  updateSedCache (boolean, required, Body) - When this parameter is true, the api will ask the SED service to query every disk on the system for its SED status. Conversely, when it is false, the api will retrieve the SED status of disks from the SED service's cache.

+ Body
  {
    "updateSedCache": false,
  }

Response Object

Sending this should get you back a valid response, an array of the SED state of every storage device in the system. It is best not to request this route too frequently with updateSedCache as true, as it will impact your performance significantly.

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

+ Body
  [
    {
        "error": null,
        "is_sed": false,
        "path": "/dev/sde",
        "sed_state": null,
        "tcg_standard": null,
        "wwn": "0x5000c5006325eb37"
    },
    {
        "error": null,
        "is_sed": true,
        "path": "/dev/sdd",
        "sed_state": "unlocked",
        "tcg_standard": "enterprise",
        "wwn": "0x5000c500637ad653"
    },
    {
        "error": null,
        "is_sed": false,
        "path": "/dev/sdc",
        "sed_state": null,
        "tcg_standard": null,
        "wwn": "0x5000c5008478780f"
    },
    {
        "error": "Unexpected output format: stdout=\"\", stderr=\"DtaDevOS::init ERROR - unknown drive type\n\"",
        "is_sed": null,
        "path": "/dev/sda",
        "sed_state": null,
        "tcg_standard": null,
        "wwn": "0x515d92117d000012"
    }
]

Get SED Information for a Device

The SED state of any storage device on an OpenDrives system can be retrieved by the following:

Request Object

+ URL
  /api/v2/device/sed/details

+ Method
  POST

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

+ Parameters
  updateSedCache (boolean, required, Body) - When this parameter is true, the api will ask the SED service to query the disk directly for its SED status. Conversely, when it is false, the api will retrieve the SED status of disk from the SED service's cache.
  wwn (string, required, Body) - The wwn is a unique identifier for the drives on your machine

+ Body
  {
    "updateSedCache": true,
    "wwn": "0x5000c500637ad653"
  }

Response Object

Sending this should get you back a valid response, an object containing the SED state of the storage device you requested. It is much less impactful to pass updateSedCache as true here compared to the list route. The impact is lessened because we are querying only one disk instead of every disk.

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

+ Body
  {
    "error": null,
    "is_sed": true,
    "path": "/dev/sdd",
    "sed_state": "locked",
    "tcg_standard": "enterprise",
    "wwn": "0x5000c500637ad653"
  }

LED Operations

You can control the operations of the attached LED for devices using this API as well. This works on OpenDrives Storage Chassis only.

Change LED of a Storage Device

You can turn on or turn off the LEDs state of a Storage device with this route.

Request Object

+ URL
  /api/v2/device/led

+ Method
  POST

+ Parameters
  device (string, required, Body) - the path or devlink of the device
  state (string, required, Body) - one of 'on' or 'off', the state to set

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

+ Body
  {
    "device": "/dev/sdb",
    "state": "on"
  }

Response Object

You’ll receive back echo of the settings you passed.

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

+ Body
  {
    "device": "/dev/sdb",
    "state": "on"
  }

Change LEDs of all Storage Devices

You can turn on or turn off the LEDs of all attached Storage devices with this route.

Request Object

+ URL
  /api/v2/device/led_all

+ Method
  POST

+ Parameters
  state (string, required, Body) - one of 'on' or 'off', the state to set

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

+ Body
  {
    "state": "on"
  }

Response Object

You’ll receive back echo of the settings you passed.

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

+ Body
  {
    "state": "on"
  }

External Device Operations

At times you might want to be able to view or mount external storage devices such as USBs to your OpenDrives storage. We have a few utility routes to help with that.

View all Storage Devices, including external ones.

The normal List Storage Device routes specifically do not include devices that are attached externally to the system, to view those items you will have to make a special request.

Request Object

+ URL
  /api/v2/device/external

+ Method
  GET

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

+ Body
  {}

Response Object

You’ll receive back a list of all storage devices, internal and external, with a reduction in the amount of information received.

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

+ Body
  [
    {
      "enumerator": "lsblk:json",
      "busType": "SAS",
      "busVersion": null,
      "device": "/dev/sdak",
      "devicePath": "/dev/disk/by-path/pci-0000:82:00.0-sas-exp0x5003048001ecb4bf-phy35-lun-0",
      "raw": "/dev/sdak",
      "description": "SEAGATE ST4000NM0023",
      "error": null,
      "size": 4000787030016,
      "blockSize": 512,
      "logicalBlockSize": 512,
      "mountpoints": [],
      "isReadOnly": false,
      "isSystem": true,
      "isVirtual": false,
      "isRemovable": false,
      "isCard": null,
      "isSCSI": false,
      "isUSB": false,
      "isUAS": null
    },
    {
      "enumerator": "lsblk:json",
      "busType": "UNKNOWN",
      "busVersion": null,
      "device": "/dev/zd0",
      "devicePath": null,
      "raw": "/dev/zd0",
      "description": "",
      "error": null,
      "size": 2147483648,
      "blockSize": 4096,
      "logicalBlockSize": 512,
      "mountpoints": [
        {
          "path": "[SWAP]",
          "label": null
        }
      ],
      "isReadOnly": false,
      "isSystem": false,
      "isVirtual": true,
      "isRemovable": true,
      "isCard": null,
      "isSCSI": null,
      "isUSB": null,
      "isUAS": null
    }
  ]

List partitions on all storage devices

In order to mount an external storage device, you must specify the partition containing the actual filesystem, this call allows you to see those partitions.

Request Object

+ URL
  /api/v2/device/partitions

+ Method
  GET

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

+ Body
  {}

Response Object

You’ll receive a list of all the partitions attached to the system, as well as information we have on them.

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

+ Body
  [
    {
      "path": "/dev/sdak1",
      "uuid": "4462834617989817621",
      "type": "zfs_member",
      "label": "B01",
      "partuuid": "82549760-fa9d-7d45-94cc-890cfc461a6d",
      "partlabel": "zfs-0e5305f84dcb22af"
    },
    {
      "path": "/dev/sdak9",
      "uuid": "unknown",
      "type": "unknown",
      "label": "unknown",
      "partuuid": "7ad7de38-a8f2-f74e-b114-3bc891205fbf",
      "partlabel": "unknown"
    },
    {
      "path": "/dev/zd0",
      "uuid": "154d0db7-8b42-475d-82f6-1cf4bad10687",
      "type": "swap",
      "label": "unknown",
      "partuuid": "unknown",
      "partlabel": "unknown"
    }
  ]