Guest OS shows wrong amount of files in NFS folder on macOS High Sierra host

3

2

In macOS High Sierra when booting a guest OS with a folder shared with the host over NFS it shows the wrong amount of files when amount of files grows. It didn't show the problem in macOS Sierra. Here's how you can quickly test it.

  • Boot the guest OS with VirtualBox and SSH into it.
  • CD to a shared NFS folder
  • $ mkdir test && cd test && touch test{1..1000} && ls | wc -l

This creates a test folder, goes into it and then creates 1000 test files after which it lists them and prints out the amount of lines in the output.

On my machine it prints out 1007 instead of 1000. It actually prints some files twice (and might not print others). You can check with listing only double files:

$ ls | uniq -c | grep " 2"

I believe this is an NFS bug or a kernel bug in macOS, could that be right?

Jeroen

Posted 2017-09-04T06:17:42.453

Reputation: 71

3

It looks like a bug in mac os. Here's some related discussion https://github.com/hashicorp/vagrant/issues/8788

– Scott Jacobsen – 2017-10-02T21:10:10.297

1It's an issue with APFS and NFS. Damn you Apple. Supposedly fixed by the upcoming 10.13.2 update – Benjamin R – 2017-12-04T03:24:42.833

Answers

0

It is a bug in macOS High Sierra 10.13 and 10.13.1.

macOS 10.13.2 fixes it.

Jeroen

Posted 2017-09-04T06:17:42.453

Reputation: 71

1Are you able to provide a link to the bugfix? – Burgi – 2017-12-05T09:04:35.140

Apple doesn't specifically point to it anywhere I don't think. macOS10.13.2 got released on 2017-12-06. – Jeroen – 2017-12-06T18:50:13.090

Don't forget to accept your own answer. – Burgi – 2017-12-07T09:01:34.343