Shared Docker devicemapper lvm thinpool in a multiboot setup

I’m developing using Docker on a multiboot setup under both Fedora and Ubuntu on my laptop. I need this to rule out issues with selinux and/or apparmor so my build will work for both red hat(and friends) and debian(and friends).

I’m using devicemapper in thin pool lvm configuration as storage backend. This was configured using docker-storage-setup tool under Fedora.

  • Atomic OS/Core OS for large scale Mesos cluster?
  • Proxy_pass from foo.website.com to localhost:xxxx using nginx on docker - not localhost on physical machine
  • How do I change the umask of a shared docker volume?
  • How to get mac host IP address from a docker container?
  • Jenkins: pass (environment) variable to Docker while building the image
  • Amazon container registry login
  • I would like to share my docker images and containers to both Fedora (/ is formatted as ext4fs on lvm) and Ubuntu environments (/ is formatted as btrfs also on lvm) to save space.

    However after one Docker system has started and taken over the docker thinpool, the other Docker system could not use the same docker thinpool.

    This is the error:

    Error starting daemon: error initializing graphdriver: devmapper: Unable to take ownership of thin-pool ("my docker thin pool") that already has used data blocks
    

    Based on that it seems to have this limitation by design. In that case would anyone elaborate on my particular use case and is there another way to share my docker devicemapper thin pool with several linux systems so I can save space and not have duplicate images/containers?

  • How to use VSTS Build/Release to continuously integrate/deploy Docker containers to Azure Service Fabric?
  • Docker : Change open Jdk to oracle Jdk in Jenkins image
  • Docker Compose how to extend service with build to use an image instead
  • How to restart shiny server in Docker container?
  • docker run container, how to rerun
  • Docker volumes MariaDB Windows
  • One Solution collect form web for “Shared Docker devicemapper lvm thinpool in a multiboot setup”

    In a bug report Eric Paris says:

    IF you are using device mapper (instead of loopback) /var/lib/docker contains metadata informing docker about the contents of the device mapper storage area. If you delete /var/lib/docker that metadata is lost. Docker is then able to detect that the thin pool has data but docker is unable to make use of that information. The only solution is to delete the thin pool and recreate it so that both the thin pool and the metadata in /var/lib/docker will be empty.

    So syncing parts of /var/lib/docker may be a solution.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.