Containerization

How to fix "loopback devices is strongly discouraged for production use" on Docker

docker Users of Docker (1.6+) on CentOS 7 or RHEL 7 may see the warning shown below.

docker run centos /bin/echo “ezylinux.com”

Usage of loopback devices is strongly discouraged for production use. Either use --storage-opt dm.thinpooldev or use --storage-opt dm.no_warn_on_loop_devices=true to suppress this warning. This warning occurs because Docker configures devicemapper storage and creates a loopback device (such as /dev/loop0) when it cannot find the AUFS driver, Docker’s default storage driver (available in Ubuntu). * This mode, using a loopback device with devicemapper, is unsuitable for production. ** Red Hat does not favor AUFS, so it does not include it in its distribution and has instead developed OverlayFS and devicemapper thin provisioning. To address this: Disable the warning by editing /etc/sysconfig/docker-storage: DOCKER_STORAGE_OPTIONS = “—storage-opt dm.no_warn_on_loop_devices = true” DOCKER_STORAGE_OPTIONS = “—storage-opt dm.thinpooldev = /dev/mapper/VolGroup-docker”

EOF.← Back to articles