After a period of inactivity, due to the end of the academic term, we are back again working on our cloud... as we said before, we wanted to redefine our cloud's layout. We did it! Now, logically, we have something like this:

Every node is now attached to the cluster controller, which is running in Marge (not in Homer anymore). However, we had to register the new cluster and storage controller in Homer with these commands:
# euca_conf --register-cluster simpsons marge
# euca_conf --register-sc simpsons marge
After receiving the success from both commands we are now able to play around our cloud using the new configuration.
One particular issue of VM instances in Eucalyptus is that each time that we shutdown the instance, all working data is basically lost. To avoid this problem, a solution called the Storage Controller was used and now the user can create volumes in the front-end and dynamically attach them to VM instances running in the cloud.
The mechanism is pretty simple. First, in the front-end, we created the volume:
# euca-create-volume -s 1 -z simpsons
where -s specifies size in GB, and -z specifies the name of our cluster.
Next, we attached the new volume to a VM instance with this command:
# euca-attach-volume -i i-INSTNUMBER -d /dev/sdb vol-VOLNUMBER
where -i is the instance identifier and -d is the device name you are requesting to be assigned to your SC volume.
Now, after received the success response from euca2ools, we connected into our VM instance through ssh in order to check the creation of the new device. Happily, the new sdb device was there. But of course, it was like a new hard disk attached to a machine. The main difference is that we could do it with a running machine.
Basically, as it was the first time accessing the volume, we had to create a new partition (1) in our new virtual hd, as well as to format it:
# fdisk /dev/sdb
# mkfs -t ext3 /dev/sdb1
# fsck -f -y /dev/sdb1
After mounting the device we confirmed that it is now working. Also, we have made some tests detaching the volume from the front-end and attaching again and our data was still there. It really works!
That's all for this post fellas. Stay tuned.
Lucio
No comments:
Post a Comment