NFS mount mystery

Hi there,

Short and stupid question, I try to mount a nfs share on my PC from a WD NAS (PR4100) and I face a mystery:

/etc/fstab:

172.26.155.4:/nfs/Test /mnt/NAS/test nfs defaults 0 0

and

sudo mount -a                                                                                                                                                                                                  ✔ 
mount.nfs: access denied by server while mounting 172.26.155.4:/nfs/test

but

sudo mount -t nfs 172.26.155.4:/nfs/Test /mnt/NAS/test

works

And to be complete, on the same machine, I use another share from same PR4100, mounted from fstab with

172.26.155.4:/nfs/Plex /mnt/NAS/plex nfs defaults 0 0

/etc/exports on the PR4100 is

"/nfs/Plex" *(rw,all_squash,sync,no_wdelay,insecure_locks,insecure,no_subtree_check,anonuid=501,anongid=1000)
"/nfs/Test" *(ro,all_squash,sync,no_wdelay,insecure_locks,insecure,no_subtree_check,anonuid=501,anongid=1000)

Does someone see where my error is ?

Thanks

Maybe a silly comment, but…


…but the one T is capital and the other is not. Why that?

Whereas, when you mount it directly, you use a capital T and it works…

If you give in the terminal
sudo mount /mnt/NAS/test
does it get mounted correctly or do you get an error message?

3 Likes

I may be wrong - but I am not sure wildcard is an accepted access policy - in any case it is a recipe for data loss.

[root tip] [How To] Share data using NFS

2 Likes

Good catch. :+1:

@Narsil, UNIX is case-sensitive. That’s why it failed. You have to correct the entry in your /etc/fstab.

:rofl: :rofl: :rofl: :joy:

I new I was stupid ! Thanks @tsapi

@linux-aarhus It works with wildcard, but it’s probably more “orthodox” to have a subnet here, thanks

@Aragorn talking to @Narsil, that’s how all begings my Lord :crown:

But now I have a new problem: from the client, I can create a file or directory in /mnt/test, but I can’t create anything under this point :cry:

1 Like

And I’ve (literally) got Anduril laying on the couch in my living room. :stuck_out_tongue:

(It was a gift from a couple of friends. :wink:)

I’m not an expert on nfs, but you’ve exported it as read-only, and with all_squash. :man_shrugging:

Unfortunately, the elfes haven’t re-shaped me yet :frowning:

It’s exported RW, but the problem is not there : I can create anything at any point using CLI, but not using Dolphin … really don’t get it

Have you logged out and back in? It could be a caching issue.

Nope, persistent to reboot.

Can you please be more detailed? You can create files and directories inside /mnt/NAS/test/ in the terminal but not with dolphin?
With what user can you do that in the terminal? Root or your plain user or maybe with sudo?
What error message do you get in dolphin when trying to create a file / directory inside /mnt/NAS/test/?
Inside dolphin when you right click on the space inside /mnt/NAS/test/ and press Properties, what Permissions (there is tab Permisions in the Property windows) do you see and what user is the owner?
If you run dolphin as root, can you create files / dirs inside /mnt/NAS/test/ ?
In the terminal can you please tell us what permissions you see when you ls -la a file / dir inside /mnt/NAS/test/ ?

I use CLI with the same user as Dolphin.

Using Dolphin, I can create and copy directories and files to /mnt/NAS/test, but nothing under this (can’t create subdirectories, nor copy or create files inside the “second” level. No error message for this, only the “red circle” alongside the cursor when I try to drag-drop a file or directory

On level /mnt/NAS/test, Dolphin shows root as proprietary, and RW for all, that’s coherent with owner and rights seen in CLI.

dolphin --sudo doesn’t allow to write inside /mnt/NAS/test/Level1, Dolphin shows user and group from NFS server side: user “501” (which is the user “nobody”), and mod 744.

Using CLI, I can create and copy directories, subdirectories, files from and to anywhere.

In Dolphin. if I change the rights of the directory to 754, I can create a subdir, but it is created with 744 and I have to change the rights manually to go further.

Is gvfs-nfs installed and enabled?

pacman -Qi gvfs-nfs

As I recall it - when exporting nfs4 - you need to export the root and subfolders as described in the sample exports file

Manjaro defaults to use nfs4 so if your service is exporting nfs3 you will need to tell the client to use nfs3

# Example for NFSv4:
#  /srv/nfs4        hostname1(rw,sync,fsid=0)
#  /srv/nfs4/home   hostname1(rw,sync,nohide)

In your case it translates to

/nfs *(rw,sync,fsid=0)
/nfs/Plex *(rw,all_squash,sync,no_wdelay,insecure_locks,insecure,no_subtree_check,anonuid=501,anongid=1000)
/nfs/Test *(ro,all_squash,sync,no_wdelay,insecure_locks,insecure,no_subtree_check,anonuid=501,anongid=1000)

Your Test folder is mounted readonly and the Plex folder is mound readwrite

1 Like

That’s a very good move @linux-aarhus, the PR4100 exports nfs3

rpcinfo -p 172.26.155.4 | grep nfs                                                                                   
    100003    3   tcp   2049  nfs
    100227    3   tcp   2049  nfs_acl
    100003    3   udp   2049  nfs
    100227    3   udp   2049  nfs_acl

Exports on my PR4100 (server side) is now this:

"/nfs/Plex" 172.26.155.0/24(rw,all_squash,sync,no_wdelay,insecure_locks,insecure,no_subtree_check,anonuid=501,anongid=1000)
"/nfs/Test" 172.26.155.0/24(rw,all_squash,sync,no_wdelay,insecure_locks,insecure,no_subtree_check,anonuid=501,anongid=1000)

And I added nfsvers=3 in the client a side fstab:

172.26.155.4:/nfs/Test /mnt/NAS/test nfs nfsvers=3 0 0

But well, the problem remains

The still strange thing is that I can do what I want using CLI, but not using Dolphin:

Operation CLI Dolphin
Create a file at level /mnt/NAS/test Allowed Allowed
Create a subdirectory “level1” at level /mnt/NAS/test Allowed Allowed
Create a subdirectory “level2” at level /mnt/NAS/test/level1 Allowed Not allowed
Create a file or subdirectory in /mnt/NAS/test/level1/level2 Allowed Not allowed

I absolutely don’t know what this is, but yes, it’s instaled

Good to know that it’s installed and working.

gvfs-nfs allows one to use NFS via Dolphin; much as gvfs-smb does for SAMBA.

Neither of these will happen automatically, until you have first created a new network location. I believe this is essentially the same for either SMB or NFS to access a network location via Dolphin.

Open Dolphin, and go to RemoteNetwork (in the side bar). Then, in the main window (near the top) you should see Add Network Folder. Click this, and use the resulting dialog to create your network location.

When finished, your new location should appear under Remote (next to Network).

All being well (and if your configuration is correct), you should then have access from Dolphin.

Note: This presumes you use KDE. If using another DE, the procedure will no doubt be different.

Hi,

Sorry for the (very) late reply …

So, I do have gvfs-nfs installed

pacman -Qs gvfs-nfs                                                                                                                                                                                             ✔ 
local/gvfs-nfs 1.54.2-1 (gnome)
    Virtual filesystem implementation for GIO - NFS backend

But no nfs showing in menu.

And as you see, all my shares are listed in the “Remote” (Distant, in French) section of the left bar. They are R/W mounted with fstab and totally readable/writable from CLI, and only on the first tree level from Dolphin.

Stranger : I installed Krusader and have R/W control (same as CLI) …

You should not need to use that menu.

I gave you the basic procedure earlier in the thread:


Open Dolphin, and go to RemoteNetwork (in the side bar). Then, in the main window (near the top) you should see Add Network Folder (or Ajouter un dossiers réseau in French). Click this, and use the resulting dialog to create your network location.

When finished, your new location should appear under Remote (next to Network).

All being well (and if your configuration is correct), you should then have access from Dolphin.


Please click Ajouter un dossiers réseau (Add Network Folder) near the top of the window as previously described, and complete the connection details via the resulting dialog.

Beyond that, I can help no further.

Good luck.

Thanks @soundofthunder for your answer, but I don’t find any nfs choice in this dialog either


And as you see, the nfs shares are already mounted and listed in the “Remote” section of the left sidebar
image

If these shares are what you previously created then I presume it must be working. Why you cannot create a new network folder via the dialog I’m afraid I do not know.


Update:-

I found a few comments on KDE Discuss from a KDE developer (meven);

I’ll try to summarise:

Apparently nfs:// was removed in KDE Gears 6 due to a lack of resources to port it to the new API. It may be reintroduced in the future if there is enough User demand.


So, this explains why NFS is missing from the dialogs; it has been removed.

Creating a network location via gvfs-nfs on the command-line still works (as you have found) and those shares seem to be found by Dolphin, so, I dare say this is the best you might achieve for the time being.

Good luck.