You are not logged in.

#1 2023-02-10 14:44:34

menteith
Member
Registered: 2022-01-18
Posts: 50

Cannot connect to NFS share

Hi,

I'd like to set up NFS share. I tried to follow excellent tutorial on this topic but I've probably missed something. Other computers in my network do see my NFS share ie. the directories I'd like to share) but they cannot see the contents of the directories. Here's my config files:

$ cat /etc/exports

 /srv/nfs        192.168.0.1/24(ro,sync,crossmnt,subtree_check,fsid=0)
 /srv/nfs/fpkg  192.168.0.1/24(ro,subtree_check,subtree_check,sync)
$ cat /etc/fstab
# NFS Share
 /home/michal/Downloads/PS4          /srv/nfs/fpkg   none        bind    0   0
$ cat /etc/iptables/iptables.rules
-A INPUT -p tcp -m tcp --dport 2049 -j ACCEPT

What I am missing?


Long time Debian user who switched to Arch.

Offline

#2 2023-02-10 15:13:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,383

Re: Cannot connect to NFS share

I tried to follow excellent tutorial

*tried* to follow *which* "excellent" tutorial?

cannot see the contents of the directories

I'd firt and foremost remove the subtree_check, don't forget to "exportfs -arv" and then this might be a simple permission issue, try "all_squash".

Edit: and disable your iptables, why aren't 111 and 20048 open?
https://wiki.archlinux.org/title/NFS#Fi … figuration

Last edited by seth (2023-02-10 15:15:15)

Offline

#3 2023-02-14 18:56:51

menteith
Member
Registered: 2022-01-18
Posts: 50

Re: Cannot connect to NFS share

Very sorry for late reply. I got sick.
I put  "all_squash", removed "subtree_check", opened  ports 111 and 20048 and then run "exportfs -arv" . Unfortunately, I cannot connect to the share.
I'm curious why NFS server starts and immediately quits:

$ sudo systemctl status nfs-server.service 
Feb 14 16:32:34 arch systemd[1]: Starting NFS server and services...
Feb 14 16:32:34 arch exportfs[754]: exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.0.1/24:/srv/nfs".
Feb 14 16:32:34 arch exportfs[754]:   Assuming default behaviour ('no_subtree_check').
Feb 14 16:32:34 arch exportfs[754]:   NOTE: this default has changed since nfs-utils version 1.0.x
Feb 14 16:32:34 arch exportfs[754]: exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.0.1/24:/srv/nfs/fpkg".
Feb 14 16:32:34 arch exportfs[754]:   Assuming default behaviour ('no_subtree_check').
Feb 14 16:32:34 arch exportfs[754]:   NOTE: this default has changed since nfs-utils version 1.0.x
Feb 14 16:32:35 arch systemd[1]: Finished NFS server and services.

Long time Debian user who switched to Arch.

Offline

#4 2023-02-14 20:24:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,383

Re: Cannot connect to NFS share

I'm curious why NFS server starts and immediately quits:

That's not the entire status, is it?
Does it say "active (exited)" and are there a bunch of nfsd processes running ("ps aux | grep nfs")?

One more thing

Other computers in my network do see my NFS share ie. the directories I'd like to share) but they cannot see the contents of the directories

What OS are those computers running and how do they "see" shares and paths?

Can you

nfs-ls -R nfs://192.168.0.X/srv/nfs

on the host that runs the nfs server?
(replace 192.168.0.X w/ its actual LAN IP)

Offline

#5 2023-02-14 20:32:46

menteith
Member
Registered: 2022-01-18
Posts: 50

Re: Cannot connect to NFS share

seth wrote:

I'm curious why NFS server starts and immediately quits:

That's not the entire status, is it?
Does it say "active (exited)" and are there a bunch of nfsd processes running ("ps aux | grep nfs")?

One more thing

Other computers in my network do see my NFS share ie. the directories I'd like to share) but they cannot see the contents of the directories

What OS are those computers running and how do they "see" shares and paths?

Can you

nfs-ls -R nfs://192.168.0.X/srv/nfs

on the host that runs the nfs server?
(replace 192.168.0.X w/ its actual LAN IP)

Thanks for you swift reply.
Yes, systemctl says exited. I tried to connect with Chromecast 3.0 (using Kodi) and with PS4.


Here's output of ps aux:

$ ps aux | grep nfs
root         438  0.0  0.0   5300  2792 ?        Ss   16:32   0:00 /usr/sbin/nfsdcld
root         744  0.0  0.0   2920   144 ?        Ss   16:32   0:00 /usr/sbin/nfsv4.exportd
root         767  0.0  0.0      0     0 ?        S    16:32   0:00 [nfsd]
root         768  0.0  0.0      0     0 ?        S    16:32   0:00 [nfsd]
root         769  0.0  0.0      0     0 ?        S    16:32   0:00 [nfsd]
root         770  0.0  0.0      0     0 ?        S    16:32   0:00 [nfsd]
root         771  0.0  0.0      0     0 ?        S    16:32   0:00 [nfsd]
root         772  0.0  0.0      0     0 ?        S    16:32   0:00 [nfsd]
root         773  0.0  0.0      0     0 ?        S    16:32   0:00 [nfsd]
root         774  0.0  0.0      0     0 ?        S    16:32   0:00 [nfsd

And some interesting stuff regarding permissions:

$ nfs-ls -R nfs://192.168.0.214/srv/nfs
Failed to mount nfs share : mount_cb: RPC error: Mount failed with error MNT3ERR_ACCES(13) Permission denied(13)

**EDIT**
And one more thing:

$ sudo dmesg | grep id_resolver

does not return anything.

Last edited by menteith (2023-02-14 20:39:31)


Long time Debian user who switched to Arch.

Offline

#6 2023-02-14 21:16:27

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,383

Re: Cannot connect to NFS share

Add "insecure" to the export options (don't freak out, that's not "insecure", but allows access from non-privileged ports) and also "nohide" (latter to /srv/nfs/fpkg only, the wiki and manpage disagree on its impact - so let's see)

Offline

#7 2023-02-15 10:53:07

menteith
Member
Registered: 2022-01-18
Posts: 50

Re: Cannot connect to NFS share

I did what you suggested but with no luck - still permission denied. But later I changed 192.168.0.1/24 to arch (my hostname) in exports and I could connect from my computer (using nfs-ls -R nfs://arch/srv/nfs/fpkg). Now I will check whether I can connect from other machines and let you know.


Long time Debian user who switched to Arch.

Offline

#8 2023-02-15 11:22:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,383

Re: Cannot connect to NFS share

That's gonna be an IPv4 vs IPv6 issue.

Offline

#9 2023-02-16 21:57:48

menteith
Member
Registered: 2022-01-18
Posts: 50

Re: Cannot connect to NFS share

OK, I'm still not able to connect. I've tried to connect using KODI, PS4 and Windows (tfu!) machine. I've tried to use IP address as well as host name without any luck.

And one thing: I need manually restart ntfs-server.service to be able to connect to NFS using my Linux (server) machine using nfs-ls -R nfs://arch/srv/nfs/fpkg. In other words, when I boot up my Arch I cannot connect to NFS share unless I manually restart ntfs-server.service. Quite weird.


Long time Debian user who switched to Arch.

Offline

#10 2023-02-16 22:07:47

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,383

Re: Cannot connect to NFS share

I need manually restart ntfs-server.service to be able to connect to NFS using my Linux (server) machine using nfs-ls

hostnamectl

If you don't need it, try to https://wiki.archlinux.org/title/IPv6#Disable_IPv6 to check whether this is indeed is an IPv4/IPv6 conflict.
Alternatively try to open the access to "… *(ro,…" and monitor the impact.

using KODI

On what? The local system?

Offline

#11 2023-02-16 22:25:05

menteith
Member
Registered: 2022-01-18
Posts: 50

Re: Cannot connect to NFS share

Here's the output of hostnamectl:

❯ hostnamectl
 Static hostname: arch
       Icon name: computer-desktop
         Chassis: desktop ?
      Machine ID: <removed>
         Boot ID: <removed>
Operating System: Arch Linux                      
          Kernel: Linux 6.1.11-arch1-1
    Architecture: x86-64
 Hardware Vendor: HP
  Hardware Model: HP MP9 G2 Retail System
Firmware Version: N21 Ver. 02.58

I used KOD via Chromecast. I will do what you've suggested and let you know about the results.


Long time Debian user who switched to Arch.

Offline

#12 2023-02-21 22:46:40

menteith
Member
Registered: 2022-01-18
Posts: 50

Re: Cannot connect to NFS share

Sorry for late reply. Once again I've tried to connect with KODI (Chromecast), PS4 and Windows (tfu!). First, I disabled Ipv6. No luck. Then I opened access via *. Still no luck:/


Long time Debian user who switched to Arch.

Offline

#13 2023-02-21 23:09:15

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,383

Re: Cannot connect to NFS share

Can you try to access the share from another linux host in the subnet (just in case this is a second issue and your entertainment hosts only support NFSv3)?

Offline

#14 2023-02-21 23:13:16

menteith
Member
Registered: 2022-01-18
Posts: 50

Re: Cannot connect to NFS share

I haven't checked this at all. I've got two computers, I will run Linux from usb stick on the second computer and let you know.


Long time Debian user who switched to Arch.

Offline

Board footer

Powered by FluxBB