Create a volume

Creates a Block Storage volume on your account. Creating a new volume accrues additional charges on your account.

Permissions and scopes

To call this operation, you need the following:

  • Identity and access permissions. Your user needs a role with these permissions assigned. Learn more.

    • Permissions: create_volume
  • OAuth scopes. Your user needs these scopes assigned. Learn more.

    • Scopes: volumes:read_write

CLI

linode-cli volumes create \
  --label my-volume \
  --size 20 \
  --linode_id 12346 \
  --no-defaults

Learn more

Path Params
string
enum
required

Enum Call either the v4 URL, or v4beta for operations still in Beta.

Allowed:
Body Params
integer

When creating a volume attached to a Linode, this is the identifier of the Linode configuration profile (config) where the volume will live. Run the List configuration profiles operation and store the id for the applicable config. The following apply when adding a config_id:

  • The selected config needs to belong to the Linode referenced by linode_id in this request.

  • You can't provide a config_id if you don't also provide a linode_id in the request.

  • If you send a linode_id without a config_id, the API attaches the volume to that Linode's last used config, or to the only config in that Linode. If there isn't a config available for attachment, the API returns an error.

string
enum
Defaults to enabled

Used to set the disk encryption status for a volume. When you create a new volume, disk encryption is enabled by default. Full disk encryption ensures the data stored on a Block Storage volume drive is secure. It protects against unauthorized access by keeping the data encrypted if the volume drive is removed from the data center, decommissioned, or disposed of. The platform automatically manages the encryption and decryption process for you. You can use an encrypted volume the same way you use a non-encrypted volume.

📘

You can only set disk encryption status when creating a new Block Storage volume. After you create a volume, you can't change its encryption setting.

Allowed:
string
required
length between 1 and 32

The name of the volume. A label can be up to 32 characters long and contain alphanumeric characters, hyphens, and underscores. This value is also used in the volume's filesystem_path.

integer

The Linode this volume should be attached to after it's created. If not given, the volume will be created without an attachment.

string | null

The region where the API deploys the volume. This is only required if you didn't provide a linode_id for the volume.

integer
Defaults to 20

The initial size of this volume, in GB. Volumes can only be resized after the creation completes.

tags
array of strings

Filterable Any tags applied to this object. Use tags to label and organize your cloud computing resources.

tags
Responses

Language
Credentials
LoadingLoading…
Response
Choose an example:
application/json