Volumes
A Volume is a collection of data but typically has the functionality of a formatted hard drive and can host a file system. It can be the root partition of a virtual machine (VM) that can be booted, or could act like an extra disk that can be mounted by a VM. Volumes are charged for according to their size and for how long they are stored.
Create and Attach a Volume
Volume creation is useful or attaching a data volume or a volume with users' home directories to an instance, as it is often good to separate the concerns of an operating system and user data. This makes it relatively easy to switch operating systems and maintain the same data, and to archive the more important parts of the project (the data) if needed.
Create
- Go to the "Volumes" tab in the OpenStack Web Interface
- Click the "Create Volume" button
- Enter a name and size
- Click "Create Volume"
Attach
- Go to the "Volumes" tab in the OpenStack Web Interface
- On the Actions dropdown menu for the volume you want to attach, select "Manage Attachments"
- Select the instance you wish to attach to and click "Attach Volume"
- Note that the device name specified is usually not important and not always adhered to
Once You Have Attached The Volume
- For Linux:
- Login to your instance
- Run
lsblk
to see which/dev/vdX
is the likely candidate (for some character 'X') - Follow the instructions for initializing and mounting your volume (replace
vdb
with thevdX
discovered in the previous step)
- For Windows:
- Login to your instance
- Follow the instructions for initializing and mounting your volume
- For Linux:
Snapshots
Snapshots of volumes (and of instances, in which case the volume is implicitly the root volume of the instance) create a state save of the existing volume, so you can easily get back to a certain state in the future. This is most useful for OS volumes to create safe checkpoints of working operating system configuration states. It may be less useful for larger data volumes; a more efficient solution might be to use ZFS snapshots on Linux instances.
Snapshots can be created from the Actions dropdown menu. Note that if you are creating a snapshot of a root volume for an instance, it should not be running. You should first stop the instance, and then take the snapshot.
Snapshots of volumes can be shared with users on a different project (or even with yourself, if you are a member of multiple projects). Simply follow the procedure for sharing found on the OpenStack forum. If the snapshot is of an instance, it may be easier to perform the necessary steps from the command line, as found on CAC's Images page.
Add Storage Capacity
You can add more storage capacity to your instance by: