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

Not syncing files properly in High Sierra #79

Closed
rabdulhaq opened this issue Sep 29, 2017 · 21 comments
Closed

Not syncing files properly in High Sierra #79

rabdulhaq opened this issue Sep 29, 2017 · 21 comments
Labels

Comments

@rabdulhaq
Copy link

After updating to High Sierra, files are not syncing/mounting properly. Some files are missing and others are duplicated.

@tonivdv
Copy link
Member

tonivdv commented Sep 29, 2017

@rabdulhaq can you test if you have the issue too without NFS? Maybe it's a docker-machine/boot2docker/virtualbox issue?

@rabdulhaq
Copy link
Author

Without docker-machine-nfs, Docker works fine but slow of course.

@tonivdv
Copy link
Member

tonivdv commented Sep 29, 2017

@rabdulhaq
Copy link
Author

Yes definitely. I was hoping you guys can maybe have a workaround for that issue.
Thanks!

@tonivdv
Copy link
Member

tonivdv commented Sep 29, 2017

@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 :)

@tonivdv tonivdv added the bug label Sep 29, 2017
@ctrlrsf
Copy link

ctrlrsf commented Oct 6, 2017

@rabdulhaq These mount options helped for me: nolock,vers=3,tcp,fsc,rw,noatime

@rabdulhaq
Copy link
Author

@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!

@ckortekaas
Copy link
Contributor

ckortekaas commented Oct 16, 2017

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!

@rabdulhaq
Copy link
Author

@ckortekaas, this did not work either :(

@pcasaretto
Copy link

As mentioned on the referenced issues, High Sierra 10.13.2 Beta 2 solves the issue.

@ab9-er
Copy link

ab9-er commented Nov 14, 2017

I updated to High Sierra 10.3.2 Beta 3 (Build 17C76a) and it seems to solve the problem.

@rabdulhaq
Copy link
Author

I can also confirm that updating to Public Beta 3 (Build 17C67b) solved the problem.
Thanks guys.

@jasiu001
Copy link

I have the same issue on macOS High Sierra (build 17B48).

@xxxcoltxxx
Copy link

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

@tonivdv
Copy link
Member

tonivdv commented Dec 13, 2017

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

@paolomainardi
Copy link
Contributor

Same problems here, some files are missing with ls but you can access it with cd

High Sierra 10.13.1 (17B1003)

@fmfsaisai
Copy link

fmfsaisai commented Dec 19, 2017

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

@xxxcoltxxx
Copy link

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

@tonivdv
Copy link
Member

tonivdv commented Jan 11, 2018

I migrated to 10.13.2 (17C88), and did not encounter any issues ...

@tonivdv
Copy link
Member

tonivdv commented Sep 7, 2018

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")

@geo0000
Copy link

geo0000 commented Sep 27, 2019

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>

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