This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

EBS Tasks

EBS Tasks

This section contains examples of the most common Eucalyptus EBS tasks.

1 - Create and Attach an EBS Volume

The following example shows how to create a 10 gigabyte EBS volume and attach it to a running instance called i-00000000 running in availability zone zone1 .

Create a new EBS volume in the same availability zone as the running instance.

euca-create-volume --availability-zone zone1 --size 10

The command displays the ID of the newly-created volume. Attach the newly-created volume to the instance, specifying the local device name /dev/sdf .

euca-attach-volume vol-00000000 -i i-00000000 -d /dev/sdf

You’ve created a new EBS volume and attached it to a running instance. You can now access the EBS volume from your running instance.

2 - List Available EBS Volumes

You can use the Eucalyptus command line tools to list all available volumes and retrieve information about a specific volume.

To get a list of all available volumes in your Eucalyptus cloud, enter the following command:

euca-describe-volumes

To get information about one specific volume, use the euca-describe-volumes command and specify the volume ID.

euca-describe-volumes vol-00000000

3 - Detach an EBS Volume

To detach a block volume from an instance:

Enter the following command:

euca-detach-volume <volume_id>



euca-detach-volume vol-00000000

4 - Create a Snapshot

The following example shows how to create a snapshot.

Enter the following command:

euca-create-snapshot <volume_id>



euca-create-snapshot vol-00000000

5 - List Available Snapshots

You can use the Eucalyptus command line tools to list available snapshots and retrieve information about a specific snapshot.

To get a list of all available snapshots in your Eucalyptus cloud, enter the following command:

euca-describe-snapshots

To get information about one specific snapshot, use the euca-describe-snapshots command and specify the snapshot ID.

euca-describe-snapshots snap-00000000

6 - Delete a Snapshot

The following example shows how to delete a snapshot.

Enter the following command:

euca-delete-snapshot <snapshot_id>



euca-delete-snapshot mytestsnaphot