Skip to content

devicemapper: Verify base device UUID upon startup #13894

Closed

Description

@rhvgoyal

There are so many easy ways that docker device mapper metadata and actual thin pool can get out of sync due to configuration errors. In that case we often hear the problem that image and containers are not in the pool or are missing etc. I think lot of these errors are due to configuration issues.

Users created one type of pool, did some IO. Later something changed and a new pool was setup or user switched to LVM thin pool without cleaning up metadata which was valid only for old pool.

So to detect these kind of issues, query and save the UUID of base image and during startup make sure saved UUID matches the one in the pool. If not, flag error and docker startup will fail.

This should detect lot of configuration issues pretty early.

Activity

  1. added
    kind/enhancement
    on Jun 11, 2015
  2. rhvgoyal commented on Jun 17, 2015

    @rhvgoyal
    ContributorAuthor

    @vbatts

    This is merged now. So this issue can be closed, I think.

  3. shakisha commented on Aug 20, 2015

    @shakisha

    This was a very worst idea.
    Actually i can't start Docker because of an lvm resize, and there is not a way to disable this functionality or to reinizialize the udid

  4. rhvgoyal commented on Aug 20, 2015

    @rhvgoyal
    ContributorAuthor

    @kawa636r

    Can you give more details about how did you resize lvm thin pool. Resizing should not break it down. Pool continues to be same just that it is bigger now.

  5. shakisha commented on Aug 20, 2015

    @shakisha

    Hi Vivek, i've opened an issue here : #15721

  6. anaderi commented on Oct 31, 2015

    @anaderi

    I got stuck with similar symptoms after running container hit disk limit.
    Managed to fix it by

    blkdeactivate /dev/mapper/docker-252:1-50331783-pool
    blkdeactivate /dev/loop0
    

    and then starting docker again (docker-engine-1.8.3-1.el7.centos.x86_64)

  7. LK4D4 commented on Nov 1, 2015

    @LK4D4
    Contributor

    @anaderi Better to open new issue or continue in #15721

  8. jonseymour commented on Jun 3, 2016

    @jonseymour

    I had a scenario where I needed to import an existing docker vg into different Azure VM and the Base UUID of the data LV appeared to be different to its original value in the original VM. AFAIK there was no other LVM related configuration that could explain this - just the need to move the VG between two Azure VMs.

    Note that I am not 100% sure that the UUID check failed because I moved the vg between VMs - there may be another explanation, but I thought I would not it hear just in case others come across the same issue with Azure VMs.

    update: I wasn't able to replicate a change in UUID when a disk containing a VG was imported into different VM. My workaround for the moment is to use the default storage driver.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/storage/devicemapperkind/enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions