Objectives

This page describes how you can use the Eucalyptus Storage Controller (SC) functionality within the UEC after it is installed. The Storage Controller provides functionality which is similar to Amazon's EBS (Elastic Block Storage), allowing you to mount block devices (virtual hard disks) to your images that persist when the images are terminated.

Update default configuration (if needed)

If you installed UEC from CD and you have a separate physical interface to connect your front-end to your Eucalyptus Node Controllers (NCs), in order to use the SC functionality you must be sure that your SC is registered to use your private interface.

You can do this via the web interface under Configuration -> Clusters -> Storage Controller. Make sure the IP address listed under Host is the IP address for your private interface, and the Interface listed is the physical interface to the private network.

To do this from the command line, do

sudo euca_conf --deregister-sc <public IP>
sudo euca_conf --register-sc <your cluster name> <private IP>

Please note that any volumes you have created before doing this will need to be removed using euca-delete-volume because they will not work and will just take up space on your front-end.

Using the Storage Controller

In order to use a virtual volume, you need to:

  1. create the volume
  2. use it

Creating Volumes

To create a Eucalyptus SC volume,

euca-create-volume -s 1 -z myzone

where -s specifies size in GB, and -z specifies the name of your UEC availability zone as shown when you do a:

euca-describe-availability-zones

This will return the word VOLUME and the name of your UEC SC volume:

VOLUME  vol-xxxxxxxx

Using Volumes

To attach a volume to a running instance:

euca-attach-volume -i i-xxxxxxxx -d /dev/sdb vol-xxxxxxxx

where -i is the instance identifier, -d is the device name you are requesting to be assigned to your SC volume.

After you have done this, when you do a

euca-describe-volumes 

you should see something like this:

VOLUME  vol-xxxxxxxx     1              myzone  in-use  2009-10-23T14:41:47.375Z
ATTACHMENT      vol-xxxxxxxx    i-xxxxxxxx      /dev/sdb        2009-10-23T14:42:10.274Z

You should then be able to ssh into your instance, look in the /dev directory to make sure your device is there (it is possible it may have been assigned a different name - i.e. you may request /dev/sdh and it may assign it as /dev/sdb), and you can

sudo fdisk /dev/sdb

You will be able to partition, format, mount and use the volume just like a physically attached device.

UEC/StorageController (last edited 2010-02-09 16:54:23 by rich-wolski)