-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
NFS folders not properly synced on macOS High Sierra #8788
Comments
I've also been seeing the same "behaviour" since upgrading to 10.13, but only with some vagrant boxes. For those reading this coming from google; changing from NFS to rsync is a good workaround for the problem for now, but requires extra actions (such as running |
Hello @Yaroon - I attempted to reproduce this locally with my own local Drupal folder being synced with NFS and I did not notice duplicate folders within the mounted folder on Thank you! |
I've 'vagrant destroy'ed the box, and rebooted the computer. Still the same, as soon as I remove the "StringData" folder, "TypedData" goes away as well. When I create "StringData" again, it re-appears. Maybe next week Wednesday there'll be a new macOS High Sierra Public beta. We'll see how it evolves? Until then, I don't know what to do. macOS HS does of course have a new FS... that could be the cause? But I don't know nearly enough about it in order to gain some info that could diagnose this issue. |
@Yaroon can you try to reproduce in a more simple setup? I wasn't able.
|
my Vagrantfile:
|
@Yaroon for most use cases NFS is fine. however if you are using a code generator that may use links, symlinks, hardlinks, etc, it may require a full FS and wont' work with virtualboxfs, vmware hgfs or nfs. we have seen nodejs and php apps having issues due this. vagrant does his best to setup nfs for you, however, once is setup, will be host + guest troubleshooting in case of issues. if you think this is a core vagrant issues, please help us to reproduce this on a simple vagrantfile and simple commands. thanks! |
I'm not sure if this is a vagrant issue per se, could be an NFS implementation issue in High Sierra, or be caused by APFS. One thing I do know, is that I'm using the exact same vagrant box and codebase as before I upgraded. And I didn't have any trouble before that. I've been trying to come up with a simple reproduction vagrantfile, but unfortunately I wasn't able to. It doesn't even occur on all the vagrant boxes that I have, which makes it hard to pinpoint the problem. Is there any way to get more debugging output from the NFS process? |
I'll also try to come up with something reproducible for you guys, but it'll be tough I think. I'm really hoping for a fix in macOS High Sierra next week. Thing is, I don't know if Apple is aware, and it's hard to write a bug report without a true reproducible for those guys. It won't easily be looked at then. |
please reopen if found a way to reproduce |
So I've found a reproducible. Again, I am on macOS High Sierra. I don't know how to re-open an issue either, so I hope someone sees this :) I don't quite not know how to go about it, but this is what I did to get it going... I'll include some commands you need to execute on the vagrant box to get to the point where you see some folders not sync. Vagrant version: Vagrant 1.9.7 # -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "debian/jessie64"
config.vm.network "private_network", type: "dhcp"
config.vm.synced_folder "www", "/var/www", type: "nfs"
end In vagrant I added these to /etc/apt/sources.list deb http://http.debian.net/debian jessie-backports main contrib non-free So I could, on the vagrant box: $ apt update && apt-get install virtualbox-guest-additions-iso build-essentials linux-headers-3.16.0-4 Then on the Host, download Drupal from https://www.drupal.org/project/drupal/releases/8.3.7 Then... after vagrant up, in guest you can go to /var/www/core/lib/Drupal/Core/ and you won't see the TypedData folder, even though it is there on the host. If you mkdir StringData in /var/www/core/lib/Drupal/Core/ you'll all of a sudden see the TypedData folder appear as well. Let me know if you need more instructions. |
Booting the machine in VirtualBox, not through vagrant, does show the folder... In VirtualBox: add the www folder as a permanent Machine Folder with Folder Name drupalwwwAdd root to the vboxsf group$ sudo usermod -a -G vboxsf root Mount the shared folder$ sudo mount -t vboxsf drupalwww /var/www List the folder's contents$ ls /var/www/core/lib/Drupal/Core This lists the TypedData folder. When booting the machien via vagrant up, using NFS to share the folder, it does not show. |
Or, when not doing it via VirtualBox' shared folders but configuring the NFS share on the guest OS it also works well. Adding the line to /etc/fstab for my host's IP and www folder lets me mount it and there are no missing files or folders. |
It got even simpler, it's probably an APFS bug that causes it to not work well with NFS, so I think this will blow up soon as macOS High Sierra nears release, here's some commands I ran to show the problem. No Drupal install needed, just a vagrant box.
|
@kikitux we cant re-open High Sierra is coming soon. |
I've reopened the issue @kylebrowning @Yaroon |
@kylebrowning or @Yaroon ...if you could confirm, does this behavior happen if you run the mount command yourself outside of Vagrant? If that's the case then it is probably a bug with NFS on High Sierra. It'd be something like....
|
@briancain I had indeed already booted the guest OS in just VirtualBox with NFS set up in its /etc/fstab. But just for you I unmounted /var/www on the guest and tried it with:
No change. When I create 1000 files in a folder and count them with ls | wc -l it prints 1038 instead of 1000. |
Finally, 10.13.2 is released. 🎉 |
Can we now close this issue :) |
I can confirm that the final version also solves the issue |
After all the positive feedback here I decided to try 10.13.2 too, without the intermediate sparsebundle. Unfortunately it doesn't even mount anymore for me:
(the same error happens during I forgot to test directly after installing the 10.13.2 upgrade, so I don't know if it is related to the upgrade, or somehow cause by removing the sparsebundle.
Any ideas? |
@jandubois you should open a new issue as it looks unrelated to this issue. |
@jandubois yeah...like @emileber just said that seems like a separate issue from this one. I recommend opening a new issue here on Github with all the information from the template filled out. Thanks! |
Agreed. I'll first look into this some more myself though; I have another machine that I will upgrade to 10.13.2 tomorrow and will look more carefully after each step to see when/if that one will break in the same way. |
I've just updated from the Beta to the release load of 10.13.2 and everything is good to go. NFS mount works perfectly. |
Solved here too.. |
I have the same issue as @jandubois. If I unmount the SparseBundle and put my files directly into the folder where the Bundle was mounted, vagrant is not able to mount that folder into the VM. Switching back to the SparseBundle works fine. |
works for me now 👍 |
@sweh @jandubois Did you move the project without destroying and recreating the box? I had the same issue, vagrant seems to save the project path, and if you move the project, the paths changes, but vagrant tries to mount the old path. All I did was destroying and recreating the box after moving. Didn't do more research if the path can be fixed without destroying the box. |
No, I did not move anything. The path to the mounted SparseBundle and the folder in the AFS filesystem respectively are the same. |
@dnl-jst, you can manually edit the You'll have the |
10.13.2 solved the problem for me. |
Yeah, it would appear that 10.13.2 solves this, but is it just me.. or is it a little slower than NFS on an HFS+ formatted drive/sparsebundle? |
I upgraded directly to 10.13.2. Everything works as expected, no issues so far with nfs usage in vagrant for my vm! |
@trappar its much slower I agree. And I find when I save a file on the Mac side, within vagrant the file is missing for quite a few seconds before it shows up again with the up to date content. Definitely much slower than it used to be on HFS+ |
@trappar @shamdsc I'm having the same issue. It's much slower. Takes couple of seconds for it to sync properly. Is this a Vagrant issue or an Apple issue? |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Please note that the Vagrant issue tracker is reserved for bug reports and
enhancements. For general usage questions, please use the Vagrant mailing list:
https://groups.google.com/forum/#!forum/vagrant-up. Thank you!
Vagrant version
$ vagrant -v
Vagrant 1.9.7
Host operating system
$ uname -a
Darwin liver.local 17.0.0 Darwin Kernel Version 17.0.0: Thu Jun 29 19:47:09 PDT 2017; root:xnu-4532.0.0.0.1~23/RELEASE_X86_64 x86_64
$ sw_vers -productVersion
10.13
Guest operating system
$ uname -a
Linux vagrant 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux
Vagrantfile
Please note, if you are using Homestead or a different Vagrantfile format, we
may be unable to assist with your issue. Try to reproduce the issue using a
vanilla Vagrantfile first.
Debug output
https://gist.github.com/Yaroon/dcb20eb984669688746767b0342c7d55
Expected behavior
I should see all folders that in the NFS share.
I shouldn't see folders doubly in the NFS share.
Actual behavior
I do not see the TypedData folder.
I see Field and Breadcrumb folder twice.
Steps to reproduce
Additionally you can check out a screencast I did that illustrates the problem.
You can see how the folder is an NFS folder at first. You can see Breadcrumb and Field appearing twice on the guest OS while TypedData does not. When I then create a folder "WhateverOtherData" it gets synced between host and guest. However TypedData and Field and Breadcrumb are still there twice. When I then create a folder StringData, all of a sudden TypedData appears on the guest and we only see 1 Breadcrumb and 1 Field folder. So something got triggered to fix it... I just don't know what.
https://www.dropbox.com/s/ykdi1cp5v689sq0/Vagrant%20%2B%20NFS%20%2B%20macOS%20High%20Sierra.mov?dl=0
References
The text was updated successfully, but these errors were encountered: