UECStorageController

From OnnoWiki
Revision as of 07:47, 21 October 2010 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Objektif

Bagian ini menjelaskan bagaimana kita dapat menggunakan fungsi Eucalyptus Storage Controller (SC) yang ada di UEC sesudah dia di instalasi. Storage Controller memberikan fungsi yang mirip dengan Amazon EBS (Elastic Block Storage), memungkinkan kita mount block device (virtual hard disk) ke Image kita yang terus menempel walaupun Image tersebut dimatikan.

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:

  • create the volume
  • 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.

Referensi

Pranala Menarik