What's new

Strange problem with jffs

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Goobi

Regular Contributor
Hello community! I got a strange one I am looking for some guidance on. Below is my jffs space and allocations:

Code:
df -h /jffs/
Filesystem                Size      Used Available Use% Mounted on
/dev/mtdblock8           48.0M     44.0M      4.0M  92% /jffs

du -h /jffs/
1.1M    /jffs/scripts/ntpmerlin.d
15.0K   /jffs/scripts/uiScribe.d
55.5K   /jffs/scripts/uiDivStats.d
1.3M    /jffs/scripts/connmon.d
235.0K  /jffs/scripts/shared-jy
6.0K    /jffs/scripts/.d
3.5M    /jffs/scripts
0       /jffs/syslog.log
0       /jffs/syslog.log-1
1.5K    /jffs/etc
965.5K  /jffs/signature
10.5K   /jffs/configs
375.5K  /jffs/usericon
15.0K   /jffs/nvram
182.0K  /jffs/.sys/AiProtectionMonitor
30.5K   /jffs/.sys/cfg_mnt
2.7M    /jffs/.sys/WebHistory
22.2M   /jffs/.sys/TrafficAnalyzer
19.7M   /jffs/.sys/nc
44.8M   /jffs/.sys
6.0K    /jffs/.cert
21.0K   /jffs/openvpn
49.8M   /jffs/

If I try and overwrite the TrafficAnalyzer.db I get the error below:

Code:
cat /dev/null > /jffs/.sys/TrafficAnalyzer/TrafficAnalyzer.db
-sh: can't create /jffs/.sys/TrafficAnalyzer/TrafficAnalyzer.db: No space left on device

Also writing a dummy file to /jffs fails:
Code:
touch /jffs/test
touch: /jffs/test: No space left on device

lsof does not show any files that may have been deleted from /jffs. I also rebooted.

Short of rebuilding, any suggestions as to how I can make /jffs realize it does have a bit of space to work with?

Thanks in advance!
 
Just had this exact problem myself, unfortunately. It's a pain but not irretrievable, you just need to have a USB drive attached and mounted.

1. back up everything in the /jffs directory to a directory on your flash drive, lets say your drive is named usbdrive and the directory to backup to is jffsback
Code:
cp -pur /jffs/* /mnt/usbdrive/jffsback
cp -pur /jffs/.cert /mnt/usbdirive/jffsback
cp -pur /jffs/.le /mnt/usbdirive/jffsback
cp -pur /jffs/.sys /mnt/usbdirive/jffsback
2. delete the TrafficAnalyzer.db file from the backup
Code:
rm -f /mnt/usbdrive/jffsback/.sys/TrafficAnalyzer/TrafficAnalyzer.db
3. log into the webui and tell it to Format JFFS partition at next boot and reboot
4. after reboot ssh into your router (make sure the jffs was actually wiped, it seemed to require 2 tries when I did it, or I screwed up something the first time)
5. copy everything back
Code:
cp -pur /mnt/usbdrive/jffsback/* /jffs
cp -pur /mnt/usbdrive/jffsback/.cert /jffs
cp -pur /mnt/usbdrive/jffsback/.le /jffs
cp -pur /mnt/usbdrive/jffsback/.sys /jffs
6. reboot
 
Just had this exact problem myself, unfortunately. It's a pain but not irretrievable, you just need to have a USB drive attached and mounted.

1. back up everything in the /jffs directory to a directory on your flash drive, lets say your drive is named usbdrive and the directory to backup to is jffsback
Code:
cp -pur /jffs/* /mnt/usbdrive/jffsback
cp -pur /jffs/.cert /mnt/usbdirive/jffsback
cp -pur /jffs/.le /mnt/usbdirive/jffsback
cp -pur /jffs/.sys /mnt/usbdirive/jffsback
2. delete the TrafficAnalyzer.db file from the backup
Code:
rm -f /mnt/usbdrive/jffsback/.sys/TrafficAnalyzer/TrafficAnalyzer.db
3. log into the webui and tell it to Format JFFS partition at next boot and reboot
4. after reboot ssh into your router (make sure the jffs was actually wiped, it seemed to require 2 tries when I did it, or I screwed up something the first time)
5. copy everything back
Code:
cp -pur /mnt/usbdrive/jffsback/* /jffs
cp -pur /mnt/usbdrive/jffsback/.cert /jffs
cp -pur /mnt/usbdrive/jffsback/.le /jffs
cp -pur /mnt/usbdrive/jffsback/.sys /jffs
6. reboot

Thank you sir! Worked like a champ!
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top