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

macOS Catalina #100

Closed
mtibben opened this issue Oct 9, 2019 · 17 comments · Fixed by #102
Closed

macOS Catalina #100

mtibben opened this issue Oct 9, 2019 · 17 comments · Fixed by #102
Labels

Comments

@mtibben
Copy link
Contributor

mtibben commented Oct 9, 2019

It appears docker-machine-nfs is having problems running on macOS Catalina

+ docker-machine-nfs 99dev-v15 --mount-opts=noatime,nodiratime,vers=3,nolock,noacl,timeo=10 --force
[INFO] Configuration:

	- Machine Name: 99dev-v15
	- Shared Folder: /Users
	- Mount Options: noatime,nodiratime,vers=3,nolock,noacl,timeo=10
	- Force: true

[INFO] machine presence ... 			OK
[INFO] machine running ... 			OK
[INFO] Lookup mandatory properties ... OK

	- Machine IP: 192.168.99.102
	- Network ID: vboxnet0
	- NFSHost IP: 192.168.99.1

[INFO] Configure NFS ...

 !!! Sudo will be necessary for editing /etc/exports !!!
Password:
exports:3: exported dir/fs mismatch: /Users /System/Volumes/Data

It appears the error is occurring at

$ sudo nfsd checkexports
exports:3: exported dir/fs mismatch: /Users /System/Volumes/Data
$ echo $?
1

and likely caused by the APFS Volume Groups in Catalina making separate partitions appear as one logical filesystem

@tonivdv tonivdv added the bug label Oct 9, 2019
@tonivdv
Copy link
Member

tonivdv commented Oct 9, 2019

Hi @mtibben ,

I didn't upgrade yet so I cannot help figure this out at the moment. Maybe you can try and propose a PR?

@alessiopiazza
Copy link

@mtibben have you tried to set --shared-folder=/System/Volumes/Data/Users ?

@rivetmichael
Copy link

@alessiopiazza it does work when running docker-machine-nfs command, but then we you share a folder or file with a container it is empty

@PaulBrandt
Copy link

Im facing the same problem and setting the hosts path with /System/Volumes/Data/[...] seems to fix the problems at first (I even see all the files) but the guest is not able to write files as it was earlier. So there seems to be some follow-up problems.

@mtibben
Copy link
Contributor Author

mtibben commented Oct 10, 2019

Here's the approach taken by Vagrant to the same problem hashicorp/vagrant#11108

@tonivdv
Copy link
Member

tonivdv commented Oct 10, 2019

Thanks @mtibben for providing a fix.

Can everybody try it out and share feedback on the PR. As said, I didn't migrate yet so can't test it out (yet)

@PaulBrandt
Copy link

PaulBrandt commented Oct 10, 2019

What I had to do:

  • add /System/Volumes/Data to the nfs path as stated above
  • add /System/Volumes/Data to all the volume paths I have in my docker-compose.yml

(Inspired by the Vagrant Issue - They edited their Vagrant-File)

I think this is the reason why @rivetmichael has empty folders in his guest. Do you maybe need to add the prefix in your docker-compose.yml as well?

Edit: (Done before the fix was provided - WIll test the fix with original configs)

@PaulBrandt
Copy link

#102 created my /etc/export including the /System/Volumes/Data prefix.
After removing all the manually set prefixes in my docker-compose.yml everything worked.
👍 for the fix

@rivetmichael
Copy link

@PaulBrandt thanks, I am trying this right now 👍

@rivetmichael
Copy link

thanks @mtibben and @PaulBrandt works fine with your PR

@nathpaiva
Copy link

Hello guys, I updated my macOs and I'm trying to execute the command docker-machine-nfs default --shared-folder=/System/Volumes/Data/Users --force, but I have some errors.

± docker-machine-nfs default --shared-folder=/System/Volumes/Data/Users
[INFO] Configuration:

	- Machine Name: default
	- Shared Folder: /System/Volumes/Data/Users
	- Mount Options: noacl,async,nfsvers=3
	- Force: false

[INFO] machine presence ... 			OK
[INFO] machine running ... 			OK
[INFO] Lookup mandatory properties ... OK

	- Machine IP: 192.168.99.106
	- Network ID: vboxnet0
	- NFSHost IP: 192.168.99.1

[INFO] Configure NFS ...

 !!! Sudo will be necessary for editing /etc/exports !!!
Password:
Unknown user:
map credential error
exports:3: error processing options: -mapall=:501:20
exports:9: /System/Volumes/Data/Users conflicts with existing export /System/Volumes/Data/Users/nathpaiva/www

Someone knows, how can I fix this?

@nathpaiva
Copy link

nathpaiva commented Oct 21, 2019

Even if I pass the folder I want to share, like:
docker-machine-nfs default --shared-folder=/System/Volumes/Data/Users/nathpaiva/www --force

I receive this error.

Unknown user:
map credential error
exports:3: error processing options: -mapall=:501:20

@tonivdv
Copy link
Member

tonivdv commented Oct 21, 2019

Hey @nathpaiva ,

As the error tells you, you have a conflicting configuration in your /etc/exports file.

Remove the line with /System/Volumes/Data/Users/nathpaiva/www and try again.

Cheers

@nathpaiva
Copy link

Yeah, of course! I didn't think to check this. 🤦‍♀️

I remove from there and everything works fine. Thanks @tonivdv

@frankgraave
Copy link

frankgraave commented Oct 31, 2019

I have the same kind of error:
exports:3: /System/Volumes/Data/Users conflicts with existing export /System/Volumes/Data

I'm running "docker-machine-nfs default"

But how to 'remove the line' as @tonivdv says?

Thanks in advance!

@nathpaiva
Copy link

@frankgraave go to /etc/exports and delete all data about the path you are passing.

And do the upgrade version with brew upgrade docker-machine-nfs and try again docker-machine-nfs default.

This is worked to me.

@frankgraave
Copy link

frankgraave commented Oct 31, 2019

Ah, I see now 🤦‍♂ Sorry, long day and I wasn't reading quite well 😅 Thanks for pointing it out @nathpaiva!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants