Joined: 05 Oct 2008 Posts: 666 Location: Helsinki, Finland / nr. Alkmaar, Netherlands
Posted: Wed Jun 01, 2022 9:08 Post subject: JFFS on thumbdrive filesystem error (after reboot)
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:
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?
Joined: 31 Jul 2021 Posts: 2146 Location: All over YOUR webs
Posted: Wed Jun 01, 2022 10:36 Post subject:
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.
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.
Joined: 05 Oct 2008 Posts: 666 Location: Helsinki, Finland / nr. Alkmaar, Netherlands
Posted: Wed Jun 01, 2022 15:18 Post subject:
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.