gce-docker
gce-docker copied to clipboard
mke2fs throws error
Running the docker volume create
command works fine, and I see the disk in my GCP Console. However, once I try to use the volume, I get the following error:
root@rancher-hosts-0n4k:/dev/disk/by-id# docker run -it -v volume-test:/foobar --volume-driver=gce ubuntu:14.04
docker: Error response from daemon: VolumeDriver.Mount: mkfs.ext4 failed, arguments: ["nsenter" "--mount=/rootfs/proc/1/ns/mnt" "--" "mkfs.ext4" "/dev/disk/by-id/google-docker-volume-volume-test"]
output: mke2fs 1.42.9 (4-Feb-2014)
/dev/disk/by-id/google-docker-volume-volume-test is entire device, not just one partition!
Proceed anyway? (y,n).
The prompt is not interactive, both with and without the -d
docker run flag.
Note, I'm on Ubuntu 14.04. It worked fine in CoreOS, however I can't really use CoreOS. :/
Works in Ubuntu 16.04 as well.
got the same issue on my host - CentOS 7. Not sure if I did something wrong, however got the same issue.
installed gce driver
docker run -d --restart=always -v /:/rootfs -v /run/docker/plugins:/run/docker/plugins -v /var/run/docker.sock:/var/run/docker.sock --privileged mcuadros/gce-docker
Steps to reproduce
docker volume create --driver=gce --name registry -o SizeGb=500 registry docker run -d -p 5000:5000 --restart=always --name registry --mount type=volume,volume-driver=gce,src=registry,target=/var/lib/registry registry b07ca7688f74a6eac6e0d272d74cd8da4c140d8bdb578472a543c1df2ce7191d
docker: Error response from daemon: error while mounting volume '/mnt/registry': VolumeDriver.Mount: mkfs.ext4 failed, arguments: ["nsenter" "--mount=/rootfs/proc/1/ns/mnt" "--" "mkfs.ext4" "/dev/disk/by-id/google-docker-volume-registry"] output: mke2fs 1.42.9 (28-Dec-2013)
/dev/disk/by-id/google-docker-volume-registry is entire device, not just one partition!
Proceed anyway? (y,n).