Not syncing files properly in High Sierra
rabdulhaq opened this issue ยท 21 comments
After updating to High Sierra, files are not syncing/mounting properly. Some files are missing and others are duplicated.
@rabdulhaq can you test if you have the issue too without NFS? Maybe it's a docker-machine/boot2docker/virtualbox issue?
Without docker-machine-nfs, Docker works fine but slow of course.
@rabdulhaq Seems an issue with NFS from an APFS volume
Yes definitely. I was hoping you guys can maybe have a workaround for that issue.
Thanks!
@rabdulhaq nobody at the company is running High Sierra currently so it will be hard to fix ;) However if you find some time, contributions are always welcome :)
@rabdulhaq These mount options helped for me: nolock,vers=3,tcp,fsc,rw,noatime
@ctrlrsf, I tried doing that but I get the "Cannot detect the NFS mount :(" error with these options.
This is what I ran:
docker-machine-nfs default --mount-opts="nolock,vers=3,tcp,fsc,rw,noatime"
Thank you!
Modifying my /var/lib/boot2docker/bootlocal.sh to this seems to have worked:
sudo mount -t nfs -o nolock,vers=3,tcp,rw,noatime :/Users /Users
Worked fine for me. Notice the lack of 'fsc' because the boot2docker NFS client doesn't seem to support it. But i've had no problems since. Good to be back on NFS!
@ckortekaas, this did not work either :(
As mentioned on the referenced issues, High Sierra 10.13.2 Beta 2 solves the issue.
I updated to High Sierra 10.3.2 Beta 3 (Build 17C76a) and it seems to solve the problem.
I can also confirm that updating to Public Beta 3 (Build 17C67b) solved the problem.
Thanks guys.
I have the same issue on macOS High Sierra (build 17B48).
problem still exists on beta 10.13.3 (17D20a)
The problem manifests itself with the file that has just been edited. After a while he appears in the docker-machine
Error immediatly after change file: I/O error
Hello guys,
We have currently one colleague who (mistakenly) upgraded to high sierra, but does not have any NFS issues. He's currently on version 10.13.1 (17B1003) and has following configuration:
In /etc/exports
/Users 192.168.99.100 -alldirs -mapall=501:20
In bootlocal.sh (docker-machine ssh [machine-name] cat /var/lib/boot2docker/bootlocal.sh
)
#!/bin/sh
sudo umount /Users
sudo mkdir -p /Users
sudo /usr/local/etc/init.d/nfs-client start
sudo mount -t nfs -o noacl,async 192.168.99.1:/Users /Users
And last but not least, it's a php project.
Not sure why some have problems, why with others it works. Maybe this can shed some lights.
Cheers
Same problems here, some files are missing with ls
but you can access it with cd
High Sierra 10.13.1 (17B1003)
My OSX version 10.13.2
When I edited a file on Host.
Then type ls on container
ls changed_file.php
it will display
ls: cannot access changed_file.php: Input/output error
I must wait a while then it can be accessed
but if I ls the folder like
ls .
it will directly display the file info
changed_file.php
and then everything will be ok
$ls changed_file.php changed_file.php
Solution (in my case)
I changed mount options to async,noatime,actimeo=1,nolock,vers=3,udp:
echo "" | sudo tee /etc/exports
docker-machine-nfs default --mount-opts="async,noatime,actimeo=1,nolock,vers=3,udp" -f
Additional info:
sw_vers
:
ProductName: Mac OS X
ProductVersion: 10.13.3
BuildVersion: 17D25b
mount
:
/dev/disk1s1 on / (apfs, NFS exported, local, journaled)
devfs on /dev (devfs, local, nobrowse)
/dev/disk1s4 on /private/var/vm (apfs, local, noexec, journaled, noatime, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)
cat /etc/exports
:
# docker-machine-nfs-begin default #
/Users 192.168.99.100 -alldirs -mapall=501:20
# docker-machine-nfs-end default #
docker-machine ssh default cat /var/lib/boot2docker/bootlocal.sh
:
#!/bin/sh
sudo umount /Users
sudo mkdir -p /Users
sudo /usr/local/etc/init.d/nfs-client start
sudo mount -t nfs -o async,noatime,actimeo=1,nolock,vers=3,udp 192.168.99.1:/Users /Users
uname -a
:
Darwin MacBook-Pro-Aleksandr.local 17.4.0 Darwin Kernel Version 17.4.0: Mon Dec 11 21:15:27 PST 2017; root:xnu-4570.40.9~4/RELEASE_X86_64 x86_64
docker-machine version
:
docker-machine version 0.13.0, build 9ba6da9
docker version
:
Client:
Version: 17.10.0-ce
API version: 1.32 (downgraded from 1.33)
Go version: go1.8.3
Git commit: f4ffd25
Built: Tue Oct 17 19:00:43 2017
OS/Arch: darwin/amd64
Server:
Version: 17.09.1-ce
API version: 1.32 (minimum version 1.12)
Go version: go1.8.3
Git commit: 19e2cf6
Built: Thu Dec 7 22:28:28 2017
OS/Arch: linux/amd64
Experimental: false
docker info
:
Containers: 19
Running: 8
Paused: 0
Stopped: 11
Images: 52
Server Version: 17.09.1-ce
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 341
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.4.104-boot2docker
Operating System: Boot2Docker 17.09.1-ce (TCL 7.2); HEAD : e7de9ae - Fri Dec 8 19:41:36 UTC 2017
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 7.79GiB
Name: default
ID: V4S5:YJKZ:AXYG:V63S:OPXO:YV2C:ZE3C:T2VM:AJIQ:JRAI:BBD7:RCJO
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 83
Goroutines: 78
System Time: 2017-12-26T20:57:34.020536741Z
EventsListeners: 1
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
I migrated to 10.13.2 (17C88), and did not encounter any issues ...
I believe we can close this topic. I guess, either you never had the issue, or you were able to solve it with @xxxcoltxxx solutions using following mount options (--mount opts="async,noatime,actimeo=1,nolock,vers=3,udp")
it works with v18.06.1-ce. On the newest 18 versions and 19.* sync doesn't work.
My stack:
MacOS Mojave 10.14
Virtualbox 6.0.4 r128413
Docker version 19.03.1, build 74b1e89
docker-machine version 0.16.1, build cce350d7
Just use
docker-machine create --driver virtualbox --virtualbox-boot2docker-url=https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso <your_machine_name>