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)
Comments
How to get owned, the easy way!
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 --reloadI have not tried but it looks promising!
Now I have tried it and it is breeze!!! I am using CentOS 7.
Thanks a lot!!!!
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
touch: cannot touch ‘/mnt/nfs/var/nfsshare/example’: Read-only file system
You need to change file permission to your client user and your client group.
For example:
sudo chown client_user:client_group /var/nfsshare/
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
Thank you very much !!!
thanks sreejan .It was a nice article on nfs
Why are you starting the NFS Server on the NFS client? Is this a typo?
> systemctl enable nfs-server
Works like a charm! Thank you for sharing.
Hi! I use iptables firewall. How i must edit rules?
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>
very useful thanks
Ran into trouble executing
systemctl enable rpcbind Failed to execute operation: No such file or directory
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.
Very much useful for the beginner like me. Thank you so much!
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.
the above worked