Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble mounting a volume #19

Closed
cajund opened this issue Jun 17, 2016 · 16 comments
Closed

Trouble mounting a volume #19

cajund opened this issue Jun 17, 2016 · 16 comments
Assignees
Labels

Comments

@cajund
Copy link

cajund commented Jun 17, 2016

Hi There,

We got your driver working out of the box on our Windows 8, VMWare Workstation 10.0.1 environment (which was awesome, BTW), but we are having trouble seeing our mounted volumes inside the container. The mount appears to be happening, but none of the files are appearing in the container FS.

Could this be an issues with VMWare Workstation and not your driver? When we inspect the image, the Mounts object is populated with our config, it's seems that the files simply aren't being shared.

Thanks for any help that you can provide.

@pecigonzalo
Copy link
Owner

@cajund Can you check mount and print the output here to verify the volumes are being mounted anywhere?
You could try mounting manually, to see if that works, and that could help us troubleshoot this.

Ref: https://pubs.vmware.com/workstation-9/index.jsp?topic=%2Fcom.vmware.ws.using.doc%2FGUID-AB5C80FE-9B8A-4899-8186-3DB8201B1758.html

Thanks!

@cajund
Copy link
Author

cajund commented Jun 19, 2016

Hi, and thanks for the quick reply.

The "Mounts" element from the inspect command looks like this:

"Mounts": [
    {
        "Source": "/c/Users/Jonny/Documents/work-repos/syntacthealthcare.com",
        "Destination": "/root/syntact/syntacthealthcare.com",
        "Mode": "",
        "RW": true,
        "Propagation": "rprivate"
    }
],

However, the mount command from the container looks like the attache image. Please note the "tmpfs" notation.

We will try the mounting manually as well.

Thanks again.

pasted_image_at_2016_06_19_03_22_pm

@pecigonzalo
Copy link
Owner

pecigonzalo commented Jun 20, 2016

@cajund Thanks for theoutput of the command, but im afraid i need the output from the docker host.
I need the mount information for the docker host, IE: the machine created by docker machine.

Could you ssh into the b2docker machine and check if the mounts are working there?

Could you also verify the path /c/Users/Jonny/Documents/work-repos/syntacthealthcare.comexists on the docker host?
I also notice your command is mounting on /Users/Jonny but the Mounts element from inspect points to /c/Users/Jonny.

PS: My windows machine is on repair right now, so i cant do more than help you troubleshoot from your endpoint.

@codemusket
Copy link

codemusket commented Jun 20, 2016

image

docker@default:$ sudo ls -l /c/Users/Jonny/Documents/work-repos/syntacthealthca
re.com
total 0
-rw-r--r-- 1 root root 0 Jun 19 19:31 ←[0;0mdocker←[0m
docker@default:
$

Well it seems the folders exist, just nothing there

also the command has been updated to reflect mounting to /c/Users/Jonny/Documents/work-repos/syntacthealthcare.com:/root/syntact/syntacthealtcare.com

@pecigonzalo pecigonzalo self-assigned this Jun 21, 2016
@pecigonzalo
Copy link
Owner

There doesn't seem to be any vmware->b2docker mount at that location.
As you can see on that screenshot the only mount is on /mnt/hgfs

This could be an issue with your setup, or an issue with the driver. Could you try mounting manually the share there doing:

[ -f /usr/local/bin/vmhgfs-fuse ] && sudo /usr/local/bin/vmhgfs-fuse -o allow_other .host:/Users /Users || sudo mount -t vmhgfs .host:/Users /Users

and then ls /Users

BTW, which version of the driver are you using?

@codemusket
Copy link

I think I downloaded v1 the latest, as is my usual.

Sorry, I'm new to this. Should I change my path from /Users to my full path?

image

@pecigonzalo
Copy link
Owner

Ok, seems like i know what the issue is, you b2docker is mounting /c/Users which does not contain anything, try using /Users instead as your mount directory.

The ability to use /c/Users will be added on the next release.

Try that and let me know how it goes.

PS: Please past text as using the code markdown format, its easier to read/search than screenshots.

@codemusket
Copy link

codemusket commented Jun 21, 2016

Here's the inspect mounts:

"Mounts": [
    {
        "Source": "/Users/Jonny/Documents/work-repos/syntacthealthcare.com",
        "Destination": "/root/syntact/syntacthealthcare.com",
        "Mode": "",
        "RW": true,
        "Propagation": "rprivate"
    }
],
C:\Windows\system32>docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
4b3d0b3fc260        syntact/db          "docker-entrypoint.sh"   3 minutes ago       Up 4 minutes        0.0.0.0:3306->3306/tcp   syntact_db

C:\Windows\system32>docker-machine ssh default
                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/
 _                 _   ____     _            _
| |__   ___   ___ | |_|___ \ __| | ___   ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__|   <  __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
Boot2Docker version 1.11.2, build HEAD : a6645c3 - Wed Jun  1 22:59:51 UTC 2016
Docker version 1.11.2, build b9f10c9
docker@default:~$ mount
tmpfs on / type tmpfs (rw,relatime,size=917800k)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /mnt/sda1 type ext4 (rw,relatime,data=ordered)
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,relatime,net_cls)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,relatime,net_prio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,relatime,hugetlb)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,relatime,pids)
vmhgfs-fuse on /mnt/hgfs type fuse.vmhgfs-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
/dev/sda1 on /mnt/sda1/var/lib/docker/aufs type ext4 (rw,relatime,data=ordered)
none on /mnt/sda1/var/lib/docker/aufs/mnt/fc7882a3692cda13c52a0bd1184a3bab41601ccdaebf0accc844afd242f6c50a type aufs (rw,relatime,si=609570c45f2800e5,
dio,dirperm1)
shm on /mnt/sda1/var/lib/docker/containers/4b3d0b3fc260a619c5b39e417eeaa16d742e6bde92b8bb155577c3264c23e01e/shm type tmpfs (rw,nosuid,nodev,noexec,rel
atime,size=65536k)
nsfs on /var/run/docker/netns/3f4c05d836ad type nsfs (rw)
docker@default:~$ ←[J
docker@default:~$ [ -f /usr/local/bin/vmhgfs-fuse ] && sudo /usr/local/bin/vmhgf
s-fuse -o allow_other .host:/Users /Users || sudo mount -t vmhgfs .host:/Users /
Users
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
Error: cannot mount filesystem: No such device
mount: mounting .host:/Users on /Users failed: No such device

Also, I'm getting this on docker ps

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
4b3d0b3fc260        syntact/db          "docker-entrypoint.sh"   3 minutes ago       Up 4 minutes        0.0.0.0:3306->3306/tcp   syntact_db

No ip, not showing the web container

@pecigonzalo
Copy link
Owner

The output says mountpoint is not empty did you check /Users to see if the user folders are present?

@codemusket
Copy link

Ok, so yes this time the whole /Users.../work-repos/.. file folder path exists! But there are no files in the last folder, but on my machine their are.

@pecigonzalo
Copy link
Owner

pecigonzalo commented Jun 22, 2016

Maybe there is a permissions issue ? If the folder and subfolders exist (we only mount to C:\Users to /Users ), there might be a VMWare issue and not something related to the driver.
Regarding the paths, im working on making that more flexible, it should be done soon.

@codemusket
Copy link

 _                 _   ____     _            _
| |__   ___   ___ | |_|___ \ __| | ___   ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__|   <  __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
Boot2Docker version 1.11.2, build HEAD : a6645c3 - Wed Jun  1 22:59:51 UTC 2016
Docker version 1.11.2, build b9f10c9
docker@default:~$ ls /Users
Jonny/
docker@default:~$ cd Jonny/
-sh: cd: can't cd to Jonny/
docker@default:~$ ls
boot2docker, this is vmware speaking
docker@default:~$ cd Jonny
-sh: cd: can't cd to Jonny
docker@default:~$ ls
boot2docker, this is vmware speaking
docker@default:~$ cd /Users/Jonny
docker@default:/Users/Jonny$ ls
Documents/
docker@default:/Users/Jonny$ cd Documents
docker@default:/Users/Jonny/Documents$ ls
work-repos/
docker@default:/Users/Jonny/Documents$ cd work-repos
docker@default:/Users/Jonny/Documents/work-repos$ ls
syntacthealthcare.com/
docker@default:/Users/Jonny/Documents/work-repos$ cd syntacthealthcare.com
docker@default:/Users/Jonny/Documents/work-repos/syntacthealthcare.com$ ls
docker@default:/Users/Jonny/Documents/work-repos/syntacthealthcare.com$ ls -l
total 0
docker@default:/Users/Jonny/Documents/work-repos/syntacthealthcare.com$ [ -f /usr/local/bin/vmhgfs-fuse ] && sudo /usr/local/bin/vmhgfs-fuse -o allow_

other .host:/Users /Users || sudo mount -t vmhgfs .host:/Users /Users
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
Error: cannot mount filesystem: No such device
mount: mounting .host:/Users on /Users failed: No such device
docker@default:/Users/Jonny/Documents/work-repos/syntacthealthcare.com$ mount
tmpfs on / type tmpfs (rw,relatime,size=917800k)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /mnt/sda1 type ext4 (rw,relatime,data=ordered)
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,relatime,net_cls)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,relatime,net_prio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,relatime,hugetlb)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,relatime,pids)
vmhgfs-fuse on /mnt/hgfs type fuse.vmhgfs-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
/dev/sda1 on /mnt/sda1/var/lib/docker/aufs type ext4 (rw,relatime,data=ordered)
none on /mnt/sda1/var/lib/docker/aufs/mnt/fc7882a3692cda13c52a0bd1184a3bab41601ccdaebf0accc844afd242f6c50a type aufs (rw,relatime,si=609570c45f2800e5,
dio,dirperm1)
shm on /mnt/sda1/var/lib/docker/containers/4b3d0b3fc260a619c5b39e417eeaa16d742e6bde92b8bb155577c3264c23e01e/shm type tmpfs (rw,nosuid,nodev,noexec,rel
atime,size=65536k)
nsfs on /var/run/docker/netns/3f4c05d836ad type nsfs (rw)
docker@default:/Users/Jonny/Documents/work-repos/syntacthealthcare.com$ cd  /mnt/sda1/var/lib/docker/containers/4b3d0b3fc260a619c5b39e417eeaa16d742e6b

de92b8bb155577c3264c23e01e/shm
-sh: cd: can't cd to /mnt/sda1/var/lib/docker/containers/4b3d0b3fc260a619c5b39e417eeaa16d742e6bde92b8bb155577c3264c23e01e/shm
docker@default:/Users/Jonny/Documents/work-repos/syntacthealthcare.com$ cd ~
docker@default:~$ ls
boot2docker, this is vmware speaking
docker@default:~$ cd ~/mnt
-sh: cd: can't cd to /home/docker/mnt
docker@default:~$ cd ~
docker@default:~$ ls
boot2docker, this is vmware speaking
docker@default:~$ ls -l
total 4
----------    1 docker   staff           36 Jan  1  1970 boot2docker, this is vmware speaking
docker@default:~$ cd staff
-sh: cd: can't cd to staff
docker@default:~$ cd docker
-sh: cd: can't cd to docker
docker@default:~$ cd /Users
docker@default:/Users$ ls
Jonny/
docker@default:/Users$ cd ../
docker@default:/$ cd /mnt
docker@default:/mnt$ ls
fd0/  hgfs/ sda1/ sr0/
docker@default:/mnt$ cd sda1/var/lib/docker/containers/4b3d0b3fc260a619c5b39e417eeaa16d742e6bde92b8bb155577c3264c23e01e/shm
-sh: cd: can't cd to sda1/var/lib/docker/containers/4b3d0b3fc260a619c5b39e417eeaa16d742e6bde92b8bb155577c3264c23e01e/shm
docker@default:/mnt$ ls
fd0/  hgfs/ sda1/ sr0/
docker@default:/mnt$ cd sda1
docker@default:/mnt/sda1$ ls
lost+found/ tmp/        var/
docker@default:/mnt/sda1$ cd var
docker@default:/mnt/sda1/var$ ls
lib/
docker@default:/mnt/sda1/var$ cd lib
docker@default:/mnt/sda1/var/lib$ ls
boot2docker/ docker/
docker@default:/mnt/sda1/var/lib$ cd docker
docker@default:/mnt/sda1/var/lib/docker$ ls
ls: can't open '.': Permission denied
docker@default:/mnt/sda1/var/lib/docker$ sudo ls
aufs        containers  image       network     tmp         trust       volumes
docker@default:/mnt/sda1/var/lib/docker$ ls
ls: can't open '.': Permission denied
docker@default:/mnt/sda1/var/lib/docker$ ls
ls: can't open '.': Permission denied
docker@default:/mnt/sda1/var/lib/docker$ sudo ls
aufs        containers  image       network     tmp         trust       volumes
docker@default:/mnt/sda1/var/lib/docker$ sudo ls containers
10633223519f22177be286a817c2be0d8412621e7fc27e04cd413734c554c52d  4b3d0b3fc260a619c5b39e417eeaa16d742e6bde92b8bb155577c3264c23e01e
docker@default:/mnt/sda1/var/lib/docker$ sudo cd containers/4b3d0b3fc260a619c5b39e417eeaa16d742e6bde92b8bb155577c3264c23e01e/shm
sudo: cd: command not found
docker@default:/mnt/sda1/var/lib/docker$ sudo ls containers/4b3d0b3fc260a619c5b39e417eeaa16d742e6bde92b8bb155577c3264c23e01e/shm
docker@default:/mnt/sda1/var/lib/docker$ sudo ls-l  containers/4b3d0b3fc260a619c5b39e417eeaa16d742e6bde92b8bb155577c3264c23e01e/shm
sudo: ls-l: command not found
docker@default:/mnt/sda1/var/lib/docker$ sudo ls -l  containers/4b3d0b3fc260a619c5b39e417eeaa16d742e6bde92b8bb155577c3264c23e01e/shm
total 0
docker@default:/mnt/sda1/var/lib/docker$ sudo [ -f /usr/local/bin/vmhgfs-fuse ] && sudo /usr/local/bin/vmhgfs-fuse -o allow_other .host:/Users /Users

|| sudo mount -t vmhgfs .host:/Users /Users
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
Error: cannot mount filesystem: No such device
mount: mounting .host:/Users on /Users failed: No such device
docker@default:/mnt/sda1/var/lib/docker$

Well permissions did seem to play a role, I could only see some of the files after using sudo..

@pecigonzalo
Copy link
Owner

No, im talking windows permissions, on the mounted folder you are trying to access.

The driver will try to mount c:\Users under /Users on the boot to docker vm. So if you are seeing a Jonny folder, that folder is being displayed because the mount did work. Now you dont seem to see any files on it. I would check your folder permissions and for any VMWare issues.

You could try manually modifying the mount on the VM to another location and checking if that works.

I think you are getting mixed-up between the HOST(your computer), the VM(The boot2docker), the container (whatever Docker container you are running)

Thanks.

@cajund
Copy link
Author

cajund commented Jul 5, 2016

@pecigonzalo, we worked around this issue on our end and moved back to VBox as a result of an OS upgrade on our end. Closing this so it's no longer on your radar. Thanks for your help!

@cajund cajund closed this as completed Jul 5, 2016
@JettJones
Copy link

I'm similarly seeing the docker host coming up without the /c/Users/ file share.
I'm running
vmware workstation 12.1.1 build-3770994
docker-machine 0.7.0 and docker 1.11.1 on
Windows 10 Pro.

On the docker host VM, I only see one vmhgfs mount:

$ mount | grep vm
vmhgfs-fuse on /mnt/hgfs type fuse.vmhgfs-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)

This immediately after running docker-machine create --driver vmwareworkstation. On a previous attempt I created a container with a volume mount /c/Users/Jett:/testtest. It looks like that step can create the /c/Users/... path in the boot2docker VM.

Anyway - I can try digging into the debug output from re-running docker-machine provision or docker-machine create. If there are other details that could help debug, let me know.

Thanks

@JettJones
Copy link

Oops, streams crossed and now I'm commenting on a closed bug - I can take my issues to a new bug if that's easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants