How to deploy NFS Server in CoreOS?

4,222 views
Skip to first unread message

Liang Suilong

unread,
Jan 14, 2015, 9:00:41 PM1/14/15
to coreo...@googlegroups.com
I am using CoreOS 494.5.0, stable channel. I want to share some data in CoreOS with other machine. There is NFS server in CoreOS. My data locates in /root/test directory. Then I edit /etc/exports configure file and restart nfsd.service. I find out NFS server could be started as normal. But I can not mount NFS share in another machine. 

CoreOS IP is 192.168.1.65. NFS Client is 192.168.1.152. All the machines are turned off firewall. 

Here is my /etc/exports in CoreOS:


And I find out nfsd service could be started well. 

edodocs ~ # systemctl status -l nfsd
● nfsd.service - NFS server
   Loaded: loaded (/usr/lib64/systemd/system/nfsd.service; disabled)
   Active: active (exited) since Thu 2015-01-15 09:50:44 CST; 50s ago
  Process: 12221 ExecStartPost=/usr/sbin/exportfs -a (code=exited, status=0/SUCCESS)
  Process: 12208 ExecStart=/usr/sbin/rpc.nfsd 8 (code=exited, status=0/SUCCESS)
 Main PID: 12208 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nfsd.service

Jan 15 09:50:44 edodocs systemd[1]: Started NFS server.

But I try to mount nfs share. It shows access denied.

[root@fedora-laptop ~]# mount 192.168.1.65:/root/test/ /root/test/
mount.nfs: access denied by server while mounting 192.168.1.65:/root/test/

I put the /etc/exports to another OS, just like Ubuntu and Fedora. It works well and NFS client could mount NFS share successfully. Is there any restriction in NFS server of CoreOS? Or How should I set NFS server in CoreOS?  

Thank you for your reading. 

Sean Summers

unread,
Feb 2, 2015, 2:45:34 PM2/2/15
to coreo...@googlegroups.com

To avoid exportfs: /tmp requires fsid= for NFS export errors reported by journalctl -t exportfs add fsid=0 to your /etc/exports line, like so:

/root/test/ 192.168.1.0/24(rw,async,no_subtree_check,no_root_squash,fsid=0)

and start rpc-mountd before showmount, using:

systemctl start rpc-mountd

Everything should work as you wish now.
Reply all
Reply to author
Forward
0 new messages