for-linux icon indicating copy to clipboard operation
for-linux copied to clipboard

failed to register layer: devicemapper: Error running deviceCreate (createSnapDevice) dm_task_run failed

Open stefjoosten opened this issue 8 years ago • 7 comments

Expected behavior

I am running a docker installation. On one Linux server (called Wolfram) it works. I would expect it to work on another Linux server as well. However on server lnx-hrl-148v it does NOT work.

Actual behavior

After downloading part of the required images, building fails with the message "failed to register layer: devicemapper: Error running deviceCreate (createSnapDevice) dm_task_run failed". Is there anyone who can explain this?

I have no clue as to what is wrong here. I have checked that the disk space is sufficient. The amount of memory in both machines is the same.

Information

The installation works on machine Wolfram

Kernel Version: 4.11.6-coreos-r1
Operating System: Container Linux by CoreOS 1409.5.0 (Ladybug)
Architecture: x86_64
CPUs: 2
Total Memory: 13.7 GiB

The docker client and server on Wolfram have identical versions:

 Version:      1.12.6
 API version:  1.24
 Go version:   go1.7.5
 Git commit:   a82d35e
 Built:        Mon Jun 19 23:04:34 2017
 OS/Arch:      linux/amd64

The installation fails on lnx-hrl-148v, which has the following specs:

Kernel Version: 4.4.59-92.17-default
Operating System: SUSE Linux Enterprise Server 12 SP2
Architecture: x86_64
CPUs: 2
Total Memory: 13.7 GiB

Both the client and the server on lnx-hrl-148v have the same version:

 Version:      1.12.6
 API version:  1.24
 Go version:   go1.6.1
 Git commit:   78d1802
 Built:        Wed Feb 15 15:00:28 2017
 OS/Arch:      linux/amd64

The docker files I used for installation can be found on https://github.com/AmpersandTarski/docker-ampersand.

Steps to reproduce the behavior

Using a bash CLI through putty (an SSH-client) on server lnx-hrl-148v I did:

  1. git clone https://github.com/AmpersandTarski/docker-ampersand/ /home/$(whoami)/docker-ampersand
  2. cd ~/docker-ampersand
  3. docker build -t ampersand:latest ampersand

This yielded:

Sending build context to Docker daemon 4.096 kB
Step 1 : FROM php:7-apache
7-apache: Pulling from library/php
9f0706ba7422: Extracting 52.61 MB/52.61 MB
4c407763908f: Download complete
82e2bc3a45c1: Download complete
c84e1013aed1: Download complete
a3b5e03d7e24: Download complete
917f836a88be: Download complete
b2dc54431819: Download complete
a60b574790b8: Download complete
6edd671e0b38: Download complete
a38554bba508: Download complete
7e6554e0e058: Download complete
3548be1f1016: Download complete
5ee1a52c53c7: Download complete
failed to register layer: devicemapper: Error running deviceCreate (createSnapDevice) dm_task_run failed

stefjoosten avatar Jun 28 '17 13:06 stefjoosten

In my case I fixed it with this way, the metadata file was broken because it reached the limit of the hard disk and the file was corrupted Fix it with the following steps: ∘ systemctl stop docker ∘ thin_check --clear-needs-check-flag /var/lib/docker/devicemapper/devicemapper/metadata ∘ thin_check /var/lib/docker/devicemapper/devicemapper/metadata ∘ systemctl start docker

You can find more information at: https://bodhileafy.wordpress.com/2018/04/20/docker-error-running-devicecreate-createsnapdevice-dm_task_run-failed/

omar7c1 avatar Feb 10 '20 04:02 omar7c1

I have same error message, but while executing the docker pull command.

OS: AntiX, based on Debian (codename: Bookworm)

mdziczkowski avatar Jun 06 '24 17:06 mdziczkowski

@mdziczkowski Hello,

I am also getting same, have you resolved it ?

rajat709 avatar Oct 03 '24 12:10 rajat709

@mdziczkowski Hello,

I am also getting same, have you resolved it ?

Did you try the solution from https://github.com/docker/for-linux/issues/46#issuecomment-583949616? I had the same problem because my disk was full, the solution above solved the problem

cahya-wirawan avatar Oct 09 '24 14:10 cahya-wirawan

Hi @cahya-wirawan,

Which Docker version are you using? Unfortunately, it's not working for my case.

rajat709 avatar Oct 09 '24 16:10 rajat709

The version of my server docker engine is 19.03.12

cahya-wirawan avatar Oct 10 '24 08:10 cahya-wirawan