nfs – mount.nfs: Failed to Apply fstab Options in Fedora 32

linuxnfs

This is my nfs service status in Fedora 32:

[dolphin@MiWiFi-R4CM-srv infrastructure]$ sudo systemctl status nfs-server.service
● nfs-server.service - NFS server and services
     Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled)
    Drop-In: /run/systemd/generator/nfs-server.service.d
             └─order-with-mounts.conf
     Active: active (exited) since Sun 2020-07-19 04:16:50 EDT; 2h 34min ago
    Process: 599370 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
    Process: 599371 ExecStart=/usr/sbin/rpc.nfsd (code=exited, status=0/SUCCESS)
    Process: 599381 ExecStart=/bin/sh -c if systemctl -q is-active gssproxy; then systemctl reload gssproxy ; fi (code=exited, status=0/SUCCESS)
   Main PID: 599381 (code=exited, status=0/SUCCESS)
        CPU: 37ms

Jul 19 04:16:50 MiWiFi-R4CM-srv systemd[1]: Starting NFS server and services...
Jul 19 04:16:50 MiWiFi-R4CM-srv systemd[1]: Finished NFS server and services.

and this is my exports file config in /etc/exports:

[dolphin@MiWiFi-R4CM-srv infrastructure]$ cat /etc/exports
/home/dolphin/data/k8s/monitoring/infrastructure/jenkins *(rw,all_squash)

when I trying to test my nfs servcie using this command :

[dolphin@MiWiFi-R4CM-srv infrastructure]$ mount -t nfs -o v4 192.168.31.2:/home/dolphin/data/k8s/monitoring/infrastructure/jenkins /mnt
mount.nfs: failed to apply fstab options

I am searching from internet but find no one encount this situation.where is going wrong and what shoud I do to fix this?

[dolphin@MiWiFi-R4CM-srv infrastructure]$ showmount -e 192.168.31.2
Export list for 192.168.31.2:
/home/dolphin/data/k8s/monitoring/infrastructure/jenkins *

Best Answer

It requires root privilege to mount a remote filesystem. Thus you should do sudo mount ...