JFFS on thumbdrive filesystem error (after reboot)

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Wed Jun 01, 2022 9:08    Post subject: JFFS on thumbdrive filesystem error (after reboot) Reply with quote
My R7800 keeps it's dnsmasq.leases and reserved IP's file on a thumbdrive.
In general this works fine.

However, every now and then, after a reboot, the JFFS partition will show a high percentage of used diskspace (up to 100%), whereas in reality it is almost empty. The partition is unwriteable in this state.

To correct this, I unmount the drive using the second from left button, pull the thumbdrive and run the disks utility on it using a linux laptop.
After reinserting the drive into the router it will be mounted and diskspace usage is back to normal.

There's a shutdown script on my router unmounting the partitions, but it doesn't prevent the error in the JFFS partition's filesystem:

# AR - 02-05-2022
logger -t --- "Shutdown script: Stopping rc.unslung"
/opt/etc/init.d/rc.unslung stop
sleep 5
logger -t --- "Shutdown script: Unmounting /jffs and /opt"
umount -l /jffs
umount -l /opt
sleep 5

For one thing this error possibility makes updating without physical access a risky proposition.

I would like to prevent the error from happening or as an alternative have a way to repair the file system with a command on the router, possibly incorporating that in the startup script ....

Any advice is welcome.
Are there others who experience the same error?
Sponsor
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Wed Jun 01, 2022 10:36    Post subject: Reply with quote
Please state your current version of firmware.

Generally you need to enable JFFS2 and at the same time enable Clean Internal Flash Storage (YES) and apply settings. If you don't, the JFFS partition may not be in a proper usable state. (logs will tell you what is going on)

You should think about posting syslogs (enabled on Services tab) and accessed via terminal on /var/logs/messages (copy that file to desktop and attach it to the reply)

It could be that because JFFS is using internal router flash storage and if you generally use that partition to do a lot of writes, that it may cause issues or even kill some blocks or that partition, or it could be you never erased the JFFS before you started using it, we wont know until we have those logs.

NOTE Clean Internal Flash Storage erases the JFFS partition contents. So if there is anything you can actually copy out before if at all possible do it else it will be lost.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2029

PostPosted: Wed Jun 01, 2022 12:33    Post subject: Reply with quote
Enabling JFFS2 along with a jffs partition on external drive is known to cause problems.

Is you drive formatted as ext partition not NTFS?
And labeled "jffs" and "opt", not mounted by UUID?

Maybe try a different thumb drive, they do get trashed.

I have 3 routers with external jffs and opt (and other) partitions mounted with no problems.
2 are thumb drives.
1 is old sata HHD from old laptop connected with esata cable on R7800.
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Wed Jun 01, 2022 15:18    Post subject: Reply with quote
I had both JFFS2 enabled and a /jffs partition, and the Use JFFS2 for client lease DB option enabled even though it was not recommended.
The reason was that before, when I tried without JFFS2 enabled, the dnsmasq.leases file would go to flash memory (/tmp) and not to /jffs partition.

However, today, on build 48971, a lot of builds later, after disabling JFFS2 and rebooting, it looks like dnsmasq.leases is written to the /jffs partition, and getting updated.

After these changes, I hope and expect the jffs partitions file system error problem is a thing of the past ...

The thumbdrive partitions are ext2 and called /jffs and /opt. They mount automatically by virtue of their names.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Jun 01, 2022 17:25    Post subject: Reply with quote
bushant wrote:
Enabling JFFS2 along with a jffs partition on external drive is known to cause problems.


Exactly!

_________________
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
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC 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 cannot attach files in this forum
You cannot download files in this forum