How to Use Block Storage with Your Linode

Updated by Linode Written by Linode

Contribute on GitHub

Report an Issue | View File | Edit File

How to Use Block Storage with Your Linode

Linode’s Block Storage service allows you to attach additional storage volumes to your Linode. A single volume can range from 10 GiB to 10,000 GiB in size and costs $0.10/GiB per month. They can be partitioned however you like and can accommodate any filesystem type you choose. Up to eight volumes can be attached to a single Linode, be it new or already existing, so you do not need to recreate your server to add a Block Storage Volume.

The Block Storage service is currently available in the Dallas, Fremont, Frankfurt, and Newark datacenters only.

Caution
  • Linode’s backup services do not cover Block Storage Volumes. You must execute your own backups for this data.

  • Your Linode must be running in Paravirtualization mode. Block storage currently does not support Full-virtualization.

How to Add a Block Storage Volume to a Linode

This guide assumes a Linode with the root disk mounted as /dev/sda and swap space mounted as /dev/sdb. In this scenario, the Block Storage Volume will be available to the operating system as /dev/disk/by-id/scsi-0Linode_Volume_EXAMPLE, where EXAMPLE is a label you assign the volume in the Linode Manager. Storage volumes can be added when your Linode is already running, and will show immediately in /dev/disk/by-id/.

Add a Volume from the Linode Dashboard

  1. Go to the dashboard page of the Linode to which you want to attach a Block Storage Volume. Select Create a new Volume:

    Linode Manager create a Volume

  2. Assign the Block Storage Volume a label and size. The label can be up to 32 characters long and consist only of ASCII characters a-z; 0-9.-_. The maximum volume size is 10,000 GiB. When finished, click Add this Volume!:

    Linode Manager add a Volume

    Note
    There is currently a soft limit of 100 TB of Block Storage Volume per account.
  3. Once you add a volume, you’ll be presented with the Volume Attached page as shown below. This page provides customized instructions which show you how to make a filesystem in your volume from any of our supported Linux distributions. The page shows how to mount the volume, and how to add it to /etc/fstab so it’s mounted automatically whenever you reboot your Linode:

    Linode Manager volume instructions

  4. If your Linode is not already running, boot and SSH into your Linode to execute the commands as shown on the instructions page. If you need to see the volume mount instructions again, click Edit to the right of the volume in that Linode’s dashboard:

    Linode Manager edit volume

Add a Volume from Your Account’s Volume List

  1. In the Linodes tab of Linode manager, click Manage Volumes to see your account’s volume list:

    Linode Manager add volume

  2. Click the Attach option for the volume you want to attach to a Linode:

    Linode Manager add volume

  3. Select the label of the Linode you want to attach the volume to. Then click Attach:

    Linode Manager add volume

  4. Once you add a volume, you’ll be presented with the Volume Attached page as shown below. This page provides customized instructions which show you how to make a filesystem in your volume from any of our supported Linux distributions. The page shows how to mount the volume, and how to add it to /etc/fstab so it’s mounted automatically whenever you reboot your Linode:

    Linode Manager volume instructions

  5. If your Linode is not already running, boot and SSH into your Linode to execute the commands as shown on the instructions page. If you need to see the volume mount instructions again, click Edit to the right of the volume in that Linode’s dashboard:

    Linode Manager edit volume

How to Detach a Block Storage Volume from a Linode

  1. Go back to the dashboard of the Linode which the volume is attached to. Shut down the Linode.

  2. When the Linode is powered off, click Detach under the Volumes list:

    Linode Manager detach volume

  3. A confirmation screen appears and explains that the volume will be detached from the Linode. Click Detach to confirm:

    Linode Manager detach volume confirmation

    The Linode’s dashboard does not show the volume present anymore:

    Linode Manager detached volume

    The volume still exists on your account and you can see it if you click View all Volumes:

    Linode Manager volume list

How to Delete a Block Storage Volume

Caution
The removal process is irreversible, and the data will be permanently deleted.
  1. Shut down the Linode.

  2. Detach the volume as described above.

  3. Click the volume’s Remove option in either the volume list or the attached Linode’s dashboard.

How to Resize a Block Storage Volume

Storage volumes cannot be sized down, only up. Keep this in mind when sizing your volumes.

  1. Shut down your Linode.

  2. Click the Edit option for the volume you want to resize.

  3. Enter the new volume size. The minimum size is 10 GiB and maximum is 10,000 GiB. Then click Save Changes.

    Linode Manager edit volume

  4. You’ll be returned to the volume list and the Status column for the volume should say resizing.

    Linode Manager edit volume

  5. Reboot your Linode and your volume resize will be completed.

Where to Go From Here?

Need ideas for what to do with space? We have several guides which walk you through installing software that would make a great pairing with large storage volumes:

Install Seafile with NGINX on Ubuntu 16.04

Install Plex Media Server on Ubuntu 16.04

Big Data in the Linode Cloud: Streaming Data Processing with Apache Storm

Using Subsonic to Stream Media From Your Linode

Install GitLab on Ubuntu 14.04

comments powered by Disqus

This guide is published under a CC BY-ND 4.0 license.