Question

Centos 7 Docker storage loopback warning

I’m getting message: “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.” when I run container.

I wanted to create second partition for docker data but on digital ocean it’s not possible. What is the other good option to fix it?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi, No, nothing to do with resizing.

Actually, the message might have been added specificly only in the RedHat’s supported Docker binary (seem indeed to remember that was proposed but refused upstream), BUT it’s a real message you should pay attention in general.

The big issue here is actually that Docker is configured (as is the default) to use Devicemapper IN LOOPBACK MODE. This loopback mode is the thing that’s strongly discouraged to be used.

So, you should either use direct LVM storage (called “thin provisionning”, aka “thinp”), or switch to another storage driver.

Btw, shameless plug: http://batmat.net/2015/08/26/docker-storage-driver-dont-use-devicemapper/ (I stored a lot of links in that blog so I think that may be of interest here, not only trying to do advertising ;-)).

HTH

Cheers

I believe this is specific to RHEL variants of linux from what I understand. They’d prefer that you mount docker storage into the container outside the root volume. I don’t think this is possible though on digital ocean. If this was AWS for example you’d be able to mount a separate EBS volume specifically to be referenced for your containers. For digital ocean it’s probably best for you to just read the error message closely and add the flag to the docker daemon to hide the message.

Unfortunately I don’t have any lv group. This is how my partitions looks like:

/dev/vda1 20G 2,2G 17G 12% / devtmpfs 240M 0 240M 0% /dev tmpfs 246M 0 246M 0% /dev/shm tmpfs 246M 8,3M 237M 4% /run tmpfs 246M 0 246M 0% /sys/fs/cgroup