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

failed to register layer: devmapper: Error mounting / Can't mount images #29798

Closed
nessor opened this Issue Dec 30, 2016 · 5 comments

Comments

Projects
None yet
7 participants
@nessor
Copy link

nessor commented Dec 30, 2016

Description Can't mount images

Can't mount any images in my docker installation

Steps to reproduce the issue:

  1. Install docker (like this)
  2. run "docker pull hello-world"
  3. get error:
    failed to register layer: devmapper: Error mounting '/dev/mapper/docker-8:2-1056594-844987568e879d45b4e5afbd4c102b6b75ff83d6f3cb8c0f22e083817658cdac' on '/var/lib/docker/devicemapper/mnt/844987568e879d45b4e5afbd4c102b6b75ff83d6f3cb8c0f22e083817658cdac': invalid argument

I've googled it, but haven't find any solution. I already tried to rm the /var/lib/docker folder, without any change.

Output of docker version:

florian@Mogli:~$ docker version
Client:
 Version:      1.12.5
 API version:  1.24
 Go version:   go1.6.4
 Git commit:   7392c3b
 Built:        Fri Dec 16 02:42:17 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.5
 API version:  1.24
 Go version:   go1.6.4
 Git commit:   7392c3b
 Built:        Fri Dec 16 02:42:17 2016
 OS/Arch:      linux/amd64

Output of docker info:

florian@Mogli:~$ docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 1.12.5
Storage Driver: devicemapper
 Pool Name: docker-8:2-1056594-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 10.94 MB
 Data Space Total: 107.4 GB
 Data Space Available: 16.9 GB
 Metadata Space Used: 581.6 kB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.147 GB
 Thin Pool Minimum Free Space: 10.74 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.110 (2015-10-30)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge overlay null host
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 3.14.32-xxxx-grs-ipv6-64
Operating System: Ubuntu 16.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.56 GiB
Name: Mogli
ID: EYBY:BUYL:7EYL:4O4H:E54Z:5YZB:E7SM:2IAP:WRWX:LJEU:A7W4:USNH
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No kernel memory limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
Insecure Registries:
 127.0.0.0/8

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

Has anybody an idea or a workaround for me?

@thaJeztah

This comment has been minimized.

Copy link
Member

thaJeztah commented Dec 30, 2016

First of all, I would not recommend running with devicemapper on Ubuntu; the default storage driver is aufs, and on modern (4.x) kernels, the overlay2 storage driver is a good choice.

It looks like the instructions on DigitalOcean are incomplete, and don't mention the requirements for aufs (see the official documentation here: https://docs.docker.com/engine/installation/linux/ubuntulinux/)

Devicemapper on loop back devices is especially discouraged (also see the warning that's output in docker info)

However, it looks like you are running on a non-standard installation with a kernel version that doesn't match with ubuntu 16.04; Ubuntu 16.04 ships with kernel 4.4 (https://wiki.ubuntu.com/XenialXerus/ReleaseNotes), but your systemd runs an old kernel version (3.14).

I highly suspect this is the reason things fail, so suggest to make sure to install the kernel version that's provided by Ubuntu, or contact your provider.

Given that we only support docker on official kernel versions, I'll close this issue, but happy to answer additional questions

@thaJeztah thaJeztah closed this Dec 30, 2016

@sdiaz

This comment has been minimized.

Copy link

sdiaz commented Mar 13, 2017

Some providers include a customized kernel on their machines, the Kernel listed by @nessor looks like the OVH provider uses with Ubuntu in their datacenters.

To update the OVH Kernel to the generic one just do the following

apt update
apt full-upgrade
apt install linux-image-generic
chmod -x /etc/grub.d/06_OVHkernel
update-grub
reboot

The new kernel version will be 4.4.0-66-generic:

Linux sdiaz 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Try now the docker run and enjoy

@gillesps

This comment has been minimized.

Copy link

gillesps commented Apr 1, 2017

Hello sdiaz.
I'm with OVH dedicated server on Ubuntu 16.04 and plesk installation.
What will be the impact of your recommandation to upgrade and my installation please ?
Thank you - Regards

@slemouillour-old

This comment has been minimized.

Copy link

slemouillour-old commented Apr 5, 2017

I tested the process of @sdiaz and it works.

@Amorem

This comment has been minimized.

Copy link

Amorem commented Apr 15, 2017

Thanks @sdiaz , it now works !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment