Posted: Sat Feb 25, 2017 18:06 Post subject: jffs/jffs2 USB mount not showing full capacity
Hello. First time poster but been reading frequently for over a year to get where I am today. I've been using Kong's DD-WRT on my R7000 Nighthawk successfully now for almost a year. I had the usual newbie trials and tribulations, but I'm over-clocked at 1200 MHz, and running smooth.
I'm currently running Firmware: DD-WRT v3.0-r31205M kongac (02/03/17), with OpenVPN configured successfully with a PureVPN lifetime subscription. I'm also running YAMon 3.2.4, for on /opt for monitoring, and sharing /jffs on the same USB may be my concern.
To frame this for you properly, I struggled with many cheap USB drives, so I bought a SanDisk Extreme USB 3.0 (to match y R7000's USB 3 port), with 245 MB read & 190 MB write. It was highly reviewed for durability for long term read/write operations, so I wanted to do this one last time after burning through many cheap USB's that would loose /opt.
I used MiniTool Partition Wizard 10, and after many failed attempts to get a clean DD-WRT auto-mount on the prior USBs, I suggest formatting the below as primary partitions, not physical. The result was the SanDisk 64GB auto-mounted successfully per below:
Per the attached screenshots, my issue is that that DD-WRT only recognizes 94 MB of the 22 GB available on /jffs
My initial intent is to offload the DD-WRT's Ststus --> Syslog Tab , as well as the Client Lease DBs to /jffs, but I also want the flexibility for extra storage options, perhaps for persistent scripts or variables.
Perhaps I simply shouldn't be running YAMon on /opt on the same USB with an /jffs EXT3 partition, but any advice is appreciated!
Thanks,
Ed Janx[/img]
DD-WRT_Status-page.png
Description:
DD-WRT Status tab, showing only 93.75 available for /JFFS2
Filesize:
67.29 KB
Viewed:
14549 Time(s)
DD-WRT_USB-Support_config.png
Description:
DD-WRT USB Configuration tab, showing successful mount of /jffs @ 21.9 GB, with only 91.4 MB available.
Multiple partitions on a single USB are not an issue. I used gparted to partition a 16GB stick into swap, ext2 named "opt", and ext2 named "data". The swap and opt parititions automount, and I mount "data" to jffs using the UUID. SSH into the router and post the results of running "mount". This will tell you where each partition is mounted. If JFFS2 Support is enabled on the Administration tab, the onboard flash will overshadow your USB jffs partition. _________________ [Broadcom] Asus rt-ac66u r35531 ('66 should only be factory reset through the DD UI)
Fix RT-AC66U "wl1 [2.4 GHz TurboQAM]". DD-WRT failsafe UI @ http|https://169.254.255.1/
I disabled jffs2, rebooted, but no matter how many times I enable/disable 'auto mount' or 'usb support', and many reboots, I always see the following from DD-WRT USB tab, and the only difference I see is that the jffs mount is missing a "Last mounted at "/jffs" entry like opt.
--- /dev/sda2
Block device, size 24.70 GiB (26520584192 bytes)
Ext4 file system
Volume name "opt"
UUID E1FFA037-CD8B-D201-60FE-A037CD8BD201 (NCS)
Last mounted at "/opt"
Volume size 24.70 GiB (26520584192 bytes, 12949504 blocks of 2 KiB)
/dev/sda2 mounted to /opt
--- /dev/sda3
Block device, size 23.54 GiB (25274875904 bytes)
Ext3 file system
Volume name "jffs"
UUID 7FDEDD44-CD8B-D201-405C-DD44CD8BD201 (NCS)
Volume size 23.54 GiB (25274875904 bytes, 12341248 blocks of 2 KiB)
/dev/sda3 mounted to /jffs
Per your request, here is the output from running 'mount' from Putty:
root@R7000:/# mount
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
ramfs on /tmp type ramfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=512K)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
devpts on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda2 on /opt type ext4 (rw,relatime,data=ordered)
From Putty, I can see that jffs was last accessed 22 days ago, which is before I formatted and mounted this USB drive.
Try clearing the UUIDs in the Administration screen. DD should be smart enough to mount "opt" on /opt and "jffs" on /jffs. Another thing to try - not sure it'll help - is formatting your jffs partition as ext2 which is unjournaled. The UI and mount command will show show it as either "ext2" or "ext4". _________________ [Broadcom] Asus rt-ac66u r35531 ('66 should only be factory reset through the DD UI)
Fix RT-AC66U "wl1 [2.4 GHz TurboQAM]". DD-WRT failsafe UI @ http|https://169.254.255.1/
Great suggestions @hubermania, thanks, but no luck. I did find a post you made on a prior thread (http://www.dd-wrt.com/phpBB2/viewtopic.php?p=1041847), and I feel I may be able to leverage it if I could get past one stumbling block:
- Insert the thumb drive into an available USB slot
- Enable Core USB Support on the Services->USB tab
- Enable USB Storage Support on the Services->USB tab
- Enable Automatic Drive Mount on the Services->USB tab
- Do not have any entry yet for "Mount this Partition to /jffs"
- Click Apply Settings
- Reboot the router at the bottom of the Administration tab
- At this point, you'll want to copy the contents of your JFFS2 storage to your thumb drive. Go to Services->USB tab and see where the USB partition got mounted, i.e. /tmp/mnt/sda1. Copy everything under /jffs into that mounted directory.
This is where I get stuck, as I can't find my *supposedly mounted* /jffs as displayed under Services --> USB. Per your guide, I don't see anything like "/tmp/mnt/sda1" for my USB jffs. Per below, the Services -> USB GUI displays mine as "/dev/sda3 mounted to /jffs" I've attached a screenshot of what I see under /dev, and there is no sda3 folder, only a file.
--- /dev/sda3
Block device, size 23.54 GiB (25274875904 bytes)
Ext3 file system
Volume name "jffs"
UUID 7FDEDD44-CD8B-D201-405C-DD44CD8BD201 (NCS)
Volume size 23.54 GiB (25274875904 bytes, 12341248 blocks of 2 KiB)
/dev/sda3 mounted to /jffs
This is my mount, and I can't find the above anywhere when searching with WinSCP:
root@NighthawkR7000:/# mount
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
ramfs on /tmp type ramfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=512K)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
devpts on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda2 on /opt type ext4 (rw,relatime,data=ordered)
So I can't get through the rest of your guide since I can't copy the internal /jffs to my USB partition if I can't find it.
Remaining steps if I could copy the internal jffs contents to my USB stick:
- Go go back and disable JFFS2 support in DD-WRT.
- Go back to Services->USB and look for the UUID of your thumb drive partition in the Disk Info section.
- Copy and paste that UUID into the box marked "Mount this Partition to /jffs".
- Click Apply Settings
- Reboot the router at the bottom of the Administration tab.
- Go back to Services->USB tab, and the Disk Info section should now show the partition mounted to /jffs
WinSCP_root-dev-directory.png
Description:
WinSCP view of root/dev directory. There is no /sda3 folder as specified in the DD-WRT Services -> USB Web UI, only a file with 644 permissions.
Joined: 18 Mar 2014 Posts: 12917 Location: Netherlands
Posted: Mon Feb 27, 2017 10:40 Post subject:
jffs and opt are mounted under root, where you can find them with winSCP, other partitons (besides swap) can be found under /tmp/mnt/sdax
see the attached doc file for installation instructions
It is possible that the router is confused because you started with jffs2 enabled, mabe you must reset to default/erase nvram and start over from scratch?
Thanks @KYong for the helpful advice, but I tried it without success.
@egc this is an excellent guide. One I wish I had before I started this journey.
I think this is a bug that I should report, as the NVRAM must be retaining the local /jffs mount setting, despite toggling the various DD-WRT controls with recommended restarts. Opinions?
I may have no choice to erase nvram, and I'm also going to re-partition the drive but will need to figure out how to backup my YAMon3 first. So, I know what I'll be doing when I get home form work!