Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ensure that docker is using device-mapper storage backend

Tags:

docker

Docker 0.7 introduces multiple storage backends, and one of them is devicemapper. How can I check which storage backend it is using, and force it to use devicemapper if it is not already?

like image 336
Robin Green Avatar asked Dec 28 '13 02:12

Robin Green


People also ask

What is docker device mapper?

Device Mapper is a kernel-based framework that underpins many advanced volume management technologies on Linux. Docker's devicemapper storage driver leverages the thin provisioning and snapshotting capabilities of this framework for image and container management.

What storage driver is docker using?

Each Docker storage driver is based on a Linux filesystem or volume manager. Be sure to follow existing best practices for operating your storage driver (filesystem or volume manager) on top of your shared storage system.

Which docker command is used to determine the current storage driver configured?

To see the storage driver being used, issue the docker info command.


1 Answers

To check which one it is currently using:

sudo docker info|grep 'Storage Driver:'

You can force docker to use devicemapper by adding -s=devicemapper to the docker daemon's command line arguments (the docker daemon will be run as a service on boot, so this will involve modifying a file in /etc, probably /etc/default/docker, or if that doesn't exist, /etc/sysconfig/docker).

like image 177
Robin Green Avatar answered Sep 27 '22 23:09

Robin Green