NFS - cp: read error: Stale file handle

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
PavelVD
DD-WRT User


Joined: 26 Jul 2019
Posts: 109

PostPosted: Sat Jun 06, 2020 8:40    Post subject: NFS - cp: read error: Stale file handle Reply with quote
The error appears not only when copying files, but, for example, when watching a movie - there is a sudden stop.
The error is not regular, always unexpected, sometimes copying is successful after several attempts. The larger the file size, the higher the chance of error.
Example:
Code:
~ # ls -l /storage/Z/Temp/
total 779256
drwxrwxrwx    1 root     root          8192 May  8 12:41 SCREENSHOT
-rwxrwxrwx    1 root     root      68564136 Jun  6 09:52 TodoBackupFree.exe
-rwxrwxrwx    1 root     root     287493565 Jun  6 09:52 clonezilla-live-2.6.5-21-amd64.zip
-rwxrwxrwx    1 root     root     441885308 Jun  1 08:19 test.mp4

~ # cp /storage/Z/Temp/test.mp4 /storage/Y
cp: read error: Stale file handle
~ # cp /storage/Z/Temp/test.mp4 /storage/Y
cp: read error: Stale file handle
~ # cp /storage/Z/Temp/clonezilla-live-2.6.5-21-amd64.zip /storage/Y
cp: read error: Stale file handle
~ # cp /storage/Z/Temp/TodoBackupFree.exe /storage/Y
~ #
~ # ls -l /storage/Y
total 486479
-rwxr-xr-x    1 root     root      68564136 Jun  6 11:16 TodoBackupFree.exe
-rwxr-xr-x    1 root     root      86507520 Jun  6 11:14 clonezilla-live-2.6.5-21-amd64.zip
-rwxr-xr-x    1 root     root     343080960 Jun  6 11:13 test.mp4


General Information:
Please note: The error also manifested itself on earlier firmware. Because of this, I was always forced to use the SMB protocol. But, as they say, impatient.
Router Model - Linksys WRT1900ACS
Firmware Version - DD-WRT v3.0-r43324 std (06/02/20)
Kernel Version - Linux 4.9.225 #1828 SMP Tue Jun 2 02:30:50 +03 2020 armv7l

A USB drive with three partitions is connected, mounting is automatic:
Code:
~# df -T
Filesystem           Type       1K-blocks      Used Available Use% Mounted on
/dev/root            squashfs       31744     31744         0 100% /
none                 tmpfs            512         0       512   0% /dev
/dev/sda2            ext4         2005076     13712   1869796   1% /jffs
/dev/sda3            ext4         2511276    139092   2224904   6% /opt
/dev/sda1            fuseblk    970983640 447186316 523797324  46% /tmp/mnt/HomeHDD
(Actually /dev/sda1 is an NTFS partition.)
NFS Serve Support Enabled
Code:
~# cat /etc/exports
/mnt/HomeHDD/   192.168.1.1/24(rw,no_subtree_check,no_root_squash,fsid=0)

When the system starts, there is always one yellow and two red lines in the log:
Code:
Jan 1 03:00:22 LinkSYS daemon.warn sm-notify[1463]: Failed to open sm: No such file or directory
Jan 1 03:00:22 LinkSYS daemon.err sm-notify[1463]: Failed to open directory sm.bak: No such file or directory
Jan 1 03:00:22 LinkSYS daemon.err rpc.statd[1462]: Failed to open directory sm: No such file or directory
It may not matter, but it seems this also applies to NFS.

The first mount attempt always gives a red warning:
Code:
Jun 5 23:57:41 LinkSYS daemon.notice rpc.mountd[1908]: authenticated mount request from 192.168.1.103:1014
for /tmp/mnt/HomeHDD (/tmp/mnt/HomeHDD)
Jun 5 23:57:41 LinkSYS daemon.err rpc.mountd[1908]: can't open /var/lib/nfs/rmtab for writing

Mounting, however, is successful:
Code:
~# showmount -a
All mount points on LinkSYS:
192.168.1.103:/tmp/mnt/HomeHDD


Now about the client (there are several of them, for example I take one):
Code:
~ # uname -a
Linux OPi 5.1.16 #1 SMP Wed May 13 19:35:14 MSK 2020 armv7l GNU/Linux

~ # grep nfs /proc/mounts
192.168.1.1:/mnt/HomeHDD /storage/Z nfs rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,
mountaddr=192.168.1.1,mountvers=3,mountproto=tcp,local_lock=all,addr=192.168.1.1 0 0


I ask for advice: how to eliminate the "read error: Stale file handle" errors?
Should I open a ticket? If so, what information to supplement?

_________________
Linksys WRT1900ACSv2
Automatically adjustable temperature, always within the range of 59-68°С.
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Sat Jun 06, 2020 9:21    Post subject: Reply with quote
I do not think DDWRT supports NFS (it can be installed via Entware)

The new in kernel samba is a work in progress, the latest build (43334) could be better (but that it what we are hearing for weeks)

It is not usable with NTFS partitions at least on my router (cannot save, wrong parameter)

I am fortunate to be able to make my own builds and I went back to using Samba36.

But the developers are working on it and there are frequent updates so one of these days it will work Smile

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
PavelVD
DD-WRT User


Joined: 26 Jul 2019
Posts: 109

PostPosted: Sat Jun 06, 2020 10:49    Post subject: Reply with quote
Not supported? Sorry, what then does this setting do - clipping from the Services->NAS page.

I have been using this for quite some time, though with the problems described above.
Or do you mean that it will never be complete? Then advise - which package is from Entware? (Title.)

Regarding Samba: in general, it now works on my router without fatal errors. But the speed of copying files over the LAN from the router to the client does not exceed 50% of the channel capacity. In the opposite direction, the speed is 100%. The ability of ports does not matter, 1Gb or 100Mb - the picture is the same. Today, Wi-Fi 5GHz copy speed is higher than LAN. Well of course I'm waiting for an update.

Still, linux clients are probably better off using NFS.

_________________
Linksys WRT1900ACSv2
Automatically adjustable temperature, always within the range of 59-68°С.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6858
Location: Romerike, Norway

PostPosted: Sat Jun 06, 2020 16:34    Post subject: Reply with quote
I have not seen this NFS Server before. Probably only present on Marvell devices.
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7463
Location: Dresden, Germany

PostPosted: Mon Jun 08, 2020 9:46    Post subject: Reply with quote
Per Yngve Berg wrote:
I have not seen this NFS Server before. Probably only present on Marvell devices.


its available since a while on alot of devices. not just marvell. but only on devices with bigger flash space

_________________
"So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
Failure404
DD-WRT Novice


Joined: 10 Dec 2011
Posts: 37

PostPosted: Tue Jun 09, 2020 13:53    Post subject: Reply with quote
BrainSlayer wrote:
its available since a while on alot of devices. not just marvell. but only on devices with bigger flash space


R7000 does not have enough flash memory...?
I'd really love to have NFS since Samba is basically broken at the moment - booting up a shitty win10 client in my home network is enough to make ksmbd crash and router reboot - using any ddwrt version from 2020 up to r43334.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6858
Location: Romerike, Norway

PostPosted: Tue Jun 09, 2020 15:45    Post subject: Reply with quote
Can we have it on the R7800?
sierratango
DD-WRT Novice


Joined: 22 Jul 2014
Posts: 49

PostPosted: Sat Jan 16, 2021 3:26    Post subject: Reply with quote
Would love to see NFS on D-Link DIR-868L too
StillBlue
DD-WRT User


Joined: 11 Apr 2009
Posts: 257
Location: UK

PostPosted: Wed Mar 24, 2021 17:57    Post subject: Reply with quote
I would love to see NFS as well, but ideally also supporting NFSv2 for my older devices.

I don't want much. Smile

Which NFS server are the devices with it running? nfs-utils or unfs3?
DavidASmith072
DD-WRT Novice


Joined: 31 Dec 2020
Posts: 4

PostPosted: Tue Mar 30, 2021 2:42    Post subject: NFS - cp: read error: Stale file handle Reply with quote
StillBlue wrote:
I would love to see NFS as well, but ideally also supporting NFSv2 for my older devices.

I don't want much. Smile

Which NFS server are the devices with it running? nfs-utils or unfs3?


I am glad to see someone make use of the NFS feature of DD-WRT. I have been trying to figure out how to set up the NFS feature on my Linksys WRT1200AC V2.0 AC1200 DD-WRT FlashRouter. I am using Linux workstations instead of MS Windows and so I prefer to use NFS instead of SAMBA. I have been searching for information on how and where to enter the NFS security password in the Services Tab, Network File Sharing/NAS Sub Tab:



Is this correct?

Then in the USB Tab, I have the following set:



Is this correct?

The client end of nfs isn't a problem. However, as you already know, there's little documentation to the DD-WRT Firmware features in its new releases. I have been wondering if the Firmware automatically takes care of mounting the USB storage device(s) on reboot execution and how to handle shutdowns since the Linksys WRT1200AC Router has no shutdown button?

David A. Smith
portsup
DD-WRT User


Joined: 20 Oct 2018
Posts: 210

PostPosted: Sun Dec 04, 2022 4:42    Post subject: Reply with quote
Failure404 wrote:
BrainSlayer wrote:
its available since a while on alot of devices. not just marvell. but only on devices with bigger flash space


R7000 does not have enough flash memory...?
I'd really love to have NFS since Samba is basically broken at the moment - booting up a shitty win10 client in my home network is enough to make ksmbd crash and router reboot - using any ddwrt version from 2020 up to r43334.


Recently discovered nfs on the xr700 now also wondering why it wasn't on the r7000. Also having trouble with getting it working, getting 'illegal port'.
DavidASmith072
DD-WRT Novice


Joined: 31 Dec 2020
Posts: 4

PostPosted: Sun Dec 04, 2022 20:29    Post subject: Reply with quote
portsup wrote:
Failure404 wrote:
BrainSlayer wrote:
its available since a while on alot of devices. not just marvell. but only on devices with bigger flash space


R7000 does not have enough flash memory...?
I'd really love to have NFS since Samba is basically broken at the moment - booting up a shitty win10 client in my home network is enough to make ksmbd crash and router reboot - using any ddwrt version from 2020 up to r43334.


Recently discovered nfs on the xr700 now also wondering why it wasn't on the r7000. Also having trouble with getting it working, getting 'illegal port'.


The Linksys WRT3200ACM-V1 WiFi Router has plenty of flash memory for what I want to do. I flash to OpenWrt-21.02.1 to make it into a wireless bridge router operating at 5GHz to a Linksys WRT1200AC WiFi Router, which works quite well for me. I also, added NFS server software support to it with a Western Digital WD Elements 6TB USB 3.0 Desktop Hard Drive connected to the USB 3.0 port of the WRT3200ACM router. The setup instructions for the OpenWrt software are pretty good. However, they seem to lack the IP address spacing range between the specified router's IP addresses, (192.168.11.1.xxx), and the NFS server IP addresses, (192.168.12.xxx). Their OpenWrt NFS setup instructions don't mention this issue when combining the OpenWrt NFS server functions with the OpenWrt Wireless Bridge function. This issue has stumped me for a few months now and I have asked about this issue on the OpenWrt Forum and so far no one has an answer. Sad

David A. Smith
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum