Reputation: 1058
My docker was running fine but don't know why near about before 32 hours docker daemon stopped .
So i tried to run the daemon again sudo systemctl start docker
. Everything was fine . But when i tried to restart the containers using docker restart $(docker ps -aq)
.
I am getting error in mounting overlay2
. I investigate on google and came to know that overlay2 driver is not supported by my server that's why I am facing this issue.
SO now i have to update the storage driver for docker using flag --storage-driver
so i tried sudo systemctl start docker --storage-driver devicemapper
but geting error systemctl: unrecognized option '--storage-driver'
Does anyone know how to do it ?
docker version : Docker version 1.13.1, build 6e3bb8e/1.13.1
os :
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
Thanks.
Upvotes: 1
Views: 680
Reputation: 263597
You can set the storage driver with a /etc/docker/daemon.json file that contains the following:
{
"storage-driver": "devicemapper"
}
I've had much better luck with overlay2, so if you can upgrade your kernel to support the new driver, I'd recommend that instead.
Upvotes: 1