Nfs client does not see any subdirectoeris

I have set up nfs to be able to access files (movies/music) with my LinuxTVBox. But somehow the client does not see any subdirectories. What have I done wrong?

This is what I have done so far

lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda           8:0    0 931,5G  0 disk 
└─sda1        8:1    0 931,5G  0 part /srv/nfsv4/Share
                                      /run/media/swh/Mediathek
sdb           8:16   0 931,5G  0 disk /srv/nfsv4/Filme
                                      /run/media/swh/Stuff
sdc           8:32   0 223,6G  0 disk 
└─sdc1        8:33   0 223,6G  0 part /run/media/swh/SSD
sdd           8:48   0   3,6T  0 disk 
└─sdd1        8:49   0   3,6T  0 part /srv/nfsv4/Mediathek
                                      /run/media/swh/NFS
nvme0n1     259:0    0 232,9G  0 disk 
├─nvme0n1p1 259:1    0 230,9G  0 part /
└─nvme0n1p2 259:2    0     2G  0 part /efi
nvme1n1     259:3    0 931,5G  0 disk 
└─nvme1n1p1 259:4    0 931,5G  0 part /home
`
mkdir and --bind

`
sudo mkdir -p /srv/nfsv4/

sudo mkdir /srv/nfsv4/Share

sudo mkdir /srv/nfsv4/Filme

sudo mkdir /srv/nfsv4/Mediathek

sudo mount --bind /run/media/swh/Mediathek/Share /srv/nfsv4/Share

sudo mount --bind /run/media/swh/Stuff/Filme /srv/nfsv4/Filme

sudo mount --bind /run/media/swh/NFS/Mediathek/ /srv/nfsv4/Mediathek
`

add to fstab

`/run/media/swh/Mediathek/Share/ /srv/nfsv4/Share/ none bind 0 0

/run/media/swh/Stuff/Filme/ /srv/nfsv4/Filme/ none bind 0 0

/run/media/swh/NFS/Mediathek/ /srv/nfsv4/Mediathek/ none bind 0 0`

/etc/exports

`
/srv/nfsv4 192.168.178.0/24(rw,fsid=root)
/srv/nfsv4/Filme 192.168.178.0/24(rw,sync)
/srv/nfsv4/Share 192.168.178.0/24(rw,sync)
/srv/nfsv4/Mediathek 192.168.178.0/24(rw,sync)

`

enable and start nfsv4-server

sudo systemctl enable nfsv4-server.service
sudo systemctl start nfsv4-server.service

status nfsv4-server.service

● nfsv4-server.service - NFSv4 server and services
     Loaded: loaded (/usr/lib/systemd/system/nfsv4-server.service; enabled; preset: disabled)
     Active: active (exited) since Tue 2025-04-08 13:41:57 CEST; 1h 8min ago
 Invocation: b8a3b46dd9f644149f556c0c3164bebe
    Process: 1010 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
    Process: 1012 ExecStart=/usr/sbin/rpc.nfsd -N 3 (code=exited, status=0/SUCCESS)
   Main PID: 1012 (code=exited, status=0/SUCCESS)
   Mem peak: 1.9M
        CPU: 10ms

Apr 08 13:41:57 starship systemd[1]: Starting NFSv4 server and services...
Apr 08 13:41:57 starship systemd[1]: Finished NFSv4 server and services.

check with exports -v

sudo exportfs -v
/srv/nfsv4      192.168.178.0/24(sync,wdelay,hide,no_subtree_check,fsid=0,sec=sys,rw,secure,root_squash,no_all_squash)
/srv/nfsv4/Filme
                192.168.178.0/24(sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,root_squash,no_all_squash)
/srv/nfsv4/Share
                192.168.178.0/24(sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,root_squash,no_all_squash)
/srv/nfsv4/Mediathek
                192.168.178.0/24(sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,root_squash,no_all_squash)

I dont see any share sign in my subdirectories

I have reinstalled eos but this configuration worked with my previous installation.
I must have missed something. Maybe someone can take a look at this and help me figure out where my logical mistake lies

Are you sure your user has permission to see them? And that they’re ‘real’ vs links? I’ve never seen NFS not export subdirectories :wink:

The directories and subdirectories are exported. I just can’t see them on my clients. All the client shows are main directories

1 Like

Here are the user permissions on /nfsv4

/srv/nfsv4 🔒                                                                                                                                                                       
 ❯  ls -ld
drwxr-xr-x - root  7 Apr 20:01  .

/srv/nfsv4 🔒                                                                                                                                                                   
 ❯  ls    
 Filme
 Mediathek
 Share

/srv/nfsv4/Filme                                                                                                                                                                
 ❯  ls -ld
drwxrwxr-x - swh 26 Sep  2024  .

/srv/nfsv4/Mediathek                                                                                                                                                            
 ❯  ls -ld
drwxr-xr-x - swh 26 Sep  2024  .

/srv/nfsv4/Share                                                                                                                                                               
 ❯  ls -ld
drwxr-xr-x - swh 14 Feb 21:45  .




There might be something wrong with it :person_shrugging:

Well best suggestion I can actually make is to simplify and make it work, then start adding complications till it breaks.
It’s rather hard to experiment, when I can’t touch it :0

No expert but IIRC I once had something like that because uid and gid in server and client were not the same.

1 Like

I’m not sure this would help but this is how i did nfs shares (still using nfs V3)

/media/seagate *(rw,sync,no_root_squash,no_subtree_check,insecure)
Insecure is needed for kodi

And in my config file there are examples and they mention this:

# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)

I don’t know what no_subtree_check does but it might be related to your issue?

My config file is from Ubuntu Server as i have that running as server here

I set up my server years ago and did not remember what my exportfs looked lik, so I I had a look:

/SSD2TB  *(sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,root_squash,no_all_squash)

As @fred666 I also have a * to denote that the share is universal or ‘worldwide’, I believe.

Try adding “crossmnt” or “nohide” to your /etc/exports?

I have changed my exports but no change.

the entry nohide did not bring about any change either

ok gonna try that

Don’t forget to re-export those directories again after you change a setting there and will probably be useful to unmount and re-mount on your nfs client to see if it still works for the main directories and if you then also see the sub-directories then.

Done but no change.

Ok again for understanding. In the folder level srv/nfsv4/ I have a share symbol in Dolphin, as you can see in the picture above. In the folder levels /srv/nfsv4/ FIlme/Mediathek and Share I have no share symbol. This must have something to do with permissions. In my client I see the folder levels Filme/Mediathek/Share but without content
With the correct setup or appropriate permissions, I should see a share icon in Dolphin in the folder level below /srv/nsfv4/*

Looking at your /etc/fstab it looks like you are binding a directory that is mounted by dolphin to another location. What happens when you directly mount the nfs share in your /etc/fstab instead of binding mounting what dolphin mounts as nfs, that would look something like this?

192.168.100.10:/srv/nfsv4/Share /mnt/Share nfs _netdev 0 0

I will think about that.

What I don’t understand, exactly the same setup worked on this machine with this client in my previous eos installation without any problems. At the time, I made a note of every step I had to take to be able to integrate an nfs.

You don’t have to make a decision now, just try it out now and see what happens then. If it works then you will know the problem lies with dolphin and if it doesn’t work you will know the problem lies elsewhere and not with dolphin.

1 Like

I mean i will try it tomorrow. I just wanted to make myself comfortable and finish reading my book :wink:

1 Like

You don’t want to solve the tech mysteries of the universe, right now?

The story is as mystique as the tech universe :rofl:

The Universe is mystique :rofl:

1 Like

I was just searching around and came across this topic.

Do you have both kio-zeroconf and kio-extras installed?