The Docker overlay2 storage driver requires the xfs d_type feature to functioning correctly.
That means the xfs filesystem needs to be created with mkfs.xfs -n ftype=1 /path/to/dev
Unfortunately, that is not the default in RHEL/Centos7. So you end up with an unstable Docker install.
See the output of xfs_info and look for ftype=0
If you see that, then you are in a bit of trouble. You may not hit any bugs for a while..
First the bad news. You can’t just modify the existing xfs filesystem. You need a new one.
- Format the new device with mkfs.xfs -n ftype=1 /path/to/dev and then mount it.
- Stop docker.
- rsync -a /var/lib/docker/* /path/to/dev to copy all of the docker storage to the new root.
- edit the docker.service file /etc/systemd/system/multi-user.target.wants/docker.service and add
-g /new/path to the ExecStart line.
- Start Docker
- Verify with df and docker info that the new docker root is being used.