You can create dynamic block volumes, attach volumes to instances, detach volumes, deletes volumes, create snapshots from volumes and create volumes from snapshots with your cloud. Volumes are raw block devices. You can create a filesystem on top of an attached volume and mount the volume inside a VM instance as a block device. You can also create instantaneous snapshots from volumes and create volumes from snapshots.
To create a dynamic block volume, use "euca-create-volume."
For instance, to create a volume that is 1GB in size in the availability zone "myzone" you may use the following command,
euca-create-volume --size 1 -z myzone
To list availability zones, you may use "euca-describe-availability-zones"
You may also create a volume from an existing snapshot. For example, to create a volume from the snapshot "snap-33453345" in the zone "myzone" try the following command,
euca-create-volume --snapshot snap-33453345 -z myzone
For more options, type,
euca-create-volume --help
You may attach block volumes to instances using "euca-attach-volume." You will need to specify the local block device name (this will be used inside the instance) and the instance identified. For instamce, to attach a volume "vol-33534456" to the instance "i-99838888" at "/dev/sdb" use the following command,
euca-attach-volume -i i-99838888 -d /dev/sdb vol-33534456
You can attach a volume to only one instance at a given time.
To detach a previously attached volume, use "euca-detach-volume." For example, to detach the volume "vol-33534456"
euca-detach-volume vol-33534456
You must detach a volume before terminating an instance or deleting a volume. If you fail to detach a volume, it may leave the volume in an inconsistent state and you risk losing data.
To delete a volume, use "euca-delete-volume." For example, to delete the volume "vol-33534456" use the following command
euca-delete-volume vol-33534456
You may only delete volumes that are not currently attached to instances.
You may create an instantaneous snapshot of a volume. A volume could be attached and in use during a snapshot operation. For example, to create a snapshot of the volume "vol-33534456" use the following command
euca-create-snapshot vol-33534456
To delete a snapshot, use "euca-delete-snapshot." For example, to delete the snapshot snap-33453345, use the following command,
euca-delete-snapshot snap-33453345