Using local SSD storage
Local SSD storage as an alternative to our default distributed storage
Objective
This tutorial aims to enable you to make use of the local ssd storage provided as an alternative to the default distributed storage in the firstcolo Cloud.
Prerequisites
- You should be able to use simple heat templates, like shown in the first steps tutorial.
- You know the basics of using the OpenStack CLI-Tools.
- Environment variables are set, like shown in the API-Access-Tutorial.
Setup an instance with local ssd storage using the dashboard
When creating an instance with local storage you first need to make sure that you are not using the option to create volume during the instance creation since that would create a volume in the cinder service which is backed by our ceph storage.
The next step is to choose a flavor with a disk size that matches your requirements.
Info
When using local storage it is not possible to set a dynamic disk size as you would, when using the volume service. Every flavor has a static storage size defined. If you need to increase the space the only option is to upgrade to a flavor with a bigger root disk.
In our example we'll be using the g2.medium flavor which has a root disk of 40gb.
After the instance has been created you can see that there should bo no volumes attached, which means the volume service is not used currently and the vm is running on the locale storage of the hypervisor.
Setup an instance with local ssd storage using the CLI
The following command creates an instance with the g2.medium flavor and local storage.
openstack server create --network Extern --flavor g2.medium \
--image ubuntu-2004-latest database2-locale
You can check if there are any attached volumes by using the following command. In our case this should return nothing for now.
openstack server volume list database2-locale
Implications
See our Background article about Local SSD Storage for more information about the implications of using local ssd storage.
Summary / Conclusion
You now have created a basic server with local ssd storage. You should now be able to do anything you were able to do with distributed storage, with local storage as well.