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
     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 /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
Export list for
/home/dolphin/data/k8s/monitoring/infrastructure/jenkins *

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

| improve this answer | |
  • is it possible to mount nfs file system without sudo @Michael Hamption I want to mount it from kubernetes cluster pod. – Dolphin Jul 19 at 11:52
  • 1
    If you place user as one of the options in the fstab, then anybody can mount the filesystem. But if it is in fstab, then it will be automatically mounted when the system boots anyway. – Michael Hampton Jul 19 at 11:58
  • You don't need root privileges if autofs is configured. It will mount nfs server automatically as soon as users accesses the configured path, which is /net/<hostname> by default. – kofemann Jul 20 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.