dcos storage device

ENTERPRISE

Manage physical devices.

dcos storage device

Manage physical devices.

Synopsis

There are typically storage devices that present as Linux devices on agents in the cluster. The devices on a node can be assembled into volume providers that expose their storage capacity to the rest of the cluster. For example, some SSDs xvdb and xvde on node 2aada917-0ba0-4041-bb1e-4f16a57cd1a0-S0 can be assembled into a LVM volume group on that node creating a new volume provider and specifying the plugin.name as lvm and listing xvdb and xvde as the devices.

dcos storage device [flags]

Examples

  1. Create the Devices volume provider on a node:
cat provider.json
{
    "name": "devices-provider",
    "description": "Expose devices on a node",
    "spec": {
        "plugin": {
            "name": "devices",
            "version": "latest"
        },
        "node": "ca626e4a-e3cb-4613-b7dd-618cfc19bee1-S0",
        "plugin-configuration": {
            "blacklist": "loop[0-9]"
        }
    }
}
dcos storage provider create provider.json
  1. List all devices in the cluster:
dcos storage device list
NODE                                     NAME   STATUS  ROTATIONAL  TYPE
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvda   ONLINE  false       disk
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvda1  ONLINE  false       part
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvdb   ONLINE  false       disk
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvde   ONLINE  false       disk
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvdf   ONLINE  false       disk
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvdg   ONLINE  false       disk
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvdh   ONLINE  false       disk
dcos storage device list --json
{
    "devices": [
        {
            "name": "xvda",
            "status": {
                "state": "ONLINE",
                "node": "c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1",
                "metadata": {
                    "major": "202",
                    "minor": "0",
                    "name": "xvda",
                    "read-only": "false",
                    "removable": "false",
                    "rotational": "false",
                    "size": "161061273600",
                    "type": "disk"
                }
            }
        },
        {
            "name": "xvda1",
            "status": {
                "state": "ONLINE",
                "node": "c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1",
                "metadata": {
                    "major": "202",
                    "minor": "1",
                    "name": "xvda1",
                    "parent-name": "xvda",
                    "read-only": "false",
                    "removable": "false",
                    "rotational": "false",
                    "size": "161060208128",
                    "type": "part"
                }
            }
        },
        {
            "name": "xvdb",
            "status": {
                "state": "ONLINE",
                "node": "c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1",
                "metadata": {
                    "major": "202",
                    "minor": "16",
                    "name": "xvdb",
                    "read-only": "false",
                    "removable": "false",
                    "rotational": "false",
                    "size": "161061273600",
                    "type": "disk"
                }
            }
        },
        {
            "name": "xvde",
            "status": {
                "state": "ONLINE",
                "node": "c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1",
                "metadata": {
                    "major": "202",
                    "minor": "64",
                    "name": "xvde",
                    "read-only": "false",
                    "removable": "false",
                    "rotational": "false",
                    "size": "53687091200",
                    "type": "disk"
                }
            }
        },
        {
            "name": "xvdf",
            "status": {
                "state": "ONLINE",
                "node": "c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1",
                "metadata": {
                    "major": "202",
                    "minor": "80",
                    "name": "xvdf",
                    "read-only": "false",
                    "removable": "false",
                    "rotational": "false",
                    "size": "107374182400",
                    "type": "disk"
                }
            }
        },
        {
            "name": "xvdg",
            "status": {
                "state": "ONLINE",
                "node": "c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1",
                "metadata": {
                    "major": "202",
                    "minor": "96",
                    "name": "xvdg",
                    "read-only": "false",
                    "removable": "false",
                    "rotational": "false",
                    "size": "53687091200",
                    "type": "disk"
                }
            }
        },
        {
            "name": "xvdh",
            "status": {
                "state": "ONLINE",
                "node": "c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1",
                "metadata": {
                    "major": "202",
                    "minor": "112",
                    "name": "xvdh",
                    "read-only": "false",
                    "removable": "false",
                    "rotational": "false",
                    "size": "21474836480",
                    "type": "disk"
                }
            }
        }
    ]
}
  1. List all devices on a given node:
dcos node
HOSTNAME       IP           ID                                       TYPE               REGION      ZONE
10.10.0.39     10.10.0.39   c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  agent              us-west-2   us-west-2c
master.mesos.  10.10.0.139  c67efa5d-34fa-4bc5-8b21-2a5e0bd52385     master (leader)    us-west-2   us-west-2c
dcos storage device list --node c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1
NODE                                     NAME   STATUS  ROTATIONAL  TYPE
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvda   ONLINE  false       disk
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvda1  ONLINE  false       part
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvdb   ONLINE  false       disk
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvde   ONLINE  false       disk
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvdf   ONLINE  false       disk
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvdg   ONLINE  false       disk
c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S1  xvdh   ONLINE  false       disk

Options inherited from parent commands

Name Description
-h,--help Help for this command.
--timeout duration Override the default operation timeout. (default 55s)
-v,--verbose Verbose mode.