So how do I set up NFSv4 through YaST2?

Just read the thread from tleedavidson posted on 24th June. Unfortunately the OP knows much more than I do and I got lost before I had a clear understanding of what I have to do to get NFSv4 to work. So I am still hoping for some help please.
Budge

Hi Budge,

I think the YaST module for nfs-server is quite self explaining. Years ago I got it running without a lot of knowledge. Although, I never bothered using NFSv4 always stayed with NFSv3 without any issues. You can basically follow the dialogues and choose the standard configs. These links might help:

https://doc.opensuse.org
https://doc.opensuse.org/documentation/leap/reference/html/book-reference/cha-nfs.html

There’s a lot of mount options. I’d say you have to choose for yourself. For example, in my small personal network I prefer “no-root-squash” so I can change permissions etc. in the mounted folders. Many here might object to that option for security reasons. Here is IMHO a good overview:

https://www.golinuxcloud.com/unix-linux-nfs-mount-options-example/

Cheers,
kasi

Hi kasi and thanks for the reply and links. I was already using the cha-nfs document but as usual, my experience is slightly different from the descriptions in the manual. I have been trying to use NFSv4 and cannot yet get a connection. The earlier thread (June) explained the same issues I found but I couldn’t follow the solutions to a successful conclusion.

Hi and thanks again for the links. Perhaps you didn’t try this lately or used an earlier version. My experience recently is that I cannot get NFS to work. I used it a good deal in the past but now AFAIAC the YaST2 method is broken.

Do you want to set up an NFS Server?
Or, do you want to use NFS as a client to access some NFS servers?
[HR][/HR]If a server then –

  1. Decide very carefully what you want to export and, to where – the world? – your local LAN?. – “man 5 exports” + <Sharing file systems with NFS | Reference | openSUSE Leap 15.5.
  2. Make sure that, the systemd NFS services are enabled as needs be – by default, they’re disabled

 > systemctl list-unit-files | grep -i 'NFS'
proc-fs-nfsd.mount                                                        static          -            
var-lib-nfs-rpc_pipefs.mount                                              static          -            
nfs-blkmap.service                                                        disabled        disabled     
nfs-idmapd.service                                                        static          -            
nfs-mountd.service                                                        static          -            
nfs-server.service                                                        enabled         disabled     
nfs-utils.service                                                         static          -            
nfs.service                                                               enabled         disabled     
nfsserver.service                                                         disabled        disabled     
nfs-client.target                                                         disabled        disabled     
 > 

Looking at ‘/etc/sysconfig/nfs’ I haven’t changed any of the defaults – the server supports both NFS4 and NFS3 – the LAN uses IPv6 – AFAICS, NFS automatically decides whether IPv6 or IPv4 plus NFS4 or NFS3 shall be used – all on it’s own, by it’s self …
[HR][/HR]If a client then –


 > systemctl list-unit-files | grep -i 'autofs'
autofs.service                                                            enabled         disabled     
 > 

For me, as far as NFS is concerned, it’s the most reliable method – yes I know, many dispute that point but, for me, it’s more reliable than anything else …


 > cat /etc/auto.master
#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
#/misc  /etc/auto.misc
/mnt/XXX file:/etc/auto.XXX --timeout=120
# /mnt/CIFS-NAS file:/etc/auto.CIFS-NAS --timeout=120
#
# NOTE: mounts done from a hosts map will be mounted with the
#       "nosuid" and "nodev" options unless the "suid" and "dev"
#       options are explicitly given.
#
#/net   -hosts
#
# Include /etc/auto.master.d/*.autofs
# The included files must conform to the format of this file.
#
#+dir:/etc/auto.master.d
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master
 > 


 > cat /etc/auto.XXX
NFS -rw,hard XXX.Domain:/NFS
 >