dcos storage volume remove

ENTERPRISE

Remove a volume.

dcos storage volume remove

Remove a volume.

Synopsis

Required arguments:

<name>     The name of the volume.

If the volume is in use, or is otherwise not in the requisite state, then an error is returned.

dcos storage volume remove --name <name> [flags]

Examples

  1. Create a SSD-backed volume from a fast volume profile that selects a lvm volume provider then remove it again:
# Create a 'ssds' volume provider on node
# <c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S2>, where we know xvdb and xvdc are
# both SSDs.
cat <<EOF | dcos storage provider create
{
    "name": "ssds",
    "spec": {
        "plugin": {
            "name": "lvm",
            "config-version": "latest"
        },
        "node": "c67efa5d-34fa-4bc5-8b21-2a5e0bd52385-S2",
        "plugin-configuration": {
            "devices": ["xvdb", "xvdc"]
        },
        "labels": {"rotational": "false"}
    }
}
EOF
# Create a volume profile called 'fast' that selects volume
# providers that provide solid-state storage capacity.
cat <<EOF | dcos storage profile create
{
    "name": "fast",
    "spec": {
        "provider-selector": {
            "plugin": "lvm",
            "matches": {
                "labels": {"rotational": "false"}
            }
        },
        "mount": {}
    }
}
EOF
# Create a SSD-backed volume without specifying a specific provider.
dcos storage volume create --name my-volume-1 --capacity 10G --profile fast

# Remove the volume again.
dcos storage volume remove --name my-volume-1

Options

Name Description
--cancel Attempt to cancel a scheduled volume removal. May be ignored if DC/OS has already initiated the removal process.
--missing Will only remove a volume if it's reported as MISSING.
--name string The name of the volume (required).
--stale Will only remove a volume if it's reported as STALE.

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.