Article

Table of Contents
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $300 by adding new articles!

Vultr Block Storage

Last Updated: Sun, Jun 14, 2020
FAQ Linux Guides

Introduction

Vultr's Cloud Block Storage technology allows you to mount high performance scalable storage to your instance, making space management significantly more flexible. This storage is highly available, redundant, and SSD backed for superior performance.

  • Examples in this guide are for Linux OS.
  • Block Storage is available in our New Jersey location.

Mounting Block Storage

The first block storage device is connected to your server as /dev/vdb. Additional devices will be labeled /dev/vdc, /dev/vdd, and so forth. By default, we do not create any filesystems on block storage volumes.

Create data partition

Create a new disk label using parted.

# parted -s /dev/vdb mklabel gpt

Make a primary partition to fill the entire disk.

# parted -s /dev/vdb unit mib mkpart primary 0% 100%

Create an EXT4 filesystem

Create an EXT4 filesystem on the primary partition and format it.

# mkfs.ext4 /dev/vdb1

Mount block storage

Make a mount point.

# mkdir /mnt/blockstorage

Echo a blank line and a mount entry to /etc/fstab. This will automatically mount the block storage at /mnt/blockstorage at reboot.

# echo >> /etc/fstab
# echo /dev/vdb1 /mnt/blockstorage ext4 defaults,noatime,nofail 0 0 >> /etc/fstab 

Manually mount the block storage without rebooting.

# mount /mnt/blockstorage

How to Upgrade Block Storage

Expanding block storage requires two steps:

  • Upgrade block storage size in the customer portal
  • Resize your filesystem in the instance OS

Upgrade block storage size

  1. Navigate to your Vultr customer portal.
  2. Select Products.
  3. Click Block Storage.
  4. Click the Manage icon on the desired Block Storage instance.

    Block Storage

  5. Click the Size link to adjust the size.

    Edit Block Storage

  6. Enter the new size, type YES in the confirmation field, then click Continue.

    Upgrade Block Storage

  7. Reboot the attached server instance using the server control panel to apply the new size. Rebooting the OS from an SSH session will not apply the changes.

Resize the filesystem

You can resize your block storage to reflect the changes made in your panel with the following steps.

Prerequisite

You must install growpart to complete the following steps. The growpart utility is provided by cloud-init and is available for all major Linux distributions and *BSD.

  1. Unmount the block storage.

    # umount /mnt/blockstorage
    
  2. Grow the partition to fill all available block storage space.

    # growpart /dev/vdb 1
    
  3. Verify the filesystem in dismounted.

    # umount /mnt/blockstorage
    
  4. Force a filesystem check before resizing.

    # e2fsck -fp /dev/vdb1
    
  5. Resize the filesystem to fill the entire partition.

    # resize2fs /dev/vdb1
    
  6. Remount the block storage.

    # mount /mnt/blockstorage
    

Frequently Asked Questions

Can I upgrade or downgrade block storage?

Yes! You can upgrade or downgrade your block storage. However, you will be required to resize your file system manually which does pose the risk of possible data loss if performed incorrectly.

Can I mount block storage to different regions?

No. Block storage may only be attached to instances in the same region.

Can I make snapshots, or restore a snapshot of a block storage device?

No, this is not currently supported. Additionally, automated backup do not back up block storage volumes.

Can I mount block storage to multiple servers at the same time?

No, this is not possible.

Can I mount multiple block storage volumes to the same Vultr instance?

Yes, you can mount multiple volumes to the same instance. While there is no hard limit set, you should not mount more than 8 to 10 volumes to ensure system stability.

Can I mount a block storage volume on a Vultr dedicated instance?

No, this is not possible.

Want to contribute?

You could earn up to $300 by adding new articles