Is the Overlay Storage Driver now the default with CentOS 7 & Docker 1.13?

I just installed Docker 1.13.0 from yum.dockerproject.org onto some CentOS 7.3 hosts.

I was surprised to see that the default Storage Driver has changed from devicemapper to overlay:

docker01 # docker info | less
Server Version: 1.13.0
Storage Driver: overlay
 Backing Filesystem: xfs
 Supports d_type: true

Docker 1.12 had this:

Server Version: 1.12.2
Storage Driver: devicemapper
 Pool Name: docker-253:0-3412340747-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1

Has the default storage driver for Docker 1.13.0 on EL7 changed? I’m not seeing that mentioned in the Release Notes or in the documentation. Using the Overlay driver is a welcome change as long as it’s stable now. But it’s not a small change so I was expecting some more information.

There’s info on github release page for 1.13.1 that says that overlay now replaces devicemapper, details here: https://github.com/docker/docker/releases/tag/v1.13.1

oh, and one more maybe not so obvious thing I noticed (and I didn’t find any explicit info about this scenario) - when I did an upgrade with existing images from 1.12.6 to 1.13.1 devicemapper remained the active storage driver and existing images were available, but if I yum remove docker-engine-1.12 package and do a clean install of docker 1.13.1 overlay driver will be used by default regardless if there were
existing docker images in /var/lib/docker left over from docker 1.12 and those images will not be available (not sure if are actually removed or still taking up space but ‘invisible’) since overlay is now used - tested this on centos 7.

regards,
Mario

I forgot to update this topic. I brought this up on the Docker Slack channels, and the 1.13.1 release notes were made more explicit. :slight_smile:

This change was made with 1.13.0, but isn’t clearly mentioned in the 1.13.0 release notes. Release v1.13.0 · moby/moby · GitHub has this, which is more obscure than I would expect:

  • Promote overlay(2) graphdriver #27932

those images will not be available (not sure if are actually removed or still taking up space but ‘invisible’

Pretty sure the old data is there. You need to remove the old Devicemapper loop device (or direct-lvm device). Sounds like we can export images first, convert the storage, and re-import them later. I haven’t converted my storage yet, and I probably won’t need to export/import since everything should be in our Rancher inventory anyways.

I am also using overlay storage driver and want to understand the content which is store in

/var/lib/docker/overlay , If want to delete the file from here because each and every time it creating

New layers and save into the same location /var/lib/docker/overlay , Due to this storage it is causing docker disk space issue , while running docker container for build the job

Please suggest some good workaround

oh, I see :slight_smile: and thx for the info about devicemapper data after upgrade!

How can one change the storage driver back from overlay to devicemapper didnt found lot of documentation around it

1 Like

Abutall,

There are instructions at Docker storage drivers | Docker Docs which say:

You can set the storage driver by passing the --storage-driver=<name> option to the dockerd command line, or by setting the option on the DOCKER_OPTS line in the /etc/default/docker file.

On a CentOS system, DOCKER_OPTS would actually be OPTIONS in /etc/sysconfig/docker.

It is different in Docker version 1.13.1 for CentOS 7.
I had to modify --storage-driver option in /etc/sysconfig/docker-storage file.