Difference between revisions of "Volumes"

From Luna Node
Jump to: navigation, search
Line 9: Line 9:
 
== Managing volumes ==
 
== Managing volumes ==
  
Start off by creating a new, empty volume. Head over to the [https://dynamic.lunanode.com/panel/volumes.php volume management page], enter a label (like "myvolume") and a size in gigabytes, and press the create button. Note that volume storage is charged at $0.04 per GB per month, billed hourly.
+
Start off by creating a new, empty volume. Head over to the [https://dynamic.lunanode.com/panel/volumes.php volume management page], enter a label (like "myvolume") and a size in gigabytes, and press the create button. Note that volume storage is charged at $0.03 per GB per month, billed hourly.
  
 
After a few seconds, your volume should be ready. You can view volume details by selecting the name from the volume list.
 
After a few seconds, your volume should be ready. You can view volume details by selecting the name from the volume list.

Revision as of 17:23, 7 August 2014

Volumes are detachable block storage devices that are stored volumes on a fault-tolerant distributed filesystem, and can be attached and detached from virtual machine instances on the fly.

Use cases

  • Keep non-disposable data, such as database files or images, on a detachable volume. Then, if you need to terminate the virtual machine instance for some reason (such as OS upgrade), you can simply detach the volume from the old instance and attach it to a new one.
  • If a host node fails, you can transfer the volume to a different VM and remain online.
  • Increase the capacity of your virtual machine (volumes are stored on DFS so can have larger capacity than a locally-stored VM).

Managing volumes

Start off by creating a new, empty volume. Head over to the volume management page, enter a label (like "myvolume") and a size in gigabytes, and press the create button. Note that volume storage is charged at $0.03 per GB per month, billed hourly.

After a few seconds, your volume should be ready. You can view volume details by selecting the name from the volume list.

Once the status on the volume details page shows as available, the volume is ready to be attached to a virtual machine instance. You can select the virtual machine from the dropdown and hit "Attach volume" (leave target device as auto; if that fails, then try setting it to /dev/vdc).

Now, login to your virtual machine; in /dev, you should see the volume appear now. You will want to format it so that you can mount it as a filesystem on your VM:

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

Then, you will be able to access the volume via /mnt/myvolume. (Note that the device might be /dev/hdc or /dev/sdc or something else instead of /dev/vdc.)