OpenWrt Forum Archive

Topic: Using JFFS2 on a flash drive

The content of this topic has been archived on 15 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi guys,

I'd like to use JFFS2 on my flash drive with OpenWrt to reduce its wear.

First, I create a JFFS2 filesystem on my pendrive:

mkfs.jffs2 -d . -q -m none -o /dev/sdb1

Unfortunately I cannot mount the pendrive with JFFS2 neither on my PC nor by OpenWrt.

What could be the problem?

Thanks in advance,

(USB) flash drives, CF, SD-cards, ... have their own wear levelling management, you don't have to do this.
You only need to use such a file system for onboard flash.

Thanks for the info, it's relieving to know that.

However I'd still like to know why I couldn't mount my JFFS2 partition.

I'd also like to know which filesystem is recommended for a flashdrive with OpenWrt.

jffs2 needs knowledge of and direct access to the underlying flash hardward (page size, ...). I think it will not work at all on a normal usb or hard drive.

You should use a file system on your usb drive, which supports linux permissions correctly, and which kernel modules are installed on your system.
I would use ext2 or ext3, if journalling is desired.
Any FAT version is not recommended.

I'll go with ext2, it works like a charm.  Thanks!

The discussion might have continued from here.