Comments on NFS Server and Client Installation on CentOS 7

NFS server and client installation on CentOS 7. This guide explains how to configure NFS server in CentOS 7. Network File System (NFS) is a popular distributed filesystem protocol that enables users to mount remote directories on their server.

20 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: the centos guy

How to get owned, the easy way!

By: Dariusz Panasiuk

as of firewall, you will have to also include other services:

 

 

firewall-cmd --permanent --zone=public --add-service=nfs

firewall-cmd --permanent --zone=public --add-service=mountd

firewall-cmd --permanent --zone=public --add-service=rpc-bind

firewall-cmd --reload

By: fuller

I have not tried but it looks promising!

By: Fuller Suppend

Now I have tried it and it is breeze!!! I am using CentOS 7.

Thanks a lot!!!!

By: hannes fuchs

have had problems with nfs-lock and nfs-idmap service enable:

solution: https://www.centos.org/forums/viewtopic.php?f=47&t=53896

systemctl enable rpc-statd.service systemctl enable nfs-idmapd.service

By: agqweghrwh

touch: cannot touch ‘/mnt/nfs/var/nfsshare/example’: Read-only file system

By: vannak

You need to change file permission to your client user and your client group. 

For example:

sudo chown client_user:client_group /var/nfsshare/

By: Charlie

My attempt at "mount -t nfs" didn't work, but "mount -t nfs4" did. Is this running over TCP? See below:

# mount -o ro cache.yum.com:/var/cache/yum/x86_64/7Server/ol7_latest/packages /cdrom

mount: mount to NFS server 'cache.yum.com' failed: System Error: No route to host.

devoi # mount -t nfs4 -o ro cache.yum.com:/var/cache/yum/x86_64/7Server/ol7_latest/packages /cdrom

# ls /cdrom

bash-4.2.46-21.0.1.el7_3.x86_64.rpm

By: Tonie

Thank you very much !!!

By: jos

thanks sreejan .It was a nice article on nfs

By: Stefan

Why are you starting the NFS Server on the NFS client? Is this a typo?

 

> systemctl enable nfs-server

By: ZIlmar

Works like a charm! Thank you for sharing.

By: BoBo

Hi! I use iptables firewall. How i must edit rules?

By: S.Germán

In the final section, section 4, it might be less error prone to pull the mount information out of /proc/mounts?

   grep nfsshare /proc/mounts 1>> /etc/fstab

It will save you typing and will reduce the chance of error in /etc/fstab. The only danger here though is making sure you type 1>> instead of just 1>

By: Mscomms

very useful thanks

By: greg

Ran into trouble executing 

systemctl enable rpcbind Failed to execute operation: No such file or directory

 

By: michael

now can you extrend this to integrate with freeIPA?

it would be great to see a tutorial where freeIPA sets up user /home automounts upon first login.

By: Emma Rogers

Very much useful for the beginner like me. Thank you so much!

By: Ray Radam

Thank you very much, I've been looking for solutions, I even go the iptables rabbit hole but found out it's not compatible with firewall so I really appreciate this post. 

By: kirk london

the above worked