Posted: Mon Sep 12, 2022 17:41 Post subject: Erroneous space usage being reported by DDWRT
Router: Linksys WRT3200ACM, gateway, wlan0 and wlan1 enabled as AP, USB core and storage enabled w/auto drive mount, NAS/Samba shares enabled, JFFS2 enabled, miniDLNA enabled, OVPN server enabled
DD-WRT: r50057
I was wondering if anyone could shed some light on why space usage is erroneously reported. I have a USB flash drive installed that has 4 partitions: opt (ext2), jffs (ext2), swap, and data (exfat). The drive mounts just fine and opt is mounted to /opt, jffs is mounted to /jffs, swap mounted to swap, and data to /mnt/sda4. I have Entware installed in /opt and the miniDLNA has put its DB in /jffs as expected (size 94 KB). Space usage is reported correctly for all partitions except /jffs. The partition size is correct, but space used is incorrect. It is waaaay too big (see screenshots). In the jffs2 section of the Administration tab, the free space is reported as greater than the total.
I followed the instructions for enabling and cleaning jffs2 (enable jffs2, save, wait, apply, enable clean, apply, reboot, then disable clean and save). I even repeated the process but still same issue. I don't know if this is just a benign glitch or if there is something more significant going on. For what its worth, I have another WRT3200ACM set up the same way with a USB flash drive partitioned the same way running 50057 as well and it reports usage correctly.
It is highly advised to not have JFFS2 Storage enabled as well as having jffs partition mounted on removable storage.
This may as well be where your problem comes from.
When setting this up, I was referencing the jffs guide in the wiki: https://wiki.dd-wrt.com/wiki/index.php/JFFS and under section 3.2 ("Add USB Storage") it said to also enable jffs2 so that is what I did. If I turn off jffs2 support in the GUI, do I still have "support" by simply having a /jffs partition mounted?
If you create and label the partition as "jffs" (without quotes) it will automount as /jffs. This is superior to enabling JFFS2. (Which has been blamed for bricking routers at upgrade)
If you create and label the partition as "jffs" (without quotes) it will automount as /jffs. This is superior to enabling JFFS2. (Which has been blamed for bricking routers at upgrade)
Same to create /opt.
Yup, that's what I did when I created the partitions on the USB flash drive and they are mounted to /opt and /jffs. I turned off jffs2 support and rebooted. No change. Still reports 2227% utilization of the 2GB jffs partition when there is only a 94KB dlna database file on it. Perhaps its the USB flash drive itself since my other wrt3200 set up the same way (with jffs2 support enabled) reports usage correctly. I will try again with a different USB drive to see what happens.
I have submitted a patch to at least fix the bar going off the rails.
The rest no idea, you should upgrade to a newer build and retest.
Well, no luck. I formatted a new USB flash drive with the same partition schemes (but different sizes) and still same issue. I upgraded to 50146 (no reset) and no change. Then, reset and started all over and still the same issue. Only the jffs partition is reported erroneously. I changed the partition sizes on the new USB flash drive and it still reports as 16 Exabytes used on a 1, 2, or 4 GB partition. JFFS2 support is disabled. So, it doesn't appear to be a conflict with jffs2 support, the USB drive, partition size, etc. However, everything seems to work fine so I am just going to ignore the bar going off the rails and move on. Maybe something will fail to give me more insight and I can figure it out from there. Looking forward to the patch.... my OCD thanks you.
Joined: 06 Jun 2006 Posts: 7463 Location: Dresden, Germany
Posted: Wed Sep 14, 2022 11:37 Post subject:
the jffs storage is calculated by available flash space on the internal flash memory. now you mounted usb drive to /jffs. so its logic that such strange values are displayed. its not the internal flash memory which is supposed to be used for /jffs. for custom other drives you may use /mmc or /usr/local or even /opt. custom hacks are not considered by the gui _________________ "So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s