doctl compute volume-action attach

Go to Navigation

Usage

doctl compute volume-action attach <volume-id> <droplet-id> [flags]

Aliases

a

Description

Use this command to attach a block storage volume to a Droplet.

Each volume can be attached to only one Droplet at a time. However, up to five volumes may be attached to a single Droplet.

When you attach a pre-formatted volume to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018, the volume will be automatically mounted. On older Droplets, additional configuration is required. Visit https://www.digitalocean.com/docs/volumes/how-to/format-and-mount/#mounting-the-filesystems for details

Flags

OptionDescription
--help, -hHelp for this command
--waitWait for volume to attach
Default: false
CommandDescription
doctl compute volume-actionDisplay commands to perform actions on a volume

Global Flags

OptionDescription
--access-token, -tAPI V2 access token
--api-url, -uOverride default API endpoint
--config, -cSpecify a custom config file
Default:
  • macOS: ${HOME}/Library/Application Support/doctl/config.yaml
  • Linux: ${XDG_CONFIG_HOME}/doctl/config.yaml
  • Windows: %APPDATA%\doctl\config.yaml
--contextSpecify a custom authentication context name
--output, -oDesired output format [text|json]
Default: text
--traceShow a log of network activity while performing a command
Default: false
--verbose, -vEnable verbose output
Default: false