Volumes are ideal for adding additional storage for existing servers without having to pay for additional compute resources. So you can spin up a small VM and use volumes to supplement your storage requirements.
For example, provisioning a 512MB VM with 10GB of disk and using volumes to make up the next (20GB) tier’s disk of 30GB would only cost an additional $5 (20GB * $0.25). You aren’t charged for incoming traffic or the amount of I/O you do. You are simply charged for the amount of storage you have. This is measured by GBs of provisioned storage and charged at $0.25 / GB / month, or ~$0.0003 / GB / hr. This can enable huge cost savings by only provisioning exactly what you need.
Creating a Volume
To create a volume, visit the Volumes page on your dashboard, and click on the “Create Volume” button.
In the modal window, enter a Volume Name, optional Description, select the Type (Regular) and your desired Size in GB. We’ll just make a small 2GB Volume for this demo. After hitting “Create Volume”, you’ll see a “Creating Volume” message while it is being provisioned.
Once you have your Volume created you need to Attach it to the desired Instance. Click Edit Attachments to open the Manage Volume Attachments window. Under Attachments you will see any Instances the volume is currently attached to. (It should be blank now).
Open the Attach to Instance dropdown and select the instance you wish to connect the volume to, then “Attach Volume”.
Just like that, your Volume is attached to your instance, and available to be formatted & mounted in the OS.
Formatting & Mounting Your Volume
Before you can make use of your volume in your operating system of choice, you’ll need to format the disk and mount it so you can start using it for storage. Below you’ll find some basic instructions for Linux and Windows instances that will get your disk mounted and ready.
For linux servers (ubuntu 12.04 is used in the example below), it’s a quick process using fdisk, mkfs and mount.
$ ssh ubuntu@<my-instance-ip> $ sudo -i $ fdisk /dev/vdb # create new partition (n), # primary (1), # answer yes to start and end blocks to use entire disk. $ mkfs.ext4 /dev/vdb1 $ mkdir /mount $ mount /dev/vdb1 /mount
If you would like the Volume to be mounted on boot (permanently attached). You can add an entry in your
/etc/fstab that looks something like the following.
/dev/vdb1 /mount ext4 defaults 0 2
For Windows servers (Windows Server 2008 R2 is used in the example), You can do it all from the console. If you’re still on the Volumes screen, you can click the link to the server, and then click the “Console” tab to get to it quickly.
Once logged in and set up, click on Server Manager – on bottom left next to the Start button. Then click on Storage and then Disk Management.
Right click the Volume you added (labelled Disk 1), and select New Simple Volume. That will launch a Wizard to format the new disk. Following the prompts and using the default values will be fine. Once it finishes formatting (this may take a few moments), you’re done!
If you flip back to your dashboard, you should see that the Status is “In-Use”. Success!
- What is the max number of volumes that can be connected to any one server? As many as you like, it is bottlenecked by the OS that you’re connecting it to.
- What are the smallest / largest size volumes? We have customers with volumes sizes from 1GB through to 10TB.
- How are volumes metered? Usage is added up at the end of the month, and calculated based on $0.25/gb/month. Point in time snapshots are taken of usage, and added up for each second of use. i.e. day 1 you’re using 1GB, for the time of that day, you’re charged that much, day 30 you’re using 1TB, only the last day are you charged the 1TB amount for usage.
- Are Volumes slow storage? No, Volumes are very fast! – SSD Backed storage, the same stuff that gives you blazing fast IO on your VMs.