mirror of https://github.com/docker/docs.git
Merge pull request #1067 from docker/1061_aufs_prereqs
Add prereqs to AUFS configuration steps
This commit is contained in:
commit
5720fbb52a
|
@ -97,43 +97,68 @@ back to a "copy and unlink" strategy.
|
||||||
|
|
||||||
## Configure Docker with AUFS
|
## Configure Docker with AUFS
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
You can only use the AUFS storage driver on Linux systems with AUFS installed.
|
You can only use the AUFS storage driver on Linux systems with AUFS installed.
|
||||||
Use the following command to determine if your system supports AUFS.
|
Use the following command to determine if your system supports AUFS.
|
||||||
|
|
||||||
$ grep aufs /proc/filesystems
|
```bash
|
||||||
|
$ grep aufs /proc/filesystems
|
||||||
|
|
||||||
nodev aufs
|
nodev aufs
|
||||||
|
```
|
||||||
|
|
||||||
This output indicates the system supports AUFS. Once you've verified your
|
This output indicates the system supports AUFS. If you get no output, your system does
|
||||||
system supports AUFS, you can must instruct the Docker daemon to use it. You do
|
not support AUFS. To address this:
|
||||||
this from the command line with the `dockerd` command:
|
|
||||||
|
|
||||||
$ sudo dockerd --storage-driver=aufs &
|
- Upgrade your host system's kernel to 3.13 or higher. It is recommended to intall the
|
||||||
|
kernel headers when you upgrade.
|
||||||
|
|
||||||
|
- **Ubuntu or Debian**: In addition to updating the kernel if necessary, install the
|
||||||
|
`linux-image-extra-*` packages:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ sudo apt-get install linux-image-extra-$(uname -r) \
|
||||||
|
linux-image-extra-virtual
|
||||||
|
```
|
||||||
|
|
||||||
Alternatively, you can edit the Docker config file and add the
|
### Configuration
|
||||||
|
|
||||||
|
When you have verified that you meet the prerequisites, instruct the Docker daemon to use
|
||||||
|
AUFS by starting the Docker daemon with the flag `--storage-driver=aufs`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ sudo dockerd --storage-driver=aufs &
|
||||||
|
```
|
||||||
|
|
||||||
|
To make the change permanent, you can edit the Docker configuration file and add the
|
||||||
`--storage-driver=aufs` option to the `DOCKER_OPTS` line.
|
`--storage-driver=aufs` option to the `DOCKER_OPTS` line.
|
||||||
|
|
||||||
# Use DOCKER_OPTS to modify the daemon startup options.
|
```none
|
||||||
DOCKER_OPTS="--storage-driver=aufs"
|
# Use DOCKER_OPTS to modify the daemon startup options.
|
||||||
|
DOCKER_OPTS="--storage-driver=aufs"
|
||||||
|
```
|
||||||
|
|
||||||
Once your daemon is running, verify the storage driver with the `docker info`
|
After the daemon starts, verify the default storage driver using the `docker info`
|
||||||
command.
|
command:
|
||||||
|
|
||||||
$ sudo docker info
|
```bash
|
||||||
|
$ sudo docker info
|
||||||
|
|
||||||
Containers: 1
|
Containers: 1
|
||||||
Images: 4
|
Images: 4
|
||||||
Storage Driver: aufs
|
Storage Driver: aufs
|
||||||
Root Dir: /var/lib/docker/aufs
|
Root Dir: /var/lib/docker/aufs
|
||||||
Backing Filesystem: extfs
|
Backing Filesystem: extfs
|
||||||
Dirs: 6
|
Dirs: 6
|
||||||
Dirperm1 Supported: false
|
Dirperm1 Supported: false
|
||||||
Execution Driver: native-0.2
|
Execution Driver: native-0.2
|
||||||
...output truncated...
|
...output truncated...
|
||||||
|
```
|
||||||
|
|
||||||
The output above shows that the Docker daemon is running the AUFS storage
|
Look for the `Storage Driver` line. If its value is `aufs`, the Docker daemon is
|
||||||
driver on top of an existing `ext4` backing filesystem.
|
using the AUFS storage driver on top of the filesystem listed on the
|
||||||
|
`Backing Filesystem` line.
|
||||||
|
|
||||||
## Local storage and AUFS
|
## Local storage and AUFS
|
||||||
|
|
||||||
|
@ -227,4 +252,4 @@ needs to detect its failure and fall back to a "copy and unlink" strategy.
|
||||||
* [Understand images, containers, and storage drivers](imagesandcontainers.md)
|
* [Understand images, containers, and storage drivers](imagesandcontainers.md)
|
||||||
* [Select a storage driver](selectadriver.md)
|
* [Select a storage driver](selectadriver.md)
|
||||||
* [Btrfs storage driver in practice](btrfs-driver.md)
|
* [Btrfs storage driver in practice](btrfs-driver.md)
|
||||||
* [Device Mapper storage driver in practice](device-mapper-driver.md)
|
* [Device Mapper storage driver in practice](device-mapper-driver.md)
|
||||||
|
|
Loading…
Reference in New Issue