Last active
November 16, 2023 11:58
-
-
Save johnsimcall/f17c2cb21e1365de7040296ac30ae421 to your computer and use it in GitHub Desktop.
NFS server/export setup on RHEL8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dnf install nfs-utils | |
mkdir -p /exports/openshift | |
chmod 755 /exports/openshift | |
chown -R nfsnobody:nfsnobody /exports/openshift | |
semanage fcontext --add --type nfs_t "/exports/openshift(/.*)?" | |
restorecon -R -v /exports/openshift | |
echo "/exports/openshift *(insecure,no_root_squash,async,rw)" >> /etc/exports | |
firewall-cmd --add-service nfs \ | |
--add-service mountd \ | |
--add-service rpc-bind \ | |
--permanent | |
firewall-cmd --reload | |
systemctl enable --now nfs-server | |
systemctl status nfs-server | |
exportfs -av | |
showmount -e localhost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I noticed that Ubuntu 22.04 enables
mountd
-g option by default (also known as themanage-gids
option in /etc/nfs.conf). This setting is described in the man page as, "If you use the -g flag, then the list of group ids received from the client (OpenShift) will be replaced by a list of group ids determined by an appropriate lookup on the server (Ubuntu.)"Ubuntu NFS server wasn't working for csi-driver-nfs until I disabled the
-g
option by creating an override file in /etc/nfs.conf.d/...