No space left on jffs filesystem?

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
fizikz
DD-WRT User


Joined: 10 Nov 2016
Posts: 265

PostPosted: Sun May 14, 2023 16:37    Post subject: No space left on jffs filesystem? Reply with quote
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:

Code:
Downloading https://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2023/05-13-2023-r52509/netgear-r7000/netgear-r7000-webflash.bin ...

  % 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
Sponsor
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1857
Location: Hung Hom, Hong Kong

PostPosted: Sun May 14, 2023 18:53    Post subject: Re: No space left on root filesystem? Reply with quote
fizikz wrote:
Of course I did not continue to flash that file. The root filesystem seems to be full. What could be the issue?

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

Most likely it's /tmp and /var/tmp! You can use the following command to check the sizes of various directories/folders at root directory:
Code:
du / -d 1 -h

You can also use "ls -la" to list hidden temp files. Or you can use the find command!

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
fizikz
DD-WRT User


Joined: 10 Nov 2016
Posts: 265

PostPosted: Sun May 14, 2023 19:00    Post subject: Reply with quote
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

Code:
# du -h / -d 1
558.5K   /bin
0   /dev
5.7M   /etc
23.8M   /jffs
15.2M   /lib
0   /mmc
0   /opt
0   /proc
1.7M   /sbin
0   /sys
468.0K   /tmp
65.9M   /usr
0   /www
113.3M   /


Not sure what is out of free space, but until I figure that out, I don't think I should try upgrading..
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1857
Location: Hung Hom, Hong Kong

PostPosted: Sun May 14, 2023 19:05    Post subject: Reply with quote
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?

DD-WRT :: View topic - easyddup a simple upgrade/downgrade utility
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=322503&sid=e73526754dff1b6492f01fa2ac6d06d6
Code:
  -p cache Path to local build cache (default ./fwcache)

If you were at root aka /, then ./fwcache would be ... you know!Smile

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
fizikz
DD-WRT User


Joined: 10 Nov 2016
Posts: 265

PostPosted: Sun May 14, 2023 19:14    Post subject: Reply with quote
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


EDIT: the ./fwcache is at /jffs/easyddup/
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1857
Location: Hung Hom, Hong Kong

PostPosted: Mon May 15, 2023 6:50    Post subject: Reply with quote
fizikz wrote:
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
....
rm: can't remove './fwcache/05-13-2023-r52509/netgear-r7000/netgear-r7000-webflash.bin': No space left on device
....

EDIT: the ./fwcache is at /jffs/easyddup/

Look like it's rm command in the easyddup script that reported the error.

Could you "touch netgear-r7000-webflash.bin"?

Could you manually "rm ./fwcache/05-13-2023-r52509/netgear-r7000/netgear-r7000-webflash.bin"? Same error?

What was the output of "ls -la", "df -h" and "ps | grep easy" when that error was displayed??

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
fizikz
DD-WRT User


Joined: 10 Nov 2016
Posts: 265

PostPosted: Mon May 15, 2023 7:29    Post subject: Reply with quote
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."
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1857
Location: Hung Hom, Hong Kong

PostPosted: Mon May 15, 2023 8:14    Post subject: Reply with quote
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. Smile

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
fizikz
DD-WRT User


Joined: 10 Nov 2016
Posts: 265

PostPosted: Mon May 15, 2023 17:25    Post subject: Reply with quote
Problem solved... by rebooting! Embarassed Rolling Eyes

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.

Thanks for the help @mwchang!
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1857
Location: Hung Hom, Hong Kong

PostPosted: Tue May 16, 2023 3:39    Post subject: Reply with quote
fizikz wrote:
Problem solved... by rebooting! Embarassed Rolling Eyes

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". Smile

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!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware 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 can attach files in this forum
You can download files in this forum