Skip to content
This repository was archived by the owner on Jan 25, 2018. It is now read-only.
This repository was archived by the owner on Jan 25, 2018. It is now read-only.

docker cp causes umount/mount attempt that corrupts data #9

@untoldone

Description

@untoldone

If you mount a volume using this plugin and then try to use docker cp on a file within the container -- even if not from within the mounted volume, you get a message such as:

Error response from daemon: error while mounting volume '/mnt/temp-testing': VolumeDriver.Mount: mount failed, arguments: ["nsenter" "--mount=/rootfs/proc/1/ns/mnt" "--" "mount" "-t" "ext4" "-o" "discard,defaults" "/dev/disk/by-id/google-docker-volume-temp-testing" "/mnt/temp-testing"]
output: mount: /dev/sdb is already mounted or /mnt/temp-testing busy
       /dev/sdb is already mounted on /mnt/temp-testing

Once running docker cp on the container, you'll find the volume has been detached from the GCP instance but the container thinks the volume is still mounted. The forced removal has caused data loss and db corruption in my case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions