Expected behavior
I expect the docker daemon to start without any error.
Actual behavior
This is the output from the journalctl.
-- Unit docker.service has begun starting up.
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal dockerd[20041]: time="2021-12-02T11:50:09.530641246Z" level=info msg="Starting up"
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal dockerd[20041]: time="2021-12-02T11:50:09.582308288Z" level=info msg="parsed scheme: \"unix\"" module=grpc
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal dockerd[20041]: time="2021-12-02T11:50:09.582906856Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal dockerd[20041]: time="2021-12-02T11:50:09.583139690Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>}" module=grpc
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal dockerd[20041]: time="2021-12-02T11:50:09.583196030Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal dockerd[20041]: time="2021-12-02T11:50:09.596461601Z" level=info msg="parsed scheme: \"unix\"" module=grpc
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal dockerd[20041]: time="2021-12-02T11:50:09.596509891Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal dockerd[20041]: time="2021-12-02T11:50:09.596540532Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock <nil> 0 <nil>}] <nil> <nil>}" module=grpc
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal dockerd[20041]: time="2021-12-02T11:50:09.596557212Z" level=info msg="ClientConn switching balancer to \"pick_first\"" module=grpc
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal dockerd[20041]: time="2021-12-02T11:50:09.708418727Z" level=error msg="failed to mount overlay: invalid argument" storage-driver=overlay2
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal dockerd[20041]: time="2021-12-02T11:50:09.708480788Z" level=error msg="[graphdriver] prior storage driver overlay2 failed: driver not supported"
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal dockerd[20041]: failed to start daemon: error initializing graphdriver: driver not supported
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Dec 02 11:50:09 ip-10-2-1-250.ap-south-1.compute.internal systemd[1]: Failed to start Docker Application Container Engine.
The last line:
[graphdriver] prior storage driver overlay2 failed: driver not supported
Additional Information
I would like to store my docker files, including volumes, images and container data in EFS mount.
To do that, I have this in my /etc/docker/daemon.json
:
{
"data-root": "/efs/system/docker/data-root",
}
The /efs/system/docker/data-root
is located inside a EFS mount on my Amazon Linux, running on EC2.
Steps to reproduce the behavior
- Install docker on Amazon Linux 2. Add ec2-user to
docker
group. - Mount an EFS drive on
/efs
. Use the command,sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport <fs-efsid>.efs.<region>.amazonaws.com:/ /efs
- Edit
/etc/docker/daemon.json
to have the following:
{
"data-root": "/efs/system/docker/data-root",
}
- Try to start the docker daemon.