gce-docker icon indicating copy to clipboard operation
gce-docker copied to clipboard

mke2fs throws error

Open adamgoose opened this issue 7 years ago • 3 comments

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.

adamgoose avatar Feb 27 '17 21:02 adamgoose

Note, I'm on Ubuntu 14.04. It worked fine in CoreOS, however I can't really use CoreOS. :/

adamgoose avatar Mar 04 '17 06:03 adamgoose

Works in Ubuntu 16.04 as well.

adamgoose avatar Mar 04 '17 07:03 adamgoose

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).

gnitzan avatar Oct 09 '17 17:10 gnitzan