jffs/jffs2 USB mount not showing full capacity

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
EdJanx
DD-WRT Novice


Joined: 09 Nov 2016
Posts: 14

PostPosted: Sat Feb 25, 2017 18:06    Post subject: jffs/jffs2 USB mount not showing full capacity Reply with quote
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:

- /dev/sda1 = 10.2 GB Linux swap (overkill?)
- /dev/sda2 = 24.7 GiB EXT4 @ /opt (for YAMon)
- /dev/sda3 = 23.5 GB EXT3 @ /jffs

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_Status-page.png



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.
 Filesize:  48.63 KB
 Viewed:  14549 Time(s)

DD-WRT_USB-Support_config.png


Sponsor
hubermania
DD-WRT User


Joined: 24 Aug 2012
Posts: 223

PostPosted: Sat Feb 25, 2017 19:29    Post subject: Reply with quote
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/
hubermania
DD-WRT User


Joined: 24 Aug 2012
Posts: 223

PostPosted: Sat Feb 25, 2017 19:43    Post subject: Reply with quote
Yup, you should definitely disable JFFS2 Support on the Administration tab. My router status:

Code:
Space Usage
NVRAM         4 KB / 64 KB
CIFS             (Not mounted)
JFFS2          (Not mounted)

Disk Info
Diskspace /       100%        22.1M / 0
Diskspace /dev     0%                0 / 512.0K
Diskspace /jffs      0%        53.3M / 12.0G
Diskspace /opt    19%     180.5M / 776.2M

_________________
[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/
EdJanx
DD-WRT Novice


Joined: 09 Nov 2016
Posts: 14

PostPosted: Sat Feb 25, 2017 23:22    Post subject: Reply with quote
Thanks Hubermania!

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.

root@R7000:/ls -ltr
drwxr-xr-x 2 root root 3 Feb 3 05:15 jffs

/jfss also appears to be read-only:

root@R7000:/jffs# mkdir tmp
mkdir: can't create directory 'tmp': Read-only file system

root@R7000:/# touch jffs
touch: jffs: Read-only file system

Not sure what my next move would be, but any further guidance is appreciated!

Ed Janx
hubermania
DD-WRT User


Joined: 24 Aug 2012
Posts: 223

PostPosted: Sun Feb 26, 2017 4:00    Post subject: Reply with quote
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/
EdJanx
DD-WRT Novice


Joined: 09 Nov 2016
Posts: 14

PostPosted: Sun Feb 26, 2017 17:26    Post subject: Reply with quote
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.
 Filesize:  95.68 KB
 Viewed:  14464 Time(s)

WinSCP_root-dev-directory.png


KYong
DD-WRT Novice


Joined: 27 Feb 2017
Posts: 3

PostPosted: Mon Feb 27, 2017 6:21    Post subject: Reply with quote
Volume name "JFFS"
Volume name "OPTWARE"

Try to change Volume names as above w/ capital letters and remove uuid settings for /jffs and /opt
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12917
Location: Netherlands

PostPosted: Mon Feb 27, 2017 10:40    Post subject: Reply with quote
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? Sad



DDWRT USB storage support.doc
 Description:

Download
 Filename:  DDWRT USB storage support.doc
 Filesize:  509.5 KB
 Downloaded:  524 Time(s)


_________________
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
EdJanx
DD-WRT Novice


Joined: 09 Nov 2016
Posts: 14

PostPosted: Mon Feb 27, 2017 14:17    Post subject: Reply with quote
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. Smile

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!

Regards,
Ed Janx
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC 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 can attach files in this forum
You can download files in this forum