Cloud Block Storage: Architecture and API
Today Rackspace announces the general availability of Cloud Block Storage which allows you to mount additional storage volumes to your Cloud Servers. In this post we will go through the technical meat of the product including the history of block storage in OpenStack, Cloud Block Storage architecture and API examples.
What is the technology behind Cloud Block Storage?
In the past, block storage in OpenStack was dismissed as an issue not important enough to prioritize. There were more pressing things to address, such as compute code stability, advanced networking and authentication.
The Folsom release of OpenStack, which marks the sixth major release, is a shining example of community contributions at work. With over 600,000 lines of code today and hundreds of developers around the world, OpenStack has matured into the open cloud platform that many envisioned years ago. A number of the major issues have been improved, and there are plans to continue building upon them. And with core stability comes the ability to expand OpenStack’s feature set.
One such feature is block storage. Appropriately named "nova-volume," the block storage service of OpenStack has long been a part of the project, but was neatly tucked into the OpenStack Nova code. For many releases it remained somewhat hidden as the community fostered the growth of the service.
As with many "auxiliary" services in OpenStack Nova, when the project first started many key components lived in the Nova codebase: nova-network, nova-volume, and nova-objectstore were all part of Nova proper. This caused issues. It bloated the compute code and made it harder to contribute to Nova because there were many dependencies that had to be resolved with other services before the Nova code could be merged.
At the Diablo Design Summit in Santa Clara, Chuck Thier and his team at Rackspace proposed that nova-volume be spun off into its own OpenStack project. This, combined with a scalable storage backend, would eventually be the first pass at Lunr.
Blueprints were drafted and the initial work was set to begin. At the time, re-factoring nova-volume to a standalone service was not a popular decision. Our team worked hard to make it happen and prove that it was feasible. We were mere days from revealing our first efforts to the rest of the OpenStack community when reality dawned on us -- our initial plans turned out to be a bit ambitious, and it turned out that our small team could not both foster a community around a volume service and build a scalable storage backend at the same time. It was then, with the blessing of Vish Ishaya, Nova project technical lead, and other community leadership that we decided it would be best to reconsider our approach, and focus instead on building the scalable storage backend, which is now called Lunr, while the Nova community continued work on nova-volume.
Work on nova-volume picked up and rapidly progressed. By the Folsom Design Summit, Rackspace had a preview of Cloud Block Storage available. It utilized the nova-volume API service with our Lunr storage backend. Rackspace invited customers to test it out. It was at this same design summit that multiple members of the storage community came together to re-ignite the idea of re-factoring nova-volume to a standalone service. With that, OpenStack Cinder was born. The community rallied and did a tremendous job getting OpenStack Cinder ready for the Folsom release of OpenStack.
With the amazing progress Cinder had made, we decided to take the opportunity to transfer from using nova-volume to Cinder. This has decoupled our API infrastructure from Nova, and has made for a much cleaner overall architecture. We have become very involved with the Cinder project, including at the recent Grizzly design summit, and we plan to contribute even more to the project in the future. There were many design sessions at the Grizzly Summit last week in San Diego that discussed items such as:
Today, Rackspace's Cloud Block Storage provides an open API utilizing OpenStack Cinder and our scalable storage platform, Lunr. We look forward to a bright future as we open more of the Lunr code base and help OpenStack Cinder become the platform for block storage in all clouds.
You can use the control panel to create Cloud Block Storage volumes, but that isn't as fun as using the API to programatically control storage. Here, I'll use the rackspace-novaclient to demonstrate how to create block storage volumes and attach them to servers. First, I use the nova client to list the types of storage available:
$ nova volume-type-list +----+------+ | ID | Name | +----+------+ | 1 | SATA | | 2 | SSD | +----+------+
Next, let's create a 100GB SATA volume called "BlockDevice:"
$ nova volume-create --display-name BlockDevice --volume-type SATA 100
Then I can attach the volume to a server:
$ nova volume-attach <ID_OF_SERVER> <ID_OF_VOLUME> /dev/xvdd
Cloud Block Storage is presented to the Cloud Server as an additional hard drive, ready for formatting and mounting to your filesystem. When you are ready to detach the volume, unmount the device on the server and then use the following command:
$ nova volume-detach <ID_OF_SERVER> <ID_OF_VOLUME>
With these commands you have a wide range of storage options available. Keep checking back for more posts on Cloud Block Storage!