> ## Documentation Index
> Fetch the complete documentation index at: https://otoyinc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker Storage

Jobs pull large Docker images onto your Node. This guide shows you how to check which disk Docker is storing images on, and how to move that storage to a larger disk if needed.

> [!NOTE]
>
> Docker has two ways of storing images: the classic **overlay2** storage driver and the newer **containerd image store**. Docker 29 defaults to the containerd image store. Where your images physically live depends on which one you're using, so check that first.

### 1. Check which image store Docker is using

```bash theme={null}
docker info --format '{{.Driver}} {{.DriverStatus}}'
```

* If the output starts with `overlayfs` and includes `io.containerd.snapshotter.v1`, you are using the **containerd image store**.
* If the output starts with `overlay2` (or `btrfs`, `zfs`), you are using the **classic storage driver**.

### 2. Find where Docker stores its data

Docker's own state (containers, volumes, networks) lives in its data root:

```bash theme={null}
docker info --format '{{.DockerRootDir}}'
```

The default is `/var/lib/docker`.

**If you are using the classic storage driver (overlay2)**, images also live under this directory, and this is the only location you need to care about.

**If you are using the containerd image store**, image layers are stored by `containerd`, not under Docker's data root. Find containerd's root with:

```bash theme={null}
sudo containerd config dump | grep '^root'
```

The default is `/var/lib/containerd`.

### 3. Check which disk and how much space

```bash theme={null}
df -h /var/lib/docker /var/lib/containerd
```

Replace the paths with the ones you found above if they differ. The `Filesystem` and `Mounted on` columns tell you which disk each directory is on.

### 4. Move Docker storage to another disk (optional)

Rather than copying existing data to the new disk, this procedure removes all images and containers and starts Docker fresh in the new location. Jobs will re-pull whatever images they need.

> [!WARNING]
>
> Stop the `disNet` client before you begin so that no Jobs are running. This procedure deletes **all** Docker images, containers, and volumes on the machine. If you use this machine for anything other than Dispersed, back up anything you need first.

**4.1 Remove all images, containers, and volumes:**

```bash theme={null}
docker system prune -a --volumes -f
```

> [!NOTE]
>
> If you haven't configured a non-root docker group, prepend the command above with `sudo`

**4.2 Stop Docker and containerd:**

```bash theme={null}
sudo systemctl stop docker docker.socket containerd
```

**4.3 Create the new directories on the target disk** (this example uses a disk mounted at `/mnt/data`):

```bash theme={null}
sudo mkdir -p /mnt/data/docker /mnt/data/containerd
```

**4.4 Point Docker at the new data root.** Edit `/etc/docker/daemon.json` and add the `data-root` key at the top level:

```json theme={null}
  "data-root": "/mnt/data/docker"
```

**4.5 Point containerd at the new root.** If you are using the containerd image store, edit `/etc/containerd/config.toml` and set `root` at the top of the file:

```toml theme={null}
root = "/mnt/data/containerd"
```

> [!NOTE]
>
> If you are on the classic storage driver (overlay2) this step is optional, but doing it now means you won't need to revisit it if you switch stores later.

**4.6 Start the services and verify:**

```bash theme={null}
sudo systemctl start containerd docker
sudo docker info --format '{{.DockerRootDir}}'
sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi
sudo docker image ls
df -h /mnt/data
```

You should see the new data root, your GPU information, and the freshly pulled `ubuntu` image counted against the new disk.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.