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.

  • What is the difference of docker and docker.io in ubuntu apt repository?
  • Docker Differentiate multiple containers log folder at same host machine
  • Upgrade docker-compose to version 3
  • Jenkins Dockerfile - unable to prepare context: unable to evaluate symlinks in Dockerfile
  • Boot2Docker mount host volume to externalize data using Windows
  • OSX docker build error Command not found: -t
  • 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?

  • debugging containerised python web app
  • Multiple dockerfiles in one docker or multiple images from one dockerfile
  • Docker is not adding a network shared folder as a data volume
  • How to run Apache Spark 2.1 Driver Program in docker container with bridge mode
  • Should I create a volume for project files when using Docker with git?
  • Dockerfile replicate the host user UID and GID to the image
  • 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.