On 22/02/2021 00:46, Jerome Lille wrote:
I tried to simply change type from nfs to nfs4 in the fstab in the client. Unfortunately I then get the response
mount.nfs4: access denied by server while mounting ...
There is nothing in the server logs about this. And it is not the firewall, because even when I turned it off, I get the same access denied.
Anything else I have to change?
My exportfs is very simple, just /path/to/export client(rw)
Well, it should just "work". I have a centos7 nfs server and using F33 as the client. In this example, the F33 client doesn't have an fstab entry for the mount.
On the server side....
[root@cos7 ~]# cat /etc/exports /home/egreshko 2001:b030:112f:2::0/64(rw,sync,insecure,no_root_squash,no_subtree_check) /home/egreshko 192.168.0.0/16(rw,sync,insecure,no_root_squash,no_subtree_check)
[root@cos7 ~]# firewall-cmd --info-zone=public public (active) target: default icmp-block-inversion: no interfaces: eth0 sources: services: dhcpv6-client mountd nfs nfs3 rpc-bind ssh ports: protocols: masquerade: no forward-ports: source-ports: icmp-blocks: rich rules:
Then on the client side....
[egreshko@meimei ~]$ sudo mount 192.168.122.5:/home/egreshko /mnt [egreshko@meimei ~]$ df -T | grep 122 192.168.122.5:/home/egreshko nfs4 29599744 5197056 24402688 18% /mnt
I have not made any changes to the nfs server configuration file /etc/nfs.conf so the defaults are in effect.
# vers2=n # vers3=y # vers4=y # vers4.0=y # vers4.1=y # vers4.2=y
Check to make sure these haven't been altered.