oswitch icon indicating copy to clipboard operation
oswitch copied to clipboard

/Volumes isn't mounted

Open yannickwurm opened this issue 10 years ago • 12 comments

(actually the directory doesn't even exist) on my mac - not visible in /mnt either.

yannickwurm avatar Jan 12 '15 13:01 yannickwurm

/Volumes is never mounted. Nor /Volumes/Macintosh HD. If you have anything else in /Volumes, it should be mounted under /Volumes in the container.

yeban avatar Jan 12 '15 14:01 yeban

I think /Volumes/Macintosh HD should be mounted - and non-conflicting root links to /Applications /Library etc should be added/included

On 12 Jan 2015, at 14:31, Anurag Priyam [email protected] wrote:

/Volumes is never mounted. Nor /Volumes/Macintosh HD. If you have anything else in /Volumes, it should be mounted under /Volumes in the container.

— Reply to this email directly or view it on GitHub.

yannickwurm avatar Jan 12 '15 15:01 yannickwurm

(my container didn't contain /Volumes)

yannickwurm avatar Jan 12 '15 15:01 yannickwurm

Why would you want access to /Applications or /Library in the container? I will have to check if root owned files / dirs can be mounted rw within container.

Did you have anything in /Volume (on host)?

yeban avatar Jan 12 '15 15:01 yeban

only Macintosh HD. I don't think /Applications or /Library need to be mounted with w. r is enough - to be able to read files that can be in strange places (e.g. from MacTex install?) ...

yannickwurm avatar Jan 12 '15 16:01 yannickwurm

I made the necessary changes in switch, but still unable to mount /Applications. Probably because boot2docker is getting in the way. Perhaps @bmpvieira can help.

yeban avatar Jan 13 '15 10:01 yeban

The underlying issue is that any directory that exists in / on host that does not conflict with a directory in client should be mounted in / on the client. (e.g. on our cluster such key directories include /data/ , /scratch/ and /gpfs)

yannickwurm avatar Jan 13 '15 10:01 yannickwurm

Test case is simple: docker run -it -v /Applications:/Applications. /Applications in the container comes up empty.

yeban avatar Jan 13 '15 11:01 yeban

It is indeed boot2docker getting in the way. On Mac, boot2docker is the real host, not OSX.

The workaround is as below, using /Applications dir as an example:

boot2docker down
VBoxManage sharedfolder remove boot2docker-vm --name Applications
VBoxManage sharedfolder add boot2docker-vm --name Applications --hostpath /Applications
boot2docker up
boot2docker ssh "sudo mkdir -p /Applications && sudo mount -t vboxsf -o uid=1000,gid=50 Applications /Applications"

Mounting /Applications in a docker container works now: docker run --rm -it -v /Applications:/Applications ubuntu:14.04 ls /Applications.

And so does switch: switch ubuntu:14.04 ls /Applications.

I'm not sure how to best incorporate the solution in switch. I will document this in the readme for now. Would be great if boot2docker dealt with this auto-magically.

yeban avatar Feb 17 '15 08:02 yeban

I think it is safe to suppose that boot2docker will solve this in the future.

yannickwurm avatar Feb 17 '15 08:02 yannickwurm

Does Docker's "machine" solves this? Should we switch from boot2docker to "machine" in the short term?

bmpvieira avatar Mar 04 '15 12:03 bmpvieira

docker-machine doesn't seem to solve this. Not automagically.

yeban avatar Nov 09 '15 10:11 yeban