Add a new disk to an existing Linode. You can create an empty disk to manually configure it later. You can also target a stored image to build the disk using a pre-configured file system--either through an image you've created or via a StackScript. Consider these points when creating a new disk:
General
-
A Linode can have up to 50 disks.
-
You need to provide at least one authentication mechanism for disk access: a
root_pass,authorized_keys, orauthorized_users, with the latter two offering SSH protection.
Empty disks
-
To do this, don't include the
image,filesystem,stackscript_id, orstackscript_datafields. -
An empty disk still requires a
label. -
The default file system for an empty disk is
ext4.
Disks created from an image
-
A created disk inherits both the
labeland thefilesystemfrom the targetimage, unless you specify otherwise. -
We offer an example workflow to create a disk using a stored image.
Disks created from a StackScript
-
You can run List StackScripts to review available StackScripts.
-
You need to include a StackScript-compatible
imagewhen creating the disk. Run Get a StackScript to review available images.
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_linode_disk
- Permissions:
-
OAuth scopes. Your user needs these scopes assigned. Learn more.
- Scopes:
linodes:read_write
- Scopes:
CLI
linode-cli linodes disk-create 123 \
--size 1300 \
--authorized_keys "ssh-rsa AAAA_valid_public_ssh_key_123456785== user@their-computer" \
--authorized_users "myUser" \
--authorized_users "secondaryUser" \
--root_pass aComplex@Password \
--image "linode/debian13" \
--stackscript_id 10079 \
--stackscript_data '{"gh_username": "linode"}'