---
description: Learn how to optimize your use of AUFS driver.
keywords: 'container, storage, driver, AUFS '
title: AUFS storage driver
sitemap: false
aliases:
- /storage/storagedriver/aufs-driver/
---
> **Deprecated**
>
> The AuFS storage driver has been deprecated, and is removed in Docker Engine
> v24.0. If you are using AufS, you must migrate to a supported storage driver
> before upgrading to Docker Engine v24.0. Read the [Docker storage drivers](select-storage-driver.md)
> page for supported storage drivers.
AUFS is a *union filesystem*. The `aufs` storage driver was previously the default
storage driver used for managing images and layers on Docker for Ubuntu, and for
Debian versions prior to Stretch. If your Linux kernel is version 4.0 or higher,
and you use Docker Engine - Community, consider using the newer
[overlay2](overlayfs-driver.md), which has
potential performance advantages over the `aufs` storage driver.
## Prerequisites
- For Docker Engine - Community, AUFS is supported on Ubuntu, and on Debian versions prior to
Stretch.
- If you use Ubuntu, you need to add the AUFS module to the kernel. If you do
not install these packages, you need to use `overlay2`.
- AUFS cannot use the following backing filesystems: `aufs`, `btrfs`, or
`ecryptfs`. This means that the filesystem which contains
`/var/lib/docker/aufs` cannot be one of these filesystem types.
## Configure Docker with the `aufs` storage driver
If the AUFS driver is loaded into the kernel when you start Docker, and no other
storage driver is configured, Docker uses it by default.
1. Use the following command to verify that your kernel supports AUFS.
```console
$ grep aufs /proc/filesystems
nodev aufs
```
2. Check which storage driver Docker is using.
```console
$ docker info
<truncated output>
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 0
Dirperm1 Supported: true
<truncated output>
```
3. If you are using a different storage driver, either AUFS is not included in
the kernel (in which case a different default driver is used) or that
Docker has been explicitly configured to use a different driver. Check
`/etc/docker/daemon.json` or the output of `ps auxw | grep dockerd` to see
if Docker has been started with the `--storage-driver` flag.
## How the `aufs` storage driver works
AUFS is a *union filesystem*, which means that it layers multiple directories on
a single Linux host and presents them as a single directory. These directories
are called _branches_ in AUFS terminology, and _layers_ in Docker terminology.
The unification process is referred to as a _union mount_.
The diagram below shows a Docker container based on the `ubuntu:latest` image.

Each image layer, and the container layer, are represented on the Docker host as
subdirectories within `/var/lib/docker/`. The union mount provides the unified
view of all layers. The directory names do not directly correspond to the IDs
of the layers themselves.
AUFS uses the Copy-on-Write (CoW) strategy to maximize storage efficiency and
minimize overhead.
### Example: Image and container on-disk constructs
The following `docker pull` command shows a Docker host downloading a Docker
image comprising five layers.
```console
$ docker pull ubuntu
Using default tag: latest
latest: Pulling from library/ubuntu
b6f892c0043b: Pull complete
55010f332b04: Pull complete
2955fb827c94: Pull complete
3deef3fcbd30: Pull complete
cf9722e506aa: Pull complete
Digest: sha256:382452f82a8bbd34443b2c727650af46aced0f94a44463c62a9848133ecb1aa8
Status: Downloaded newer image for ubuntu:latest
```
#### The image layers
> `/var/lib/docker/`. These files and directories are managed by Docker.
All of the information about the image and container layers is stored in
subdirectories of `/var/lib/docker/aufs/`.
- `diff/`: the **contents** of each layer, each stored in a separate