Last active
September 3, 2016 21:23
-
-
Save sirkkalap/40261ed82386ad8a6409 to your computer and use it in GitHub Desktop.
A script to switch boot2docker to use NFS instead of VBoxfs for speed and proper permissions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################ | |
# Note: Special network 192.162.50.3 to use Cisco Anyconnect Split tunnel. | |
# | |
# On OX X host you need to add a line (and file) /etc/exports: | |
# /Users -mapall=[youruser]:[yourgroup] [boot2dockerip] | |
# See: https://quip.com/EDYLAAfuup5M (no login needed) | |
# See also: https://github.com/boot2docker/boot2docker/issues/587#issuecomment-66935011 | |
# See also: http://support.apple.com/en-us/HT202243 | |
# See also: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/exports.5.html | |
############################################################################# | |
sudo umount /Users | |
sudo /usr/local/etc/init.d/nfs-client start | |
sudo mount 192.168.50.3:/Users /Users -o rw,async,noatime,rsize=32768,wsize=32768,proto=tcp |
curl -sSL https://gist.githubusercontent.com/sirkkalap/40261ed82386ad8a6409/raw/005b70f82992e2ea19b1cb467d05032249ef5020/nfs-mount-boot2docker.sh | bash -
umount: /Users: not currently mounted
sudo: /usr/local/etc/init.d/nfs-client: command not found
usage: mount [-dfruvw] [-o options] [-t external_type] special node
mount [-adfruvw] [-t external_type]
mount [-dfruvw] special | node
I can't find nfs-client command. How should I do ?
TOMOAKI12345 are you running that command inside of the boot2docker vm?
e.g.:
developer@machine:~$ boot2docker ssh
docker@boot2docker:~$ curl -sSL https://gist.githubusercontent.com/sirkkalap/40261ed82386ad8a6409/raw/005b70f82992e2ea19b1cb467d05032249ef5020/nfs-mount-boot2docker.sh | bash -
I resolved the: mount: RPC: Authentication error; why = Client credential too weak
error by adding the following to /etc/nfs.conf
:
nfs.server.mount.require_resv_port = 0
Then restarting the nfs daemon with:
nfsd restart
After a while I got it working. Thanks for the help!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I finally got it to work with the default networking settings (NAT) and wrote a bash script (it will also setup the host machine): https://gist.github.com/olalonde/3f7512c0bd2bc8abb46d