I'm having this in my /etc/sysconfig/docker-storage
DOCKER_STORAGE_OPTIONS="--storage-driver=overlay2"
Then I mount /dev/xdvcz
to /var/lib/docker/overlay2
.
Then I do a df -h
:
# df -h /dev/xvdcz
Filesystem Size Used Avail Use% Mounted on
/dev/nvme1n1 938G 72M 888G 1% /var/lib/docker/overlay2
That's correct, I have 1000G EBS device.
Now I start docker with service docker start
.
df -h
report is now changing to:
# df -h /dev/xvdcz
Filesystem Size Used Avail Use% Mounted on
/dev/nvme1n1 7.8G 7.8G 0 100% /var/lib/docker/overlay2
Okay, stop docker: service docker stop
df -h
report is now changing back to:
# df -h /dev/xvdcz
Filesystem Size Used Avail Use% Mounted on
/dev/nvme1n1 938G 72M 888G 1% /var/lib/docker/overlay2
service docker start
is mounting/var/docker
again, causing the mount I put there initially to become useless.