4 ms·
By default, Docker will use the AUFS storage backend if available, and then fall back to devicemapper on loopback. RHEL, CentOS, and Fedora do not ship the AUF
by infodroid 11y ago
By default, Docker will use the AUFS storage backend if available, and then fall back to devicemapper on loopback.
RHEL, CentOS, and Fedora do not ship the AUFS kernel module because it is not part of the mainline Linux kernel and is unlikely to be included in future, and these distros have an "upstream first, no out-of-tree bits" policy. Instead, they recommend using devicemapper on LVM [1][2].
The same advice is provided in the official Docker documentation [3]:
> Docker hosts running the devicemapper storage driver default to a configuration mode known as loop-lvm... The mode is designed to work out-of-the-box with no additional configuration. However, production deployments should not run under loop-lvm mode... The preferred configuration for production deployments is direct lvm.
You might consider using CentOS Atomic Host, which comes preconfigured with LVM thin pools.
OverlayFS is also an alternative, but it can be problematic. It only implements a subset of the POSIX standard [4], which can cause some programs to fail.
[1] http://www.projectatomic.io/blog/2015/06/notes-on-fedora-centos-and-docker-storage-drivers/ http://www.projectatomic.io/blog/2015/06/notes-on-fedora-cen...
[2] https://access.redhat.com/documentation/en/red-hat-enterprise-linux-atomic-host/version-7/getting-started-with-containers/#managing_storage_with_docker_formatted_containers https://access.redhat.com/documentation/en/red-hat-enterpris...
[3] https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/ https://docs.docker.com/engine/userguide/storagedriver/devic...
[4] https://docs.docker.com/engine/userguide/storagedriver/overlayfs-driver/ https://docs.docker.com/engine/userguide/storagedriver/overl...
- mbreese 11y agoYeah, I'm a bit surprised that the author didn't try direct LVM for their device. The speed up is noticeable.
- dvusboy 11y agoThe author of the original blog is confusing the issue of base-image of a Docker image and the host OS on which the Docker daemon is running. They are completely orthogonal issues. Yes, there've been plenty of complaints about DM performance and space reclamation issues. By all means, switch the host OS from CentOS/Fedora to Ubuntu if it alleviates the problems. The base-image is a completely different matter. There is no reason to switch from CentOS/Fedora to Ubuntu just because you changed the host OS. This is point of the filesystem isolation Docker provides.
- rusher81572 11y agoThe base-image is a completely different matter. There is no reason to switch from CentOS/Fedora to Ubuntu just because you changed the host OS >> Yes, there is. There is a known issue using AUFS(Which Ubuntu uses for Docker) with CentOS/Fedora images: https://github.com/docker/docker/issues/6980 https://github.com/docker/docker/issues/6980 To make it easier, I just changed the base image from CentOS/Fedora to Ubuntu so I do not have to worry about it.