Creating and Managing Volumes

Volumes are the "disks" that are used by your instance. When an instance is created from an image, a "bootable" volume is created to hold the instance. Additional volumes can be created and attached to an instance, and later detached if desired. It is easy to perform all of these operations through the Horizon interface. The Horizon documentation provides details on ways to create and manage volumes. Here is a summary of the operations:

Create a volume
From Project→Volumes→Volumes, click Create Volume. In the dialog that pops up, give the volume a meaningful name and select a size (in GiB), then click Create. The new volume will appear in the volume list.
Attach a volume

From Project→Compute→Instances, open the dropdown on the right end of the entry for the instance you would like to attach to. Select "Attach volume" and in the dialog that pops up, select the volume to attach and click Attach Volume. View details for the new volume's device by clicking the instance's name and scrolling to the bottom of the Overview tab.

Note that attaching a volume to a Linux instance does not immediately make it available for use. While it will immediately be visible as a device in the instance, that device must be formatted, partitioned and mounted in order to be used as a file system.

Detach a volume
From Project→Compute→Instances, open the dropdown on the right end of the entry for the instance you would like to detach from. Select "Detach volume" and in the dialog that pops up, select the desired volume (make sure it is not the boot volume!). Click Detach Volume. If the instance's operating system was automatically mounting this volume, you will need to change its configuration so it no longer tries to do so.
Delete a volume
From Project→Volumes→Volumes, open the dropdown on the right end of the entry for the (currently unused) volume that you would like to delete. Select "Delete Volume" and confirm the operation in the dialog that pops up.
Creating Snapshots and Images

Another use for a volume is to contain a snapshot of an instance. These can serve as backups of the instance and can also be used to easily create other identical instances.

Creating a Snapshot
From Project→Compute→Instances, click on the name of the instance whose snapshot you would like to take. On the instance page, click Create Snapshot in the upper right. In the dialog that pops up, give the snapshot a meaningful name and click Create Snapshot. The snapshot can be viewed in Project→Volumes→Snapshots.
Creating an Instance from a Snapshot
If you would like to create a new instance from a snapshot, begin at Project→Volumes→Snapshots. In the dropdown menu for the desired snapshot, select "Launch as Instance". This will launch the regular instance creation dialog, but with the snapshot selected as the source. Once the instance creation is initiated, go to Project→Compute→Instances to monitor its progress. The same snapshot can be used to create additional instances.
Uploading an Image
It is also possible to import a bootable volume as a image, which can then be used to create instances. The Horizon documentation describes how to upload and manage images.
 
©   Cornell University  |  Center for Advanced Computing  |  Copyright Statement  |  Inclusivity Statement