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
Mount Denied #47
Comments
@ukchucktown please also include the actual error message. |
Not much of an error, only mount denied. ERROR: for applications Cannot start service applications: Mounts denied: r more info. |
I cannot help without the context surrounding this error. |
I realize that might be the exact error, but without more information of some sort there is literally nothing I can do. |
What more can I provide you? I'm more than willing to debug it. |
Can you please provide any lines before it or after it? As I said, context. |
Here is all the output when I run the script... C02QC02AG8WL:d4m-nfs grantlewis$ ./d4m-nfs.sh d4m-nfsWith the Docker for Mac's (D4M) current implementation of osxfs, depending on how read and write heavy containers are on mounted volumes, performance can be abismal. d4m-nfs blantently steals from the way that DockerRoot/xhyve used NFS mounts to get around i/o performance issues. With this implementation D4M appears to even outperform DockerRoot/xhyve under a full Drupal stack (mariadb/redis/php-fpm/nginx/varnish/haproxy), including persistent MySQL databases. The advantage of this over a file sync strategy is simpler, less overhead and not having to duplicate files. In order to make use of NFS, you will want to run ./d4m-nfs.sh before bringing up your containers, please note this must be run via the bash shell and not the sh shell. You will either need to change your volume paths to use /mnt, or configure the mounts in etc/d4m-nfs-mounts.txt. Look at the example directory for docker or docker-compose simple examples and an example d4m-nfs-mounts.txt. By default, if the script doesn't find any other volumes bound to /mnt in your etc/d4m-nfs-mounts.txt, it will mount your home directory (eg. /Users/username) on /mnt to be exposed for the container. If you'd like to disable this, you may set the environment variable AUTO_MOUNT_HOME to false. Alpine Linux NFS packages are now cached so that d4m-nfs can be used when not online. In order for this to work, you must of run it once before while online. You can now specify what mounts you want in the d4m-nfs-mounts.txt file. Note that if you do this, you need to make sure that it does not conflict with D4M settings, in other words if you want to have /Users be served by NFS instead of osxfs you will need to remove it from the D4M Preferences -> File Sharing. The /tmp share must stay since that is how d4m-nfs exchanges information with the D4M Moby VM. This is the default file sharing: Please make sure that /tmp is still shared: Please note:
Opening Github IssuesPlease keep in mind that everyone's environment is quite unique and this make helping people much harder. In that spirit when opening an issue, please provide the following:
Common ProblemIt appears as though a number of people are blindly copying the mounts from the preference in Docker for Mac to d4m-nfs/etc/d4m-nfs-mounts.txt. In doing this they end up having a /Volumes, /private and /Users mounts. If you are getting an error similar to the following, you might of done this:
In all likelihood this is not what you want. The location /Volumes on a Mac is actually just a symlink to /, and it is never good to export a symlink. On top of that, with NFS, you can not export child directories which are on the same file system, and since both /Users and /private this could cause problems. You probably will need have to clean up your /etc/exports to remove all the lines from # d4m-nfs exports down. Use Stable Docker for Mac channelCurrently d4m-nfs is known to work on the stable channel of 'Docker for Mac' both versions 1.12 and 1.13, we cannot guarantee how it will work on the beta channel of 'Docker for Mac'. Please use the stable channel of Docker for Mac https://docs.docker.com/docker-for-mac/ Integration with text editorsSublime TextIf you use Sublime, please checkout the plugin by Yves to help with auto reloads on file changes - https://github.com/yvess/sublime_d4m AtomThe easiest way to enable auto reloading is to install on-save package and set it up with this config: [
{
"srcDir": ".",
"files": "**/**",
"command": "screen -S d4m -p 0 -X stuff \"touch \\\"`pwd`/${srcFile}\\\"\"\r"
}
] |
Are you talking the error example from the README? |
The script appears to of fully run. You can run it with |
I logged into the Moby VM and I didn't see the mount. |
Something to check is, if you don't use So, if that's the case and you have You can see an example of referencing |
I am using ./etc/d4m-nfs-mounts.txt and trying to mount /Users/${USER} to /mnt, still no luck. I looked at the script and I can see what it's trying to do but not sure why it's failing to mount it. I'm not getting enough information when it errors out. |
I may go another route anyway b/c I kind of want a more permanent solution so I don't need to run the script every time. I just wanted to see if this would work. We are running an accumulo/hadoop/ stack for our development and it's a dog with osxfs. We need a faster solution. |
@ukchucktown do note that this project is a stop gap until Docker for Mac can be improved. you might want to look at file system caching they have been working on: https://blog.docker.com/2017/05/user-guided-caching-in-docker-for-mac/ |
If you would like me to look at this further please respond about if the error you were talking about was simple just the example error from the README. Also please include the output from going into Moby VM and issuing either |
I was able to finally get it mounted. I hit a small snag. I'm running a docker stack provided by our vendor that includes Hadoop, yarn, elastic search, accumulo, rabbitmq and tomcat. I mounted the /opt folder as /opt:/opt:501:0 (501 is my UID on the host) in the d4m-nfs-mounts.txt file. On startup the infrastructure tries to create a datastore folder under a subdirectory of /opt. Everything starts if the directory structure already exists. If it does not exist I get an error stating the folder is not shared from the Docker File Sharing preferences. I'm wondering if it's some kind of permissions issue. Output from mount command: Output of ls command:/ # ls -al |
@ukchucktown please keep in mind that since NFS is the underlying glue that is this project, that all rules of NFS must be followed, unlike Docker which creates the directory for you if it doesn't exist, NFS needs it to exist. Since NFS and Docker have no idea of the other, it is up to you to have to bootstrap. The way in which I often bootstrap is start up a stack normally without using NFS, use |
I have tried for 2 days to get this to work. It constantly reports mount denied when trying to run the d4m-nfs.sh script. I was trying to mount /opt from my host which has group ownership of wheel but my user account is the owner. I finally gave up on that and just tried to mount my user directory but that didn't work either. It's likely in a bad state and I have no idea how to reset it. I tried deleting everything in /tmp, removed the /etc/exports file and tried to rerun the script, same result. Hopefully somebody has some suggestions. I attached all my relevant files.
Thanks,
Grant
d4m-nfs-mounts-etc.txt
d4m-nfs-mounts-tmp.txt
d4m-mount-nfs.sh.txt
exports.txt
The text was updated successfully, but these errors were encountered: