Manage disks and storage on a Compute Instance
Understanding storage
Every Compute Instance is equipped with persistent storage, the amount of which varies based on size and type of Compute Instance plan. This local storage is built entirely on enterprise-grade SSDs (solid state disks) and is extremely performant and reliable.
Disks
The storage space on a Compute Instance can be allocated to individual disks. Disks can be used to store any data, including the operating system, applications, and files. Most Compute Instances are deployed with two disks. A large primary disk is used to store the Linux distribution, software, and data. There's also a much smaller swap disk, which is used if your Compute Instance runs out of memory.
While two disks may be the default, a Compute Instance can be configured to have many more disks. These additional disks can serve a variety of purposes, including dedicated file storage or switching between entirely different Linux distributions. When multiple disks are added, configuration profiles are used to determine the disks that are accessible when the Compute Instance is powered on, as well as which of those disks serves as the primary root disk.
Add additional storage
The local storage capacity of a Compute Instance can only be increased by upgrading to a larger plan. This lets you increase the size of existing disks or add additional disks. Block Storage volumes can also be used to add additional storage, though these volumes are separate from a Compute Instance's local disks and, for some use cases, may be less performant.
View disks
A Compute Instance's total storage space and disks can be viewed and managed from Cloud Manager.
-
Log in to Cloud Manager, click the Linodes link in the sidebar, and select a Compute Instance from the list.
-
Look within the Summary section of the Compute Instance's dashboard to view the total storage.
-
Navigate to the Storage tab and find the Disks section, which lists all disks on the Compute Instance.
From here, a disk can be created using the Add a Disk button. To take action on an disk, locate the disk within the Disks table and select from the list of actions, some or all of which may appear within the ellipsis menu:
- Rename: Change the name of the disk.
- Resize: Increase or decrease the size of the disk. See Resize a disk.
- Imagize: Create a Custom Image based on the disk. See Capture an image.
- Clone: Duplicate the disk, adding it to any Compute Instance on your account. See Clone a disk.
- Delete: Permanently delete's the disk and all of its data (cannot be undone). See Delete a disk.
Create a disk
Each Compute Instance can have multiple disks. Follow these instructions to create a new disk.
- A Compute Instancecan have up to 50 disks.
- These instructions cover how to add a new, empty disk to an existing Compute Instance. If you have a custom image you want to use to create a disk, see Deploy an image to an existing Compute Instance.
-
Navigate to the Storage tab on the Compute Instance you wish to edit. See View disks.
-
Click the Add a Disk button to show the Add Disk form.
If this button is disabled, all of the Compute Instance's storage space has been allocated towards disks. Before continuing, resize an existing disk or upgrade the Compute Instance to a larger plan. You'll want to confirm there is enough unallocated storage space to accommodate the desired size of the new disk.
-
Select from either the Create Empty Disk or Create from Image options.
Empty disks: An empty disk can store additional data, be used as a swap disk, or it can be used to manually install a custom distribution. When creating an empty disk, select the desired Filesystem. In most cases, it's recommended to use the ext4 filesystem. This ensures compatibility with our Backups service. If needed, ext3 and raw disks are also available. If creating a swap disk, select the swap option.
Images: Selecting an Image lets you deploy a Distribution Image, a Custom Image, or a Recovery Image to the new disk. When creating a disk based on an Image, select the Image, Root Password, and optionally add SSH Keys.
-
Once an option is chosen, complete the remaining fields in the form. Enter the Label and the Size for the new disk. The maximum size of the disk is pre-populated and based on the Compute Instance's remaining storage allocation, though a smaller size can be entered if desired.
-
Click the Add button to create the disk. The progress can be monitored from the new entry appearing for the disk within the Compute Instance's Storage page.
Once a disk has been created, you will need to modify the existing configuration profile or add a new configuration profile. Specifically, the disk will need to be assigned to a device and optionally marked as the root device if this new disk will function as the primary boot disk. See Deploy an image to an existing Compute Instance or Manage configuration profiles on a Compute Instance for additional details.
Resize a disk
The size of a Compute Instance's disk can be increased or decreased as needed. When resizing, it's important to keep the following restrictions in mind:
- The maximum size of a disk is equal to the current size of the disk and the remaining unallocated storage space on the Compute Instance. The maximum size is displayed underneath the Size field when resizing the disk.
- The minimum size of a disk is equal to the current disk usage within the filesystem. This number is not displayed in Cloud Manager. To determine how much space the files on the disk are using, run the command
df -h
within the Compute Instance's command line (through SSH or Lish). - Raw disks can only be resized to a larger disk.
- Disks with custom partitions cannot be resized.
The following instructions cover how to resize a disk. For instructions regarding resizing a Compute Instance's plan (including downgrading to a smaller plan), see Resize a Compute Instance.
-
Navigate to the Storage tab on the Compute Instance you wish to edit. See View disks.
-
Click the Power Off button in the upper right of the page or within the ellipsis menu. Wait until the Compute Instance has been fully powered off before continuing to the next step.
-
Within the Disks table, locate the disk you wish to resize and click the corresponding Resize button, which may also appear within the ellipsis menu.
If the Resize button is disabled, confirm that the Compute Instance has been fully powered off.
-
The Resize Disk form is displayed. In the Size field, enter the new size for the disk in megabytes. The new size of the disk needs to be within the maximum and minimize disk size discussed above.
-
Click Resize. The progress can be monitored from the corresponding entry for the disk within the Disks table on the Compute Instance's Storage page.
-
Once the disk has been successfully resized, click the Power On button to boot up the Compute Instance.
Clone a disk
A disk can be duplicated onto the same Compute Instance or any other Compute Instance on the account. See Cloning to an existing Compute Instance for instructions.
Delete a disk
A disk can be deleted to remove it from the Compute Instance and free up additional storage space that can be used for other disks.
Deleting a disk is permanent and cannot be undone. Make sure all required data is properly backed up before continuing.
-
Navigate to the Storage tab on the Compute Instance you wish to edit. See View disks.
-
Click the Power Off button in the upper right of the page or within the ellipsis menu. Before proceeding, wait until the Compute Instance has been fully powered off.
-
Within the Disks table, locate the disk you wish to delete and click the corresponding Delete button, which may also appear within the ellipsis menu.
If the Delete button is disabled, confirm that the Compute Instance has been fully powered off.
-
A confirmation dialog window will appear. Click the Delete button to confirm.
-
The disk will be deleted within a few seconds. Click the Power On button to boot up the Compute Instance.
Updated about 1 month ago