Suggested Nand File-System: Ubifs


javaJake

Jacob Godserv
Joined
Sep 13, 2007
Messages
1,773
Location
USA
Website
myhumblecorner.wordpress.com
Something for Pandora developers to consider: http://www.plugcompu.../Enabling_UBIFS

Quoting the page:

Why UBIFS instead of JFFS2?
Because it's fast! Also, in theory, the UBI layer should be even smarter than JFFS2 about wear-levelling. But mainly because it's really fast. For reference:

Code:
# Mounting a JFFS2 rootfs from /dev/mtdblock2
 root# mount -t jffs2 /dev/mtdblock2 /mnt/nand
     43.396s total
Compared to:

Code:
# Mounting an UBIFS rootfs from the same NAND partition
 root# ubiattach /dev/ubi_ctrl -m 2 && mount -t ubifs ubi0:rootfs /mnt/nand
     1.488s total
 
Yes this is what we are going to use, it is probably the best choice for NAND, even GPH figured it out and put in on Wiz.
 
Sorry for the stupid NOOB Question, but when I want to access the Pandora NAND via USB cable over my PC (like onto the GP2X), can Windows read (write) onto this File System?
 
fusion_power said:
Sorry for the stupid NOOB Question, but when I want to access the Pandora NAND via USB cable over my PC (like onto the GP2X), can Windows read (write) onto this File System?
In this case the USB slave driver can expose itself as whatever and use the UBIFS background. It basically means that any OS will see it as a FAT32 USB disk, a SMB net share, or whatever the devs decide to expose the unit as.
 
Last edited by a moderator:
so, would this also be the preferable filesystem for the sd-cards? (I don't care about windows-compatibility)
 
conso said:
so, would this also be the preferable filesystem for the sd-cards? (I don't care about windows-compatibility)
The SD card probably runs a similar FS internally, so formatting in this FS on top of another FS with the same functionality is incredibly redundant.
 
Last edited by a moderator:
conso said:
so, would this also be the preferable filesystem for the sd-cards? (I don't care about windows-compatibility)
Read this now and save a lot of trouble:
http://www.linux-mtd.infradead.org/doc/ubifs.html#L_rednote said:
[...] UBIFS does not work on top of block devices (like hard drives, MMC/SD cards, USB flash drives, SSDs, etc). UBIFS was designed to work on top of raw flash [...]
 
Last edited by a moderator:
I would be hesitant to allow the NAND to be exposed via USB. In theory, the NAND shouldn't be touched very often anyway, and giving an easy way to mess with it is asking for trouble. Don't go out of the way to make it inaccessible, of course, but at least put some kind of barrier up so Joe Everyman doesn't plug it in, think he's formatting the SD card, and accidentally wipe out the NAND. That's my thinking, anyway.
 
Sds should probably remain as FAT32 for ease of interoperation, but you can of course use whatever you want. The trouble I've found is that fs's like ext3 are pretty unhappy on flash media when the power is cut, the device crashes, etc. (which happens a lot when you're screwing with the firmware and kernel and so forth :p) FAT32 is pretty resilient to failure .. you lose a few files, but no biggy :)

Anyway yeah, we'll likely use ubifs in nand ..

I forget if anyone has put in the sort of handler for exposing somethign when the device is mounted via usb .. but I'd be in favour of exposing SD1 (say), or something. Hmm..

jeff
 
I hope that feature ships with production Pandoras, as I have a 16GB SDHC card but no SDHC reader. Have been using my (now completely dead) Archos. Have planned to use a mini-usb to move stuff.
 
I hope both SD cards shows up on a PC, that's more practical. Or the possibility of selecting which one. However, I guess you have to put the Pandora in a state where it can't access the cards itself while connected to a PC, like mobile phones does?
 
Awakening said:
I hope both SD cards shows up on a PC, that's more practical. Or the possibility of selecting which one. However, I guess you have to put the Pandora in a state where it can't access the cards itself while connected to a PC, like mobile phones does?
I don't think you'd need to do that if you used a usbnet interface. But it would probably be safer that way.
 
Last edited by a moderator:
Lunatic said:
Awakening said:
I hope both SD cards shows up on a PC, that's more practical. Or the possibility of selecting which one. However, I guess you have to put the Pandora in a state where it can't access the cards itself while connected to a PC, like mobile phones does?
I don't think you'd need to do that if you used a usbnet interface. But it would probably be safer that way.
That's how the Nokia tablets work. It's easy enough for the kernel to expose SD cards as mass storage to the USB, but it has to unmount the card(s) first. No big deal anyway, as Laurencevde points out - there's nothing stopping you from using nfs or cifs (smbfs) or something, if you really need shared storage. sshfs, for example, should work fine. It does on the N900.
 
Last edited by a moderator:
Back
Top