OpenStack, Docker, Ansible, Ceph, Linux

In this post i will show you how to add multiple store locations for glance images.
This will allow you to extend your glance capacity without affect your current stored images.
The location can be any device or directory mounted at your glance host as a NFS, a physical hard disk, or an extended partition.
Let’s start:

First we need to create the directories where hard disks are going to be mounted
sudo mkdir /var/lib/glance/lvm-images
sudo mkdir /var/lib/glance/extended-images

Next, we mount the devices at the directories created in the previous step

Once the previous steps has been made, we need to configure the /etc/glance/glance-api.conf file.
In this file, we’re going to configure glance to use multiple directories to store images.
We search the section “Filesystem Store Options” and modify/create the following:
We will leave the option “filesystem_store_datadir=” empty, if we comment this option, glance will use it as default store location and will show us an error during image creation.
And we add the option “filesystem_store_datadirs”, once for any directory we created in previous steps.
We can use priorities on glance, priority 200 has precedence over priority 100, if we don’t specify any priority, default will be 0

The image has been properly created at glance, we’re going to check if the image has been properly created in the expected location.
As we have configured a priority of 200 on this directory, the image must be here.

Share this:

Like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.