> For the complete documentation index, see [llms.txt](https://docs.openiam.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openiam.com/troubleshooting/performance/lackof_disk_space.md).

# Running out of disk space

Finding what has filled the disk on an OpenIAM host and reclaiming it, from container images to the systemd journal.

| Symptom                                                                           | Likely cause                                                              | Resolution                                   |
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------- |
| Services fail to write, or a container will not start, and the filesystem is full | Images and stopped containers, the systemd journal, or OpenIAM's own logs | Find the consumer first, then reclaim, below |

Reclaim from whatever is actually holding the space rather than running every command below — each one frees a different thing, and on a given host usually only one of them matters.

## Find out what is holding it

Start with the filesystems, so you know which one is full:

```bash
df -h
```

Then the likely consumers:

| Consumer                          | Check                            |
| --------------------------------- | -------------------------------- |
| OpenIAM's own service logs        | `du -sh /usr/local/openiam/logs` |
| The systemd journal               | `journalctl --disk-usage`        |
| Everything under the OpenIAM home | `du -sh /usr/local/openiam/*`    |

**On an OpenIAM host the answer is usually the service logs**, so start there rather than with the filesystem as a whole.

## Reclaim it

### The systemd journal

```bash
sudo journalctl --vacuum-size=100M
```

This trims the persistent journal to 100 MB by discarding the oldest entries. It runs from anywhere — there is no need to change directory first.

To cap it permanently rather than once, set `SystemMaxUse` in `/etc/systemd/journald.conf`.

{% hint style="info" %}
**Check whether the space comes back.** Run `df -h` again rather than assuming — if the filesystem is still full, the consumer was something else in the table above.
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openiam.com/troubleshooting/performance/lackof_disk_space.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
