Bug 1475625 - Change the default storage driver to overlay2
Change the default storage driver to overlay2
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Frantisek Kluknavsky
Maxim Svistunov
: Extras
Depends On:
Blocks: 1477926
  Show dependency treegraph
Reported: 2017-07-26 23:03 EDT by Ben Breard
Modified: 2018-03-05 15:02 EST (History)
10 users (show)

See Also:
Fixed In Version: container-storage-setup-0.9.0-1.rhel75.gite0997c3.el7
Doc Type: Release Note
Doc Text:
Default storage driver for docker has switched to ovlerlay2 (from devicemapper) in RHEL7.5. So new docker installations should see overlay2 as default on RHEL7.5 or newer releases. On older releases, devicemapper still continues to be the default. Upgrade of existing installations should remain unaffected.
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ben Breard 2017-07-26 23:03:08 EDT
Description of problem:

RHEL & Atomic Host default to devicemapper as the storage driver for docker. That needs to change to overlay2.

Version-Release number of selected component (if applicable):

Actual results:

Expected results:

Additional info:

I couldn't find another tracker for this. Please close if one already exists.
Comment 3 Ben Breard 2017-08-09 14:34:02 EDT
We need to look out for older RHEL 7 systems, pre 7.3, where the file system is missing "type=1" with XFS. One option would be putting a check in the unit file that would fail to start if "type=0" is found for the file system under /var/lib/docker. container-storage-setup will also need checks for this.
Comment 4 Daniel Walsh 2017-08-11 08:25:18 EDT
Comment 5 Vivek Goyal 2017-10-24 16:49:41 EDT
Dan, lokesh, it might be time to discuss this and make related changes. We have another similar bug for atomic host here.


Lets us keep all the conversation about all the flavors of rhel 7.5 in this bz and how their defaults storage config files should look like here.
Comment 7 Vivek Goyal 2017-10-24 17:06:18 EDT
So in fedora, we have 4 variants. Atomic.host, Cloud, Server and Workstation and we have per product configuration.

How many do we have in RHEL. And then we can discuss per product configuration of each product.

On atomic, I have assuming that rootfs size is by default small (3G). If that's the case we should probably setup overlayfs on a separate volume from root volume group.

For others I am assuming that by default rootfs partition is big and overlayfs should be setup on rootfs. (And not a separate volume). Anyway, for cloud images, there might not be any volume group so setting it up on rootfs might be the only option.

I guess we also will have to check ftype and fall back to device mapper if rootfs does not have ftype=1.
Comment 8 Vivek Goyal 2017-10-30 09:51:16 EDT
Lokesh, can you please take care of making spec file changes for this. Dan mentioned that we don't have any product variants. So we could probably just have another docker-storage.sysconfig for overlay and install that. 

We need to make sure that we check rhel version and do this change only for 7.5 onwards. (And not for 7.3 and 7.4)

Also we will have to ftype check also and make sure rootfs supports ftype=1
Comment 9 Vivek Goyal 2017-10-31 10:56:51 EDT
Ok, had an IRC conversation with walters just now about what's planned for 7.5 atomic. They are planning that rootfs will grow automatically to consume all the free space in root volume group. (like F27AH). 

If that's the case, then we don't have to setup a separate volume for overlay in atomic host. And we can create a default config which works across all rhel 7.5 products.

I think something as simple as following should work.

# cat /etc/sysconfig/docker-storage-setup
Comment 10 Dusty Mabe 2017-10-31 11:27:05 EDT
We should probably make sure we have some good documentation somewhere that shows the user how to set up a separate LV for container root (using container-storage-setup) that will use overlay2 on top.
Comment 12 Ben Breard 2017-10-31 11:34:29 EDT
We cover it, but we could probably use a better example for AH.

Note You need to log in before you can comment on or make changes to this bug.