Guides - Configure and Mount a Block Storage Volume
Linode’s Block Storage service lets you increase your Linode’s storage capacity by attaching additional high-speed volumes. Volumes are managed independently of Linodes, so your data persists even if you delete your Linode.
Once a Block Storage Volume has been attached to a Linode, you’ll need to perform a few steps before you can start using it. These steps include creating a file system (if you’re configuring a new Volume) and mounting the Volume to your Linode’s system. To make configuration easier, all the necessary commands can be viewed directly in the Cloud Manager.
Log in to the Cloud Manager and click on the Volumes link in the sidebar.
Locate the desired Volume within the list and click the Show Config link, which may appear within the more options ellipsis dropdown menu.
The Volume Configuration panel will appear containing the commands needed to fully configure the Volume with your Linode.
Enter each command that’s shown in the Volume Configuration panel, modifying them if needed. These configuration steps are also listed below:
Create an ext4 file system by running the following command, where
FILE_SYSTEM_PATHis your Volume’s file system path:
If a new filesystem is created on a Block Storage Volume that is already using a filesystem, the above command will result in data loss. You can safely check for the filesystem of an unmounted volume with the following command:
If you do not receive output, there is currently no filesystem on this volume.
Create a mount point
Mount the Volume to that mount point.
mount FILE_SYSTEM_PATH /mnt/BlockStorage1
If you want to mount the new Volume automatically every time your Linode boots, add the following line to your /etc/fstab file:
FILE_SYSTEM_PATH /mnt/BlockStorage1 ext4 defaults 0 2
If you plan on detaching the volume regularly or moving it between other Linodes, you may want to consider adding the flags
nofailto the /etc/fstab entry.
noatime- This will save space and time by preventing writes made to the filesystem for data being read on the volume.
nofail- If the volume is not attached, this will allow your server to boot/reboot normally without hanging at dependency failures if the volume is not attached.
FILE_SYSTEM_PATH /mnt/BlockStorage1 ext4 defaults,noatime,nofail 0 2
This page was originally published on