You are not logged in.

#1 2015-10-31 17:00:58

kinematik
Member
From: Seville, Spain
Registered: 2015-04-07
Posts: 8

NFS Connection not working

Hello, I have an old  Synology NAS, and I would like to stop using Samba/CIFS and moving to NFS, mainly becuase of performance issues with media files. First question would be what is better CIFS or NFS?

I was able to start the NFS server in my NAS, and I can see the server exported system from my Arch linux client:

showmount -e synology.local
Export list for synology.local:
/volume1/quino *

However I follow the Arch wiki instruction, starting in the Client Section

systemctl start rpcbind.service
systemctl start nfs-client.target
systemctl start remote-fs.target

The answer to this command is always:

<b>A dependency job for remote-fs.target failed. See 'journalctl -xe' for details.</b>

journal -xe |grep nfs
oct 31 17:28:51 PCArch kernel: NFS: nfs4_discover_server_trunking unhandled error -22. Exiting with error EIO
oct 31 17:53:44 PCArch kernel: NFS: nfs4_discover_server_trunking unhandled error -22. Exiting with error EIO
oct 31 17:53:44 PCArch mount[18510]: mount.nfs4: mount system call failed

If I try to mount manually the exported NFS server, I get a similar error

sudo mount -t nfs synology.local:/volume1/quino /home/quino/synology-quino/
mount.nfs: mount system call failed

Unfortunately I don find any reference to the <b>error -22</b> in NFS. Any help?

Thank you in advanced.

Offline

#2 2015-11-02 12:51:21

kinematik
Member
From: Seville, Spain
Registered: 2015-04-07
Posts: 8

Re: NFS Connection not working

Searching information about the error code -22 in NFS, i found that is an error code related to EINVAL, I do not have any idea about the meaning of this error code.

However following a Fedora forum thread, It is recommended to use tcpdump to debug this kind o issues, therefore I installed and run tcpdump, and found the following traffic in relation to NFS:
Synology NAS Server has the local IP address 192.168.1.52
My PC (client NFS), has hostname: PCQuino-Arch

13:41:47.740096 IP PCQuino-Arch.38884 > 192.168.1.52.commplex-link: Flags [P.], seq 4533:5179, ack 4014, win 314, options [nop,nop,TS val 97319999 ecr 66977941], length 646
13:41:47.742815 IP PCQuino-Arch.38888 > 192.168.1.52.commplex-link: Flags [S], seq 4281369236, win 29200, options [mss 1460,sackOK,TS val 97320000 ecr 0,nop,wscale 7], length 0
13:41:47.743067 IP 192.168.1.52.commplex-link > PCQuino-Arch.38884: Flags [.], ack 5179, win 4054, options [nop,nop,TS val 66978021 ecr 97319999], length 0
13:41:47.746369 IP 192.168.1.52.commplex-link > PCQuino-Arch.38888: Flags [S.], seq 196367890, ack 4281369237, win 5792, options [mss 1460,sackOK,TS val 66978021 ecr 97320000,nop,wscale 2], length 0
13:41:47.746414 IP PCQuino-Arch.38888 > 192.168.1.52.commplex-link: Flags [.], ack 1, win 229, options [nop,nop,TS val 97320001 ecr 66978021], length 0
13:41:47.746785 IP PCQuino-Arch.38888 > 192.168.1.52.commplex-link: Flags [P.], seq 1:518, ack 1, win 229, options [nop,nop,TS val 97320001 ecr 66978021], length 517
13:41:47.747489 ARP, Request who-has gateway tell 192.168.1.45, length 46
13:41:47.750589 IP 192.168.1.52.commplex-link > PCQuino-Arch.38888: Flags [.], ack 518, win 1716, options [nop,nop,TS val 66978021 ecr 97320001], length 0
13:41:47.751803 IP 192.168.1.52.commplex-link > PCQuino-Arch.38888: Flags [P.], seq 1:138, ack 518, win 1716, options [nop,nop,TS val 66978021 ecr 97320001], length 137
13:41:47.751837 IP PCQuino-Arch.38888 > 192.168.1.52.commplex-link: Flags [.], ack 138, win 237, options [nop,nop,TS val 97320002 ecr 66978021], length 0
13:41:47.776529 IP PCQuino-Arch.38888 > 192.168.1.52.commplex-link: Flags [P.], seq 518:569, ack 138, win 237, options [nop,nop,TS val 97320010 ecr 66978021], length 51
13:41:47.776693 IP PCQuino-Arch.38888 > 192.168.1.52.commplex-link: Flags [P.], seq 569:1216, ack 138, win 237, options [nop,nop,TS val 97320010 ecr 66978021], length 647
13:41:47.779869 IP 192.168.1.52.commplex-link > PCQuino-Arch.38888: Flags [.], ack 1216, win 2040, options [nop,nop,TS val 66978024 ecr 97320010], length 0
13:41:47.877309 ARP, Request who-has 192.168.1.45 (Broadcast) tell gateway, length 46
13:41:48.057141 IP PCQuino-Arch.721 > 192.168.1.52.shilp: Flags [S], seq 408181209, win 29200, options [mss 1460,sackOK,TS val 97320094 ecr 0,nop,wscale 7], length 0
13:41:48.059783 IP 192.168.1.52.shilp > PCQuino-Arch.721: Flags [S.], seq 196556283, ack 408181210, win 5792, options [mss 1460,sackOK,TS val 66978052 ecr 97320094,nop,wscale 2], length 0
13:41:48.059835 IP PCQuino-Arch.721 > 192.168.1.52.shilp: Flags [.], ack 1, win 229, options [nop,nop,TS val 97320095 ecr 66978052], length 0
13:41:48.059902 IP PCQuino-Arch.721 > 192.168.1.52.shilp: Flags [P.], seq 1:45, ack 1, win 229, options [nop,nop,TS val 97320095 ecr 66978052], length 44: NFS request xid 1202131995 40 null
13:41:48.063303 IP 192.168.1.52.shilp > PCQuino-Arch.721: Flags [.], ack 45, win 1448, options [nop,nop,TS val 66978053 ecr 97320095], length 0
13:41:48.063333 IP 192.168.1.52.shilp > PCQuino-Arch.721: Flags [P.], seq 1:29, ack 45, win 1448, options [nop,nop,TS val 66978053 ecr 97320095], length 28: NFS reply xid 1202131995 reply ok 24 null
13:41:48.063361 IP PCQuino-Arch.721 > 192.168.1.52.shilp: Flags [.], ack 29, win 229, options [nop,nop,TS val 97320096 ecr 66978053], length 0
13:41:48.063614 IP PCQuino-Arch.721 > 192.168.1.52.shilp: Flags [P.], seq 45:293, ack 29, win 229, options [nop,nop,TS val 97320096 ecr 66978053], length 248: NFS request xid 1218909211 244 getattr fh 0,2/42
13:41:48.067358 IP 192.168.1.52.shilp > PCQuino-Arch.721: Flags [P.], seq 29:69, ack 293, win 1716, options [nop,nop,TS val 66978053 ecr 97320096], length 40: NFS reply xid 1218909211 reply ok 36 getattr ERROR: unk 10021
13:41:48.069029 IP PCQuino-Arch.721 > 192.168.1.52.shilp: Flags [F.], seq 293, ack 69, win 229, options [nop,nop,TS val 97320098 ecr 66978053], length 0
13:41:48.069252 IP PCQuino-Arch.dhcp-failover2 > 192.168.1.52.shilp: Flags [S], seq 2060201082, win 29200, options [mss 1460,sackOK,TS val 97320098 ecr 0,nop,wscale 7], length 0
13:41:48.073130 IP 192.168.1.52.shilp > PCQuino-Arch.dhcp-failover2: Flags [S.], seq 203434532, ack 2060201083, win 5792, options [mss 1460,sackOK,TS val 66978053 ecr 97320098,nop,wscale 2], length 0
13:41:48.073171 IP PCQuino-Arch.dhcp-failover2 > 192.168.1.52.shilp: Flags [.], ack 1, win 229, options [nop,nop,TS val 97320099 ecr 66978053], length 0
13:41:48.073176 IP 192.168.1.52.shilp > PCQuino-Arch.721: Flags [F.], seq 69, ack 294, win 1716, options [nop,nop,TS val 66978053 ecr 97320098], length 0
13:41:48.073188 IP PCQuino-Arch.721 > 192.168.1.52.shilp: Flags [.], ack 70, win 229, options [nop,nop,TS val 97320099 ecr 66978053], length 0
13:41:48.073234 IP PCQuino-Arch.dhcp-failover2 > 192.168.1.52.shilp: Flags [P.], seq 1:45, ack 1, win 229, options [nop,nop,TS val 97320099 ecr 66978053], length 44: NFS request xid 1739573894 40 null
13:41:48.076328 IP 192.168.1.52.shilp > PCQuino-Arch.dhcp-failover2: Flags [.], ack 45, win 1448, options [nop,nop,TS val 66978054 ecr 97320099], length 0
13:41:48.076352 IP 192.168.1.52.shilp > PCQuino-Arch.dhcp-failover2: Flags [P.], seq 1:29, ack 45, win 1448, options [nop,nop,TS val 66978054 ecr 97320099], length 28: NFS reply xid 1739573894 reply ok 24 null
13:41:48.076375 IP PCQuino-Arch.dhcp-failover2 > 192.168.1.52.shilp: Flags [.], ack 29, win 229, options [nop,nop,TS val 97320100 ecr 66978054], length 0
13:41:48.076483 IP PCQuino-Arch.dhcp-failover2 > 192.168.1.52.shilp: Flags [P.], seq 45:293, ack 29, win 229, options [nop,nop,TS val 97320100 ecr 66978054], length 248: NFS request xid 1756351110 244 getattr fh 0,1/42
13:41:48.080356 IP 192.168.1.52.shilp > PCQuino-Arch.dhcp-failover2: Flags [P.], seq 29:77, ack 293, win 1716, options [nop,nop,TS val 66978054 ecr 97320100], length 48: NFS reply xid 1756351110 reply ok 44 getattr ERROR: Invalid argument
13:41:48.082432 IP PCQuino-Arch.dhcp-failover2 > 192.168.1.52.shilp: Flags [F.], seq 293, ack 77, win 229, options [nop,nop,TS val 97320102 ecr 66978054], length 0
13:41:48.085388 IP 192.168.1.52.shilp > PCQuino-Arch.dhcp-failover2: Flags [F.], seq 77, ack 294, win 1716, options [nop,nop,TS val 66978055 ecr 97320102], length 0
13:41:48.085410 IP PCQuino-Arch.dhcp-failover2 > 192.168.1.52.shilp: Flags [.], ack 78, win 229, options [nop,nop,TS val 97320102 ecr 66978055], length 0
13:41:48.193492 IP 192.168.1.52.commplex-link > PCQuino-Arch.38884: Flags [P.], seq 4014:4594, ack 5179, win 4054, options [nop,nop,TS val 66978066 ecr 97319999], length 580
13:41:48.193553 IP PCQuino-Arch.38884 > 192.168.1.52.commplex-link: Flags [.], ack 4594, win 335, options [nop,nop,TS val 97320135 ecr 66978066], length 0
13:41:48.543928 IP gateway > 239.2.0.252: igmp query v2 [max resp time 10] [gaddr 239.2.0.252]
13:41:48.726200 IP c2.52.c0ad.ip4.static.sl-reverse.com.https > PCQuino-Arch.52990: Flags [P.], seq 3310345889:3310345920, ack 3028084915, win 130, options [nop,nop,TS val 3431265919 ecr 97317294], length 31
13:41:48.726374 IP PCQuino-Arch.39669 > 250.Red-80-58-61.staticIP.rima-tde.net.domain: 26238+ PTR? 194.82.192.173.in-addr.arpa. (45)
13:41:48.726410 IP PCQuino-Arch.52990 > c2.52.c0ad.ip4.static.sl-reverse.com.https: Flags [P.], seq 1:36, ack 31, win 341, options [nop,nop,TS val 97320295 ecr 3431265919], length 35
13:41:48.753898 IP PCQuino-Arch.38884 > 192.168.1.52.commplex-link: Flags [P.], seq 5179:5827, ack 4594, win 335, options [nop,nop,TS val 97320303 ecr 66978066], length 648
13:41:48.756319 IP 192.168.1.52.commplex-link > PCQuino-Arch.38884: Flags [.], ack 5827, win 4388, options [nop,nop,TS val 66978122 ecr 97320303], length 0
13:41:48.773728 ARP, Request who-has gateway tell 192.168.1.36, length 46
13:41:48.847423 IP 192.168.1.49 > 239.2.0.252: igmp v2 report 239.2.0.252
13:41:48.900742 IP 192.168.1.52.commplex-link > PCQuino-Arch.38884: Flags [P.], seq 4594:5114, ack 5827, win 4388, options [nop,nop,TS val 66978136 ecr 97320303], length 520
13:41:48.900783 IP PCQuino-Arch.38884 > 192.168.1.52.commplex-link: Flags [.], ack 5114, win 355, options [nop,nop,TS val 97320347 ecr 66978136], length 0

the most representative message is:

13:41:48.080356 IP 192.168.1.52.shilp > PCQuino-Arch.dhcp-failover2: Flags [P.], seq 29:77, ack 293, win 1716, options [nop,nop,TS val 66978054 ecr 97320100], length 48: NFS reply xid 1756351110 reply ok 44 getattr ERROR: Invalid argument

I think it could be a version mismatch, so I issued the following command in my Synology NAS Server:

root@synology /etc # rpcinfo
   program version netid     address                service    owner
    100000    4    tcp6      ::.0.111               -          superuser
    100000    3    tcp6      ::.0.111               -          superuser
    100000    4    udp6      ::.0.111               -          superuser
    100000    3    udp6      ::.0.111               -          superuser
    100000    4    tcp       0.0.0.0.0.111          -          superuser
    100000    3    tcp       0.0.0.0.0.111          -          superuser
    100000    2    tcp       0.0.0.0.0.111          -          superuser
    100000    4    udp       0.0.0.0.0.111          -          superuser
    100000    3    udp       0.0.0.0.0.111          -          superuser
    100000    2    udp       0.0.0.0.0.111          -          superuser
    100000    4    local     /var/run/rpcbind.sock  -          superuser
    100000    3    local     /var/run/rpcbind.sock  -          superuser
    100021    1    udp       0.0.0.0.221.110        -          unknown
    100021    3    udp       0.0.0.0.221.110        -          unknown
    100021    4    udp       0.0.0.0.221.110        -          unknown
    100021    1    tcp       0.0.0.0.203.23         -          unknown
    100021    3    tcp       0.0.0.0.203.23         -          unknown
    100021    4    tcp       0.0.0.0.203.23         -          unknown
    100021    1    udp6      ::.217.108             -          unknown
    100021    3    udp6      ::.217.108             -          unknown
    100021    4    udp6      ::.217.108             -          unknown
    100021    1    tcp6      ::.225.245             -          unknown
    100021    3    tcp6      ::.225.245             -          unknown
    100021    4    tcp6      ::.225.245             -          unknown
    100003    2    tcp       0.0.0.0.8.1            -          unknown
    100003    3    tcp       0.0.0.0.8.1            -          unknown
    100003    4    tcp       0.0.0.0.8.1            -          unknown
    100003    2    udp       0.0.0.0.8.1            -          unknown
    100003    3    udp       0.0.0.0.8.1            -          unknown
    100003    4    udp       0.0.0.0.8.1            -          unknown
    100005    1    udp       0.0.0.0.3.124          -          superuser
    100005    1    tcp       0.0.0.0.3.124          -          superuser
    100005    2    udp       0.0.0.0.3.124          -          superuser
    100005    2    tcp       0.0.0.0.3.124          -          superuser
    100005    3    udp       0.0.0.0.3.124          -          superuser
    100005    3    tcp       0.0.0.0.3.124          -          superuser
    100024    1    udp       0.0.0.0.196.211        -          superuser
    100024    1    tcp       0.0.0.0.128.76         -          superuser

It seems that is able to answer message of both NFS versions: NFS v3 and v4.

Offline

#3 2015-11-02 16:36:19

pekka
Member
Registered: 2011-07-21
Posts: 104

Re: NFS Connection not working

In arch wiki "It is HIGHLY recommended to use a time sync daemon such as ntp on all nodes to keep client/server clocks in sync."


Try use ip address, not hostname ?

Offline

#4 2015-11-08 10:07:30

kinematik
Member
From: Seville, Spain
Registered: 2015-04-07
Posts: 8

Re: NFS Connection not working

pekka wrote:

In arch wiki "It is HIGHLY recommended to use a time sync daemon such as ntp on all nodes to keep client/server clocks in sync."


Try use ip address, not hostname ?

Thank you for your hints. I tried them both, and I still get the same error.

I think the problem could be that my 2009 synology NAS is pretty outdated. I will try to update to the latest version using IPKG, or I will stay using CIFS. The manufacturer does not provide any update since long time back...

Last edited by kinematik (2015-11-08 10:07:59)

Offline

#5 2018-03-25 11:40:03

resuxunil
Member
Registered: 2013-05-20
Posts: 11

Re: NFS Connection not working

I just encountered the same problem. I have a very up-to-date Linux system trying to access an older Synology NAS. The problem seems to be NFSv4 related. I could solve the problem by making it mount with NFSv3. This is a work-around, but at least I have NFS access to my NAS...

Just add nfsvers=3 to your mount options, e.g.

mount -t nfs -o nolock,posix,nfsvers=3 synology.local:/volume1/quino /home/quino/synology-quino/

I use Gentoo Linux and never ever used Arch Linux, but a lot of Linux problems aren’t very distribution specific anyway. So I hope I can help or that someone can help me…
¤
If I ever start writing code, I’ll probably end up writing umaintainable code – not because I can, but because I cannot…

Offline

Board footer

Powered by FluxBB