I have been trying to change the default configuration of the docker daemon by changing the data-root
flag in the daemon.json
file located in /etc/docker/
.
Following the documentation on Custom Docker daemon options, I have added the data-root
flag in the daemon.json
file:
{
"data-root": "/seq-data/docker-data",
}
where my new storage dir looks like:
drwx–x–x 14 root root 4096 Oct 1 17:57 docker-data
When trying to restart the daemon I get the following error:
sudo systemctl restart docker
Job for docker.service failed because the control process exited with error code. See “systemctl status docker.service” and “journalctl -xe” for details.
systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Tue 2019-10-01 17:49:39 CEST; 2min 28s ago
Docs: -
Process: 23755 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 23755 (code=exited, status=1/FAILURE)
journalctl -xe
does not return any information but I can read from the /var/log/messages
Oct 1 17:57:24 master systemd: Stopping Docker Socket for the API.
Oct 1 17:57:24 master systemd: Starting Docker Socket for the API.
Oct 1 17:57:24 master systemd: Listening on Docker Socket for the API.
Oct 1 17:57:24 master systemd: Starting Docker Application Container Engine…
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.815570155+02:00” level=info msg=“Starting up”
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.822148476+02:00” level=info msg=“parsed scheme: "unix"” module=grpc
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.822197494+02:00” level=info msg=“scheme "unix" not registered, fallback to default scheme” module=grpc
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.822242119+02:00” level=info msg=“ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 }] }” module=grpc
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.822277440+02:00” level=info msg=“ClientConn switching balancer to "pick_first"” module=grpc
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.824072830+02:00” level=info msg=“parsed scheme: "unix"” module=grpc
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.824110334+02:00” level=info msg=“scheme "unix" not registered, fallback to default scheme” module=grpc
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.824150292+02:00” level=info msg=“ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock 0 }] }” module=grpc
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.824183367+02:00” level=info msg=“ClientConn switching balancer to "pick_first"” module=grpc
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.839333096+02:00” level=warning msg=“Usage of loopback devices is strongly discouraged for production use. Please use--storage-opt dm.thinpooldev
or useman dockerd
to refer to dm.thinpooldev section.” storage-driver=devicemapper
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.868061534+02:00” level=warning msg=“Base device already exists and has filesystem xfs on it. User specified filesystem will be ignored.” storage-driver=devicemapper
Oct 1 17:57:24 master multipathd: dm-6: remove map (uevent)
Oct 1 17:57:24 master multipathd: dm-6: devmap not registered, can’t remove
Oct 1 17:57:24 master multipathd: dm-6: remove map (uevent)
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.899058627+02:00” level=info msg=“[graphdriver] using prior storage driver: devicemapper”
Oct 1 17:57:24 master dockerd: time=“2019-10-01T17:57:24.899105841+02:00” level=warning msg=“[graphdriver] WARNING: the devicemapper storage-driver is deprecated, and will be removed in a future release”
Oct 1 17:57:24 master dockerd: bolt.Close(): funlock error: function not implemented
Oct 1 17:57:24 master dockerd: failed to start daemon: error while opening volume store metadata database: function not implemented
Oct 1 17:57:24 master systemd: docker.service: main process exited, code=exited, status=1/FAILURE
Oct 1 17:57:24 master systemd: Failed to start Docker Application Container Engine.
Oct 1 17:57:24 master systemd: Unit docker.service entered failed state.
Oct 1 17:57:24 master systemd: docker.service failed.
My guess is that the key is in:
Oct 1 17:57:24 master dockerd: bolt.Close(): funlock error: function not implemented
Oct 1 17:57:24 master dockerd: failed to start daemon: error while opening volume store metadata database: function not implemented
I have tried the solutions suggested in this post with similar issues, but the error seems to be different.
Similarly, when deleting the daemon.json
, docker restarts just fine.
systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2019-10-01 18:13:20 CEST; 11s ago
Docs: -
Main PID: 24719 (dockerd)
Memory: 42.6M
CGroup: /system.slice/docker.service
└─24719 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
another important aspect might be the storage-driver
that I’m using devicemapper
docker info
Client:
Debug Mode: false
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 19.03.3-beta2
Storage Driver: devicemapper
Pool Name: docker-8:3-201379873-pool
Pool Blocksize: 65.54kB
Base Device Size: 10.74GB
Backing Filesystem: xfs
Udev Sync Supported: true
Data file: /dev/loop10
Metadata file: /dev/loop11
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 11.8MB
Data Space Total: 107.4GB
Data Space Available: 24.41GB
Metadata Space Used: 581.6kB
Metadata Space Total: 2.147GB
Metadata Space Available: 2.147GB
Thin Pool Minimum Free Space: 10.74GB
Deferred Removal Enabled: true
Deferred Deletion Enabled: true
Deferred Deleted Device Count: 0
Library Version: 1.02.135-RHEL7 (2016-11-16)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-514.el7_lustre.x86_64
Operating System: Scientific Linux 7.3 (Nitrogen)
OSType: linux
Architecture: x86_64
CPUs: 32
Total Memory: 46.98GiB
Name: master
ID: -
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: -
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
WARNING: the devicemapper storage-driver is deprecated, and will be removed in a future release.
WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
Use --storage-opt dm.thinpooldev
to specify a custom block storage device.