Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error starting daemon: error initializing graphdriver: devmapper: Device %device% is not a thin pool #21304

Open
jeekajoo opened this issue Mar 17, 2016 · 13 comments

Comments

Projects
None yet
@jeekajoo
Copy link

commented Mar 17, 2016

Output of docker version:

Client:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:38:58 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.10.3
 API version:  1.22
 Go version:   go1.5.3
 Git commit:   20f81dd
 Built:        Thu Mar 10 15:38:58 2016
 OS/Arch:      linux/amd64

Output of docker info:

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 1
Server Version: 1.10.3
Storage Driver: devicemapper
 Pool Name: docker-202:1-395536-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: /dev/mapper/docker-pool0
 Metadata file: /dev/mapper/docker-pool0
 Data Space Used: 186.7 MB
 Data Space Total: 48.31 GB
 Data Space Available: 48.13 GB
 Metadata Space Used: 1.683 MB
 Metadata Space Total: 17.05 GB
 Metadata Space Available: 17.04 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: true
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Library Version: 1.02.90 (2014-09-01)
Execution Driver: native-0.2
Logging Driver: json-file
Plugins: 
 Volume: local
 Network: bridge null host
Kernel Version: 3.16.0-4-amd64
Operating System: Debian GNU/Linux 8 (jessie)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.87 GiB
Name: ip-172-16-11-30
ID: SGIG:VTD2:5Z25:WIHP:3DQS:TS25:HK53:BFM5:FILA:PRZF:ZKLH:TKT7
WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

Additional environment details (AWS, VirtualBox, physical, etc.):

AWS EC2

Steps to reproduce the issue:

  1. Setup a lvm thin pool
PV=/dev/xvdf
VG=docker
LV=pool0

pvcreate $PV
vgcreate $VG $PV
lvcreate -y -l 5%VG -n $LV\meta $VG
lvcreate -y -l 90%VG -n $LV $VG
lvconvert -y --zero n --thinpool $VG/$LV --poolmetadata $VG/$LV\meta

lvs -a
  LV              VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  [lvol0_pmspare] docker ewi-------  2.50g                                                    
  pool0           docker twi-a-t--- 45.00g             0.00   0.01                            
  [pool0_tdata]   docker Twi-ao---- 45.00g                                                    
  [pool0_tmeta]   docker ewi-ao----  2.50g       

dmsetup status
docker-pool0-tpool: 0 94363648 thin-pool 0 94/654336 0/737216 - rw no_discard_passdown queue_if_no_space 
docker-pool0_tdata: 0 94363648 linear 
docker-pool0_tmeta: 0 5234688 linear 
docker-pool0: 0 94363648 linear 
  1. Try to run docker daemon with a devicemapper driver

Describe the results you received:

systemctl stop docker ; rm -rf /var/lib/docker ; /usr/bin/docker daemon --debug --storage-driver 'devicemapper' --storage-opt 'dm.thinpooldev=/dev/mapper/docker-pool0' --storage-opt 'dm.fs=xfs' --storage-opt 'dm.use_deferred_removal=true'
DEBU[0000] docker group found. gid: 999                 
DEBU[0000] Server created for HTTP on unix (/var/run/docker.sock) 
DEBU[0000] Using default logging driver json-file       
DEBU[0000] [graphdriver] trying provided driver "devicemapper" 
DEBU[0000] devicemapper: driver version is 4.27.0       
DEBU[0000] devmapper: Deferred removal support enabled. 
DEBU[0000] devmapper: Generated prefix: docker-202:1-395273 
DEBU[0000] devmapper: Checking for existence of the pool docker-pool0 
DEBU[0000] Cleaning up old shm/mqueue mounts: start.    
FATA[0000] Error starting daemon: error initializing graphdriver: devmapper: Device docker-pool0 is not a thin pool 

Describe the results you expected:

No fatal error.

Additional information you deem important (e.g. issue happens only occasionally):

Problem does not occur if you use deprecated options: dm.datadev and dm.metadatadev

systemctl stop docker ; rm -rf /var/lib/docker ; /usr/bin/docker daemon --debug --storage-driver 'devicemapper' --storage-opt 'dm.datadev=/dev/mapper/docker-pool0' --storage-opt 'dm.metadatadev=/dev/mapper/docker-pool0' --storage-opt 'dm.fs=xfs' --storage-opt 'dm.use_deferred_removal=true'
@doyshinda

This comment has been minimized.

Copy link

commented May 10, 2016

Try changing:
--storage-opt dm.thinpooldev=/dev/mapper/docker-pool0
to:
--storage-opt dm.thinpooldev=/dev/mapper/docker-pool0-tpool

@svvac

This comment has been minimized.

Copy link

commented May 13, 2016

Using the -tpool device works for me (debian jessie). Maybe this should be updated in the docs

@thaJeztah

This comment has been minimized.

Copy link
Member

commented May 13, 2016

@svvac some changes were made to the documentation recently, but perhaps you could check if there's incorrect information in there? https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/

The Markdown file used to generate that page can be found in this repository; https://github.com/docker/docker/blob/master/docs/userguide/storagedriver/device-mapper-driver.md

@lgibelli

This comment has been minimized.

Copy link

commented Jun 28, 2016

+1 I had the same problem, using the -tpool device works for me (debian jessie). Official docs are not updated yet.

@thaJeztah

This comment has been minimized.

Copy link
Member

commented Jun 28, 2016

@lgibelli would you be interested in opening a pull request to fix that part of the documentation if it's incorrect? Also note that for Jessie, you should be able to use aufs if you install the linux-image-extra packages

@lgibelli

This comment has been minimized.

Copy link

commented Jul 3, 2016

@thaJeztah I'd rather not use aufs, Device Mapper (https://docs.docker.com/engine/userguide/storagedriver/device-mapper-driver/) is the recommended storage driver for Docker.

I don't think this should be fixed in the documentation, using the -tpool device is just a workaround. It should be fixed in Docker. The documentation could mention this as a workaround.

@zim32

This comment has been minimized.

Copy link

commented Mar 4, 2017

Made all steps mentioned in documentation and got the same issue. What should I do to fix this?

@justincormack

This comment has been minimized.

Copy link
Contributor

commented Mar 4, 2017

@zim32

This comment has been minimized.

Copy link

commented Mar 4, 2017

After restart LVM dont want to activate again. So I updated to new kernel and overlay2. Spend whole day to realize devicemapper is bad (

@kolyshkin

This comment has been minimized.

Copy link
Contributor

commented Aug 14, 2017

After restart LVM dont want to activate again.

this might be caused by the missing thin_check binary. I have just came across the issue, and submitted a fix (58a453f)

@HaiNguyen007

This comment has been minimized.

Copy link

commented Sep 16, 2017

docker/docker.github.io#386 (rollback to error?)

@meeca1218

This comment has been minimized.

Copy link

commented Nov 13, 2017

Had no problem with docker 1.12 engine. But could not install docker-CE working.
dockerd: Error starting daemon: error initializing graphdriver: devmapper: Device docker-thinpool is not a thin pool
All thin pools (on other machines) work under older versions.
Besides, there is no docker-storage-setup anymore.
Anyone has used download CE and installed it successfully ? Thx.

@darkn3rd

This comment has been minimized.

Copy link

commented Aug 10, 2018

I am getting this with Docker version 18.03.1-ce, build 9ee9f40 on Gentoo Base System release 2.4.1

time="2018-08-09T19:11:16.996038033-07:00" level=error msg="Failed to built-in GetDriver graph btrfs /var/lib/docker"
time="2018-08-09T19:11:17.041047790-07:00" level=error msg="'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded."
time="2018-08-09T19:11:17.041094100-07:00" level=error msg="Failed to built-in GetDriver graph aufs /var/lib/docker"
time="2018-08-09T19:11:17.042036412-07:00" level=error msg="'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded."
Error starting daemon: error initializing graphdriver: devicemapper: Error running deviceCreate (CreatePool) dm_task_run failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.