Posted: Sun May 14, 2023 16:37 Post subject: No space left on jffs filesystem?
I enabled multipart downloads for easyddup by uncommenting MULTIPART=8 in easyddup.ini(.sample) and after downloading the latest firmware update, I saw a message about no space left on the device while it was joining the parts together. Alarmed by this, I quit easyddup (q) without updating, rebooted the router (R7000), cleared the fwcache, and removed easyddup.ini to avoid using multipart dowloads.
Now, even the regular download complains of no more space:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
35 26.4M 35 9615k 0 0 538k 0 0:00:50 0:00:17 0:00:33 564k
curl: (23) Failure writing output to destination
rm: can't remove './fwcache/05-13-2023-r52509/netgear-r7000/netgear-r7000-webflash.bin': No space left on device
curlerror=23
Downloaded file OK.
Of course I did not continue to flash that file. The root filesystem seems to be full. What could be the issue? EDIT: 100% use seems normal for the read-only squashfs root filesystem, as confirmed by checking another dd-wrt router.
Code:
# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 24.5M 24.5M 0 100% /
none 512.0K 0 512.0K 0% /dev
/dev/mtdblock/5 93.8M 26.6M 67.1M 28% /jffs
Last edited by fizikz on Mon May 15, 2023 18:55; edited 2 times in total
Joined: 26 Mar 2013 Posts: 1857 Location: Hung Hom, Hong Kong
Posted: Sun May 14, 2023 19:05 Post subject:
fizikz wrote:
I checked on my other R7000 and df -h on it also shows the root filesystem having no free space, so maybe that's normal.
/var/tmp is empty and /tmp has only 458.0KB
....
Not sure what is out of free space, but until I figure that out, I don't think I should try upgrading..
Is your /jffs on external USB drive?
On easyddup or easyddup.sh:
Can you specify a temp directory with ample space?
Did you switch to a certain small directory before executing that command?
No, /jffs is on the router itself, and the status page usage shows there is plenty of space left: 27.94 MB / 98.30 MB
If I try to wipe the cache of the last firmware download attempt, it fails due to lack of space, similar to before:
Code:
# ./easyddup.sh -W
Wipe entire firmware cache? Type YES to wipe entire cache: YES
Wiping entire firmware cache...
rm: can't remove './fwcache/05-13-2023-r52509/netgear-r7000/netgear-r7000-webflash.bin': No space left on device
Done
No, manually doing "touch netgear-r7000-webflash.bin", "rm ./fwcache/05-13-2023-r52509/netgear-r7000/netgear-r7000-webflash.bin", "cp /dev/null > [any file]", "true >| [any file]" all give the same "No space left on device. I've been trying to find any way to free up space, but jffs is only 28% used..
Also, for whatever it's worth:
Code:
# df -i
Filesystem Inodes Used Available Use% Mounted on
/dev/root 3109 3109 0 100% /
none 30637 116 30521 0% /dev
/dev/mtdblock/5 0 0 0 0% /jffs
ChatGPT says: "It's worth noting that the /dev/mtdblock/5 filesystem, which represents the JFFS partition, shows 0 inodes used. This is likely due to the different filesystem types used for /dev/root (squashfs) and /dev/mtdblock/5 (JFFS). The inode usage and availability are specific to each filesystem."
Joined: 26 Mar 2013 Posts: 1857 Location: Hung Hom, Hong Kong
Posted: Mon May 15, 2023 8:14 Post subject:
fizikz wrote:
No, manually doing "touch netgear-r7000-webflash.bin", "rm ./fwcache/05-13-2023-r52509/netgear-r7000/netgear-r7000-webflash.bin", "cp /dev/null > [any file]", "true >| [any file]" all give the same "No space left on device. I've been trying to find any way to free up space, but jffs is only 28% used..
It seems that your /jffs was 100% read-only. Did you enable JFFS2?
What if you executed "cd" before running easyddup? That should take you back to root's home directory /tmp/root, which is usually writable. If that's also readonly, something has gone wrong.
Are you root? run "whoami".
I don't use easyddup but the WEBUI to do firmware upgrade so I am just guessing. _________________ Router: Asus RT-N18U (rev. A1)
Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!
I still don't know what originally caused the problem though.
Yes, I checked with "mount" that /jffs was read-write (rw) and not read-only (ro).
/tmp was writable. Instead of removing, I tried copying a file from /jffs to /tmp and that too failed with a message about I/O error.
At some point I had disabled/re-enabled jffs2 through the webgui, and also formatted it, but it never seemed to take effect even though there were messages to that effect in the router's logs. I know modules reloaded and I *thought* I had rebooted it, but apparently not...
Now after setting up easyddup again, I have upgraded to r52569 without issues. I did see a message about a read-only file system at the end of the update process which got me a bit nervous, but it was successful, and afterwards I checked that /jffs is still writeable.
Code:
Burning ./fwcache/05-15-2023-r52569/netgear-r7000/netgear-r7000-webflash.bin
WARNING: DO NOT INTERRUPT...
WAIT FOR BURN TO COMPLETE (at least 5 minutes)
tee: ./easyddup.log: Read-only file system
Done burning
tee: ./easyddup.log: Read-only file system
Rebooting...
easyddup.log also exists, and contains all the messages up to the "Burning" line above, but not past it.
Joined: 26 Mar 2013 Posts: 1857 Location: Hung Hom, Hong Kong
Posted: Tue May 16, 2023 3:39 Post subject:
fizikz wrote:
Problem solved... by rebooting!
I still don't know what originally caused the problem though.
Thank you for reporting the solution. Didn't think about rebooting the router. But I always turn off the router every night to let it "sleep".
I would say always turn off the router after firmware upgrade and reboot. The first reboot after firmware upgrade might not guarantee the router hardware to be at a clean, stable state. _________________ Router: Asus RT-N18U (rev. A1)
Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!