Skip to main content

disks

Overview

Namedisks
TypeResource
Idlinode.instances.disks

Fields

NameDatatypeDescription
idintegerThis Disk's ID which must be provided for all operations impacting this Disk.
createdstringWhen this Disk was created.
filesystemstringThe Disk filesystem can be one of:

raw - No filesystem, just a raw binary stream.
swap - Linux swap area.
ext3 - The ext3 journaling filesystem for Linux.
ext4 - The ext4 journaling filesystem for Linux.
* initrd - initrd (uncompressed initrd, ext2, max 32 MB).
labelstringThe Disk's label is for display purposes only.
sizeintegerThe size of the Disk in MB.
statusstringA brief description of this Disk's current state. This field may change without direct action from you, as a result of operations performed to the Disk or the Linode containing the Disk.
updatedstringWhen this Disk was last updated.

Methods

NameAccessible byRequired ParamsDescription
getLinodeDiskSELECTdiskId, linodeIdView Disk information for a Disk associated with this Linode.
getLinodeDisksSELECTlinodeIdView Disk information for Disks associated with this Linode.
addLinodeDiskINSERTlinodeId, data__sizeAdds a new Disk to a Linode.

You can optionally create a Disk from an Image or an Empty Disk if no Image is provided with a request.

When creating an Empty Disk, providing a label is required.

If no label is provided, an image is required instead.

When creating a Disk from an Image, root_pass is required.

The default filesystem for new Disks is ext4. If creating a Disk from an Image, the filesystem
of the Image is used unless otherwise specified.

When deploying a StackScript on a Disk:
See StackScripts List (GET /linode/stackscripts) for
a list of available StackScripts.
Requires a compatible Image to be supplied.
See StackScript View (GET /linode/stackscript/{stackscriptId}) for compatible Images.
It is recommended to supply SSH keys for the root User using the authorized_keys field.
You may also supply a list of usernames via the authorized_users field.
These users must have an SSH Key associated with their Profiles first. See SSH Key Add (POST /profile/sshkeys) for more information.
deleteDiskDELETEdiskId, linodeIdDeletes a Disk you have permission to read_write.

Deleting a Disk is a destructive action and cannot be undone.
_getLinodeDiskEXECdiskId, linodeIdView Disk information for a Disk associated with this Linode.
_getLinodeDisksEXEClinodeIdView Disk information for Disks associated with this Linode.
cloneLinodeDiskEXECdiskId, linodeIdCopies a disk, byte-for-byte, into a new Disk belonging to the same Linode. The Linode must have enough storage space available to accept a new Disk of the same size as this one or this operation will fail.
resetDiskPasswordEXECdiskId, linodeId, data__passwordResets the password of a Disk you have permission to read_write.
resizeDiskEXECdiskId, linodeId, data__sizeResizes a Disk you have permission to read_write.

The Disk must not be in use. If the Disk is in use, the request will
succeed but the resize will ultimately fail. For a request to succeed,
the Linode must be shut down prior to resizing the Disk, or the Disk
must not be assigned to the Linode's active Configuration Profile.

If you are resizing the Disk to a smaller size, it cannot be made smaller
than what is required by the total size of the files current on the Disk.
updateDiskEXECdiskId, linodeIdUpdates a Disk that you have permission to read_write.