coreos / bugs

Issue tracker for CoreOS Container Linux
https://coreos.com/os/eol/
146 stars 30 forks source link

Shared Folder doesn't work on Arch = Mounting NFS shared folders... #1321

Open crawford opened 8 years ago

crawford commented 8 years ago

Issue by jujes


Someone know how fix it? I'll even try with rsync and don't work!

● nfs-server.service - NFS server and services
 Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
 Active: active (exited) since lun 2016-03-07 10:44:37 CET; 1h 10min ago
 Process: 5698 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
 Process: 5694 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 5698 (code=exited, status=0/SUCCESS)
 Tasks: 0 (limit: 512)
 CGroup: /system.slice/nfs-server.service

mar 07 10:44:37 maos systemd[1]: Starting NFS server and services...
mar 07 10:44:37 maos systemd[1]: Started NFS server and services.
==> **core-01: Mounting NFS shared folders...**
crawford commented 8 years ago

Comment by jschott2


What host OS are you using?

From: jujes [mailto:notifications@github.com] Sent: Monday, March 07, 2016 6:01 AM To: coreos/coreos-vagrant coreos-vagrant@noreply.github.com Subject: [coreos-vagrant] Shared Folder doesn't work on Arch = Mounting NFS shared folders... (#283)

Someone know how fix it? I'll even try with rsync and don't work!

● nfs-server.service - NFS server and services

Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)

Active: active (exited) since lun 2016-03-07 10:44:37 CET; 1h 10min ago

Process: 5698 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)

Process: 5694 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)

Main PID: 5698 (code=exited, status=0/SUCCESS)

Tasks: 0 (limit: 512)

CGroup: /system.slice/nfs-server.service

mar 07 10:44:37 maos systemd[1]: Starting NFS server and services...

mar 07 10:44:37 maos systemd[1]: Started NFS server and services.

==> core-01: Mounting NFS shared folders...

— Reply to this email directly or view it on GitHubhttps://github.com/coreos/coreos-vagrant/issues/283.

crawford commented 8 years ago

Comment by jujes


ArchLinux Kernel -v 4.3

crawford commented 8 years ago

Comment by jschott2


I struggled with trying to get folders working under Windows 7. Did get rsync to work. CoreOS-Vagrant-for-Windows-7-Documentation.docx is a read through what I did. Windows 7 is actually a linix environment running under windows and using Virtual Box.

A read through this document may be helpful with respect to the hacks that I needed to do to actually get things to work “off the shelf”.

https://github.com/jschott2/coreos-vagrant

From: jujes [mailto:notifications@github.com] Sent: Monday, March 07, 2016 9:59 AM To: coreos/coreos-vagrant coreos-vagrant@noreply.github.com Cc: Jim Schott jschott@ourcio.net Subject: Re: [coreos-vagrant] Shared Folder doesn't work on Arch = Mounting NFS shared folders... (#283)

ArchLinux Kernel -v 4.3

— Reply to this email directly or view it on GitHubhttps://github.com/coreos/coreos-vagrant/issues/283#issuecomment-193284466.

crawford commented 8 years ago

Comment by jujes


OK, here my final solution; I think is valid for all unix operating systems... even windows, the key is nfs_udp: false add this script into config.rb

Vagrant.configure("2") do |config|
 config.vm.synced_folder "/MY-LOCAL-PATH", "/home/core/sync", id: "core", :nfs => true, :mount_options => ['nolock,vers=3'], nfs_udp: false
end

OUTPUT

==> core-01: Exporting NFS shared folders...
==> core-01: Preparing to edit /etc/exports. Administrator privileges will be required...
● nfs-kernel-server.service - LSB: Kernel NFS server support
 Loaded: loaded (/etc/init.d/nfs-kernel-server; bad; vendor preset: enabled)
 Active: active (running) since Thu 2016-03-10 17:20:43 CET; 2min 54s ago
 Docs: man:systemd-sysv-generator(8)
 Process: 7706 ExecStop=/etc/init.d/nfs-kernel-server stop (code=exited, status=0/SUCCESS)
 Process: 7721 ExecStart=/etc/init.d/nfs-kernel-server start (code=exited, status=0/SUCCESS)
 Tasks: 1 (limit: 512)
 CGroup: /system.slice/nfs-kernel-server.service
 └─7753 /usr/sbin/rpc.mountd --manage-gids

Mar 10 17:20:43 deep systemd[1]: Starting LSB: Kernel NFS server support...
Mar 10 17:20:43 deep nfs-kernel-server[7721]: Exporting directories for NFS kernel daemon....
Mar 10 17:20:43 deep rpc.mountd[7753]: Version 1.2.8 starting
Mar 10 17:20:43 deep nfs-kernel-server[7721]: Starting NFS kernel daemon: nfsd mountd.
Mar 10 17:20:43 deep systemd[1]: Started LSB: Kernel NFS server support.
Mar 10 17:20:52 deep rpc.mountd[7753]: authenticated mount request from 192.168.56.101:840 for /MY-LOCAL-PATH (/MY-LOCAL-PATH)
Mar 10 17:22:52 deep rpc.mountd[7753]: authenticated unmount request from 192.168.56.101:856 for /MY-LOCAL-PATH (/MY-LOCAL-PATH)
==> core-01: Mounting NFS shared folders...
==> core-01: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> core-01: flag to force provisioning. Provisioners marked to run always will still run.

usefull command:

sudo /etc/init.d/nfs-kernel-server restart After that I just use mv to change the owner and permission for files...

AlexNPavel commented 7 years ago

This is almost certainly just an issue with the differences between the way different Linux distros handle NFS. Maybe we should put better documentation? In the end, it's Vagrant's fault, so I'm not sure if we should do anything about this or not...