containers / docker-lvm-plugin

Docker volume plugin for LVM volumes
GNU Lesser General Public License v3.0
155 stars 64 forks source link

volume is not mounted after the server failure #59

Open aston-r opened 5 years ago

aston-r commented 5 years ago

Hi,

$subj. I hoped the issue was fixed in https://github.com/projectatomic/docker-lvm-plugin/issues/24, but it is not

STR: -create volume;

# docker volume inspect jenkins_home
[
    {
        "CreatedAt": "0001-01-01T00:00:00Z",
        "Driver": "lvm",
        "Labels": {},
        "Mountpoint": "/var/lib/docker-lvm-plugin/jenkins_home",
        "Name": "jenkins_home",
        "Options": {
            "size": "5G"
        },
        "Scope": "local"
    }
]

-run a container and use the mentioned volume; -simulate the system crash(kernel panic, power failure) -start the server. Here is the lvmCountConfig.json:

# cat /var/lib/docker-lvm-plugin/lvmCountConfig.json
{"jenkins_home":1}

-start docker container;

Actual Result: -volume is not mounted.

To manually fix the issue I have to edit lvmCountConfig.json(change 1 to 0) and restart docker/docker-lvm-plugin services.

I manually build the docker-lvm-plugin from sources and I have a fix 20c4f2601bdea3a355bfb1b81d7ac71e49d9cecf.

It looks like the issue was fixed only for clean reboot, but not for a case when the server crashed due to some reason.