> For the complete documentation index, see [llms.txt](https://chameleoncloud.gitbook.io/chi-in-a-box/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chameleoncloud.gitbook.io/chi-in-a-box/reference/glance-image-storage.md).

# Glance Image Storage

All images used to launch instances are stored by Glance. However, glance holds the metadata, and delegates the actual data storage to one or more backends. Configuration and best practices are summarized below.

The kolla-ansible docs with details are listed here: <https://docs.openstack.org/kolla-ansible/xena/reference/shared-services/glance-guide.html>

{% hint style="warning" %}
Images saved using cc-snapshot are also stored in Glance. This means that it contains user-data, and should be treated with care.
{% endhint %}

### File Backend

If not configured, Glance defaults to storing image data on the controller node, in the path `/var/lib/glance/images`.

{% hint style="danger" %}
Make sure you back up this directory!
{% endhint %}

Customize this path by setting:

```
glance_backend_file: "yes"
glance_file_datadir_volume: "/path/to/shared/storage/"
```

#### Notes for network filesystems

Even if using a network filesystem as the `glance_file_datadir_volume`, ensure that it has backups, or at least snapshots to allow recovery from file deletion.

If the mount "flaps", that is goes down and back up due to a network disruption, the following procedure must be taken to mount it inside the container.

1. Stop the glance container `docker stop glance_api`
2. unmount the network share `umount /path/to/shared/storage`
3. remount the network share `mount /path/to/shared/storage`
4. start the glance container `docker start glance_api`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://chameleoncloud.gitbook.io/chi-in-a-box/reference/glance-image-storage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
