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
HDD volumes are $0.03/GB/mo, billed hourly. SSD volumes, only available in Toronto, are $0.06/GB/mo. For example, if you have a 100 GB HDD 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 a VM, you'll receive a storage discount corresponding to the disk space included with the VM at $0.03/GB/mo. For example, for an s.2 VM (comes with 35 GB storage) provisioned from a 100 GB HDD volume, you'll only be billed for 65 GB ($1.95/mo) for the volume, and for an s.2 VM provisioned from a 100 GB SSD volume, you'll only be billed $4.95/mo for the 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.
- From Volumes, create a new volume from one of our templates, or your own image or snapshot.
- 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.