LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Errors while mounting NFS share from Linux to QNAP NAS (https://www.linuxquestions.org/questions/linux-networking-3/errors-while-mounting-nfs-share-from-linux-to-qnap-nas-4175732125/)

mackowiakp 12-25-2023 12:35 AM

Errors while mounting NFS share from Linux to QNAP NAS
 
I'm trying to mount a share from a Linux computer to QNAP via NFS. NOT QNAP NFS share to Linux! Generally, the share mounts, but after the 3rd attempt:

Code:

mount -w -vt nfs -o rw,soft -O user=root,password=pass 192.168.0.2:/something_tam /share/CACHEDEV2_DATA/mnt

Result:
mount.nfs: timeout set for Sat Dec 2 12:31:42 2023
mount.nfs: trying text-based options 'soft,vers=4.2,addr=192.168.0.2,clientaddr=192.168.0.7'
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'soft,vers=4,minorversion=1,addr=192.168.0.2,clientaddr=192.168.0.7'
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'soft,vers=4,addr=192.168.0.2,clientaddr=192.168.0.7'

The problem is probably with the syntax implemented by QNAP. I tried mount.nfs4, types=4 and others. Errors always pop up. Maybe someone knows what the syntax of the mount command should look like in the case of QNAP?

uteck 12-25-2023 06:41 PM

It looks to be trying nfs4.2 first, then retrying lower versions until it gets one that works. Maybe
Code:

mount -w -vt nonfs4 ...
that should skip nfs4, but auto try others. Or try nfs,nonfs4 to specify nfs, but not version4.

michaelk 12-25-2023 08:55 PM

Look at the output of the mount command to see how the share is being mounted. For version 3 it should look something like
Quote:

server:/share on /mount_point type nfs (rw,relatime,vers=3...)
To explicitly mount version 3 try:
Code:

mount -vt nfs -o rw,soft,vers=3 192.168.0.2:/something_tam /share/CACHEDEV2_DATA/mnt
The option -w is the same thing as -o rw

mackowiakp 12-26-2023 12:27 AM

THX - WORKS:

Code:

[/share/homes/media/Pobrane] # /bin/mount -vt nfs -o rw,soft,vers=3 -O user=<user>,password=<pass> 192.168.0.2:/home/maciek/back/RSYNC /share/CACHEDEV2_DATA/mnt
mount.nfs: timeout set for Tue Dec 26 07:28:04 2023
mount.nfs: trying text-based options 'soft,vers=3,addr=192.168.0.2'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.0.2 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.0.2 prog 100005 vers 3 prot UDP port 20048
192.168.0.2:/home/maciek/back/RSYNC on /share/CACHEDEV2_DATA/mnt type nfs (rw,soft,vers=3)


michaelk 12-26-2023 11:51 AM

The nfs client negotiates the version with the server, trying version 4 first, 3 second, and 2 last. You are just seeing the attempts because your using the verbose option (-v) and using vers=3 bypasses the negotiation. Did you verify without the vers option nfs was connecting using version 3? The actual error maybe due to the -w which may not be supported by the QNAP mount command or nfs client.

mackowiakp 12-26-2023 06:42 PM

Installed version of QNAP FW, the NFS server can work with NFS ver 3 and 4.
Versions 2 and 4.2 are not supported by server. I have no information about client.
But of course the problem I have is QNAP NFS client implementation.
It looks very strange. If ver 4 is specified and error is reported but share is mounted anyway:

Code:

[/share/homes/media/Pobrane] # /bin/mount -vt nfs -o rw,soft,vers=4 -O user=<user>,password=<pass> 192.168.0.2:/home/maciek/back/RSYNC /share/CACHEDEV2_DATA/mnt
mount.nfs: timeout set for Wed Dec 27 01:27:00 2023
mount.nfs: trying text-based options 'soft,vers=4.2,addr=192.168.0.2,clientaddr=192.168.0.7'
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'soft,vers=4,minorversion=1,addr=192.168.0.2,clientaddr=192.168.0.7'
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'soft,vers=4,addr=192.168.0.2,clientaddr=192.168.0.7'
192.168.0.2:/home/maciek/back/RSYNC on /share/CACHEDEV2_DATA/mnt type nfs (rw,soft,vers=4)

If ver 3 is specified it works good without errors and negotiation.
Without NFS ver specification, negotiation accrues and share is mounted - as follows:

Code:

[/share/homes/media/Pobrane] # /bin/mount -vt nfs -o rw,soft -O user=<user>,password=<pass> 192.168.0.2:/home/maciek/back/RSYNC /share/CACHEDEV2_DATA/mnt
mount.nfs: timeout set for Wed Dec 27 01:29:47 2023
mount.nfs: trying text-based options 'soft,vers=4.2,addr=192.168.0.2,clientaddr=192.168.0.7'
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'soft,vers=4,minorversion=1,addr=192.168.0.2,clientaddr=192.168.0.7'
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options 'soft,vers=4,addr=192.168.0.2,clientaddr=192.168.0.7'
192.168.0.2:/home/maciek/back/RSYNC on /share/CACHEDEV2_DATA/mnt type nfs (rw,soft)

Bit strange. But not the first strange ones in QNAP FW.


All times are GMT -5. The time now is 07:40 PM.