moby: [1.6.0][graphdriver] prior storage driver "devicemapper" failed: error intializing graphdriver
Hi,
Running Docker 1.6.0
on Slackware 14.1 (kernel-3.18.11-x86_64) local machine:
$ uname -a
Linux infoslack 3.18.11 #2 SMP Tue Apr 7 13:09:53 CDT 2015 x86_64 Intel(R) Core(TM) i5-3317U CPU @ 1.70GHz GenuineIntel GNU/Linux
$ docker version
Client version: 1.6.0
Client API version: 1.18
Go version (client): go1.4.2
Git commit (client): 4749651
OS/Arch (client): linux/amd64
Server version: 1.6.0
Server API version: 1.18
Go version (server): go1.4.2
Git commit (server): 4749651
OS/Arch (server): linux/amd64
$ docker -D info
Containers: 7
Images: 29
Storage Driver: overlay
Backing Filesystem: extfs
Execution Driver: native-0.2
Kernel Version: 3.18.11
Operating System: Slackware 14.1
CPUs: 4
Total Memory: 7.686 GiB
Name: infoslack
ID: 7V7Y:YELO:XDMW:IF3R:DEDK:C5FA:HSIH:HOFW:LKCH:NEVD:6SQB:JWPH
Debug mode (server): true
Debug mode (client): true
Fds: 10
Goroutines: 15
System Time: Tue May 5 21:04:10 BRT 2015
EventsListeners: 0
Init SHA1: 78411382de1b3838ed8f519e914ea9dc8c1053c4
Init Path: /usr/libexec/docker/dockerinit
Docker Root Dir: /var/lib/docker
Username: infoslack
Registry: [https://index.docker.io/v1/]
$ docker -d -D
DEBU[0000] waiting for daemon to initialize
DEBU[0000] libdevmapper(6): ioctl/libdm-iface.c:1795 (4) dm version OF [16384] (*1)
DEBU[0000] libdevmapper(6): ioctl/libdm-iface.c:1795 (4) dm version OF [16384] (*1)
DEBU[0000] devicemapper: udev sync support: true
DEBU[0000] Generated prefix: docker-252:2-3147207
DEBU[0000] Checking for existence of the pool 'docker-252:2-3147207-pool'
DEBU[0000] libdevmapper(6): ioctl/libdm-iface.c:1795 (4) dm info docker-252:2-3147207-pool OF [16384] (*1)
DEBU[0000] Pool doesn't exist. Creating it.
DEBU[0000] libdevmapper(6): libdm-common.c:2304 (4) Udev cookie 0xd4d6876 (semid 1441792) created
DEBU[0000] libdevmapper(6): libdm-common.c:2324 (4) Udev cookie 0xd4d6876 (semid 1441792) incremented to 1
DEBU[0000] libdevmapper(6): libdm-common.c:2196 (4) Udev cookie 0xd4d6876 (semid 1441792) incremented to 2
DEBU[0000] libdevmapper(6): libdm-common.c:2446 (4) Udev cookie 0xd4d6876 (semid 1441792) assigned to CREATE task(0) with flags DISABLE_SUBSYSTEM_RULES DISABLE_DISK_RULES DISABLE_OTHER_RULES (0xe)
DEBU[0000] libdevmapper(6): ioctl/libdm-iface.c:1795 (4) dm create docker-252:2-3147207-pool OF [16384] (*1)
DEBU[0000] libdevmapper(6): ioctl/libdm-iface.c:1795 (4) dm reload docker-252:2-3147207-pool OF [16384] (*1)
DEBU[0000] libdevmapper(3): ioctl/libdm-iface.c:1813 (-1) device-mapper: reload ioctl on docker-252:2-3147207-pool failed: Invalid argument
DEBU[0000] libdevmapper(6): ioctl/libdm-iface.c:1401 (0) <backtrace>
DEBU[0000] libdevmapper(6): libdm-common.c:2231 (4) Udev cookie 0xd4d6876 (semid 1441792) decremented to 1
DEBU[0000] libdevmapper(6): libdm-common.c:2196 (4) Udev cookie 0xd4d6876 (semid 1441792) incremented to 2
DEBU[0000] libdevmapper(6): libdm-common.c:2446 (4) Udev cookie 0xd4d6876 (semid 1441792) assigned to REMOVE task(2) with flags DISABLE_SUBSYSTEM_RULES DISABLE_DISK_RULES DISABLE_OTHER_RULES (0xe)
DEBU[0000] libdevmapper(6): ioctl/libdm-iface.c:1795 (4) dm remove docker-252:2-3147207-pool OF [16384] (*1)
DEBU[0000] libdevmapper(6): libdm-common.c:1396 (4) docker-252:2-3147207-pool: Stacking NODE_DEL [verify_udev]
DEBU[0000] libdevmapper(6): libdm-common.c:2231 (4) Udev cookie 0xd4d6876 (semid 1441792) decremented to 0
DEBU[0000] libdevmapper(6): libdm-common.c:2496 (4) Udev cookie 0xd4d6876 (semid 1441792) waiting for zero
DEBU[0000] libdevmapper(6): libdm-common.c:2246 (4) Udev cookie 0xd4d6876 (semid 1441792) destroyed
DEBU[0000] libdevmapper(6): libdm-common.c:1396 (4) docker-252:2-3147207-pool: Processing NODE_DEL [verify_udev]
INFO[0000] +job serveapi(unix:///var/run/docker.sock)
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
DEBU[0000] Registering GET, /containers/ps
DEBU[0000] Registering GET, /containers/json
DEBU[0000] Registering GET, /containers/{name:.*}/json
DEBU[0000] Registering GET, /version
DEBU[0000] Registering GET, /images/json
DEBU[0000] Registering GET, /images/viz
DEBU[0000] Registering GET, /images/{name:.*}/get
DEBU[0000] Registering GET, /images/{name:.*}/history
DEBU[0000] Registering GET, /containers/{name:.*}/top
DEBU[0000] Registering GET, /info
DEBU[0000] Registering GET, /images/{name:.*}/json
DEBU[0000] Registering GET, /containers/{name:.*}/stats
DEBU[0000] Registering GET, /containers/{name:.*}/export
DEBU[0000] Registering GET, /containers/{name:.*}/logs
DEBU[0000] Registering GET, /exec/{id:.*}/json
DEBU[0000] Registering GET, /containers/{name:.*}/attach/ws
DEBU[0000] Registering GET, /_ping
DEBU[0000] Registering GET, /events
DEBU[0000] Registering GET, /images/search
DEBU[0000] Registering GET, /images/get
DEBU[0000] Registering GET, /containers/{name:.*}/changes
DEBU[0000] Registering POST, /containers/{name:.*}/start
DEBU[0000] Registering POST, /containers/{name:.*}/rename
DEBU[0000] Registering POST, /images/create
DEBU[0000] Registering POST, /images/load
DEBU[0000] Registering POST, /images/{name:.*}/tag
DEBU[0000] Registering POST, /containers/{name:.*}/kill
DEBU[0000] Registering POST, /containers/{name:.*}/copy
DEBU[0000] Registering POST, /exec/{name:.*}/resize
DEBU[0000] Registering POST, /build
DEBU[0000] Registering POST, /images/{name:.*}/push
DEBU[0000] Registering POST, /containers/{name:.*}/unpause
DEBU[0000] Registering POST, /containers/{name:.*}/restart
DEBU[0000] Registering POST, /exec/{name:.*}/start
DEBU[0000] Registering POST, /auth
DEBU[0000] Registering POST, /containers/{name:.*}/pause
DEBU[0000] Registering POST, /containers/{name:.*}/stop
DEBU[0000] Registering POST, /containers/{name:.*}/exec
DEBU[0000] Registering POST, /containers/{name:.*}/attach
DEBU[0000] Registering POST, /commit
DEBU[0000] Registering POST, /containers/create
DEBU[0000] Registering POST, /containers/{name:.*}/wait
DEBU[0000] Registering POST, /containers/{name:.*}/resize
DEBU[0000] Registering DELETE, /containers/{name:.*}
DEBU[0000] Registering DELETE, /images/{name:.*}
DEBU[0000] Registering OPTIONS,
DEBU[0000] docker group found. gid: 281
FATA[0000] Shutting down daemon due to errors: error intializing graphdriver: Error running DeviceCreate (CreatePool) dm_task_run failed
But when using the overlay driver works:
$ docker -d -s overlay -D
...
INFO[0000] -job init_networkdriver() = OK (0)
DEBU[0000] Restarting containers...
INFO[0000] docker daemon: 1.6.0 4749651; execdriver: native-0.2; graphdriver: overlay
INFO[0000] +job acceptconnections()
INFO[0000] -job acceptconnections() = OK (0)
INFO[0000] Daemon has completed initialization
What am I forgetting?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 18 (5 by maintainers)
Hi! If you are reporting a new issue, PLEASE make sure that does not have any duplicates already open.
We would like to take this time to remind you of the information we need to debug the problem you are seeing. This is an automated response so if this ticket is not about a bug, do not fret.
If you fail to provide this information within 7 days, we will close this because we cannot debug your issue. We can reopen whenever the information is provided.
Thank you.
Please see: https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues
#ENEEDMOREINFO
The issue is closed but I might as well post my findings here. The underlying problem is the
devicemapper
storage driver that gets into an inconsistent state which was pretty much every time we ran Docker-in-Docker setup on Ubuntu hosts.The fix (using overlayfs storage driver):
sudo systemctl stop docker.service
devicemapper
data - this is easiest withrm -rf /var/lib/docker/*
overlayroot
from apt-get which will get you that kernel module/etc/modules-load.d/overlayfs.conf
withoverlay
as the content so that it loads on bootsudo modprobe overlay
to load the module for your current session if you won’t restart the machine.-s overlay
toDOCKER_OPTS
in/etc/default/docker
to force overlayfs to be used instead ofdevicemapper
/aufs
/etc.sudo systemctl restart docker.service
I managed to resolve this on my side by deleting /var/lib/docker and restarting the docker service. I’m really not sure what caused it and it may be due to packaging issue in my case. Reference.
Note: Removing /var/lib/docker will delete all your downloaded images!
Can data in /var/lib/docker be recovered?
sorry to bump a closed issue, but i has having a similar issue:
docker[8237]: time="2015-06-19T10:17:36-04:00" level=fatal msg="Shutting down daemon due to errors: error intializing graphdriver: invalid character '\\x00' looking for beginning of value"
and removing
/var/lib/docker
and restarting the service fixed this issue as well. thanx @petarov !