TOPICS
Features

Volumes

LunaNode Block Storage Volumes are virtual disks that can be attached to and detached from virtual machines on the fly.

You can use volumes to:

  • Setup a mountpoint on your VM with additional storage from the volume.
  • Use a volume as your VM's boot device so that the VM data is retained after the VM instance is deleted. This option also allows you to set the boot device capacity independently of the VM plan.

Volumes can easily be converted to and from snapshots and other images. Additionally, volumes can be snapshotted, and additional volumes can be created from volume snapshots.

Pricing

Volumes are $0.03/GB/mo, billed hourly. For example, if you have a 100 GB volume for ten days (1/3 of a month), you'll be charged $1.00.

If you use a volume as the boot device of the VM, then you will only be charged for the portion of the volume size that exceeds the storage space included with the VM. For example, if you provision an s.2 VM (comes with 35 GB storage) from a 100 GB volume, you'll only be billed for 65 GB on that volume.

Attach a Volume to an Existing VM

Attach a volume to an existing VM to setup a mountpoint on the VM that is stored on the volume. This gives you more space, and allows you to detach that mountpoint independently of the VM.

First, from Volumes, create a new, empty volume. Select the volume, and press Attach. Then, select the virtual machine.

Once the volume is attached, login to your virtual machine over SSH. Run sudo fdisk -l to confirm the volume device name. You should see an output like this:

$ fdisk -l
Disk /dev/vda: 35 GiB, 37580963840 bytes, 73400320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3fb3835a

Device     Boot Start      End  Sectors Size Id Type
/dev/vda1  *     2048 73400286 73398239  35G 83 Linux


Disk /dev/vdb: 1 GiB, 1073741824 bytes, 2097152 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/vdc: 60 GiB, 64424509440 bytes, 125829120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

This indicates your volume is now recognized on the VM at /dev/vdc. To setup a mountpoint, first create a filesystem on the volume:

$ mkfs.ext4 /dev/vdc
$ mkdir /mnt/myvolume
$ mount /dev/vdc /mnt/myvolume

The /mnt/myvolume directory is now stored on the volume. To make this mountpoint permanent, update /etc/fstab:

$ echo '/dev/vdc /mnt/myvolume ext4 defaults 0 2' >> /etc/fstab

Provision a VM from a Volume

You can also use a volume as the boot device of a virtual machine.

  1. From Volumes, create a new volume from one of our templates, or your own image or snapshot.
  2. Then, press Create VM in the sidebar. When creating the VM, select the volume you just created from My Volumes.

If you delete the VM, the data on the VM will be retained in the volume, and you will be able to provision another VM from the same volume.