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. For added security with all disks, you should supply SSH keys for the disk's root_pass user, using the authorized_keys field.
A Linode can have up to 50 disks.
Empty disks
-
When creating an empty disk, a
labelis required. -
The default file system for an empty disk is
ext4.
Disks created from an image
-
A
root_passis required for a disk created from a stored 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 permissions, based on the model you're using:
-
Identity and access permissions. Your user needs a role with these permissions. 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/debian9" \
--stackscript_id 10079 \
--stackscript_data '{"gh_username": "linode"}'