Usage of loopback devices is strongly discouraged for production use

The warning message occurs because your Docker storage configuration is using a “loopback device” — a virtual block device such as /dev/loop0 that is actually backed by a file on your filesystem. This was never meant as anything more than a quick hack to get Docker up and running quickly as a proof of concept.

You don’t want to suppress the warning; you want to fix your storage configuration such that the warning is no longer issued. The easiest way to do this is to assign some local disk space for use by Docker’s devicemapper storage driver and use that.

If you’re using LVM and have some free space available on your volume group, this is relatively easy. For example, to give docker 100G of space, first create a data and metadata volume:

# lvcreate -n docker-data -L 100G /dev/my-vg
# lvcreate -n docker-metadata -L1G /dev/my-vg

And then configure Docker to use this space by editing /etc/sysconfig/docker-storage to look like:

DOCKER_STORAGE_OPTIONS=-s devicemapper --storage-opt dm.datadev=/dev/my-vg/docker-data --storage-opt dm.metadatadev=/dev/my-vg/docker-metadata

If you’re not using LVM or don’t have free space available on your VG, you could expose some other block device (e.g., a spare disk or partition) to Docker in a similar fashion.

There are some interesting notes on this topic here.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)