views:

165

answers:

1

I found this site: http://www.pjrc.com/tech/8051/ide/fat32.html Basically it's a great overview of the FAT32 filesystem. It so far has proven to be very easy to understand,

I was wondering if anyone out there knew of any similar documents/how-to's for different Linux Filesystems, I am interested in how they store data on drives!

I did a few searches from google on etx3 specifications and whatnot but am not finding much more then, it's basically etx2 with journaling...etc, not descriptions of how the data is organized and how to access

Thank you for any and all help.

+2  A: 

A good starting point is to grab the kernel sources, make menuconfig and enter the Filesystems menu. There are some very nice filesystems for microcontrollers - CROMFS and CRAMFS - very small compressed read-only (CROM) or non-persistent read-write(CRAM) filesystems that require special tools to create but provide really small memory and disk footprint, Fossil which provides RW but no directory hierarchy (perfect for data storage combined with CROMFS), several more advanced filesystems intended specifically for flash media, like JFFS or YAFFS. You may also look into UnionFS which allows you to overlay two filesystems, say a ROM-based OS with Flash-based overwritten pieces and RAM-based temporary versions. There is a bunch of other filesystems. If any catches your fancy, there's more about it in Documentation/Filesystems, and then if you want to know more, read the sources.

FAT is a murderer for flash-based non-wear-protected devices, as file allocation table is written to the same location over and over. EXT3 isn't very good for flash too.

SF.
I'm looking for something that I can read in a PC when i'm done though....I.E. I'm going to store Accelerometer data to a "txt" file (if I can figure out how to work that), then when I put the SD card into my PC I can open the data and read it, if it's not FAT or one of the compatible one's will the OS read it?
onaclov2000
What kind of microcontroller - how much resources do you have?A fully-featured Debian clone with Ext2 or FAT partition for your data will work fine on 32MB RAM and 100MHz CPU. uCLinux on 1MB RAM + 4MHz CPU will do better with CROMFS though. Also, what will the PC be running? A Linux you supply, or user-owned Windows? If it's Windows, you're stuck with FAT. If it's a Linux of your choice, you can support some microcontroller's native FS like YAFFS2 freely.
SF.
The PC will likely be an XP since that's what the school is using mostly, as far as the microcontroller it's a PIC 16F913. I'm not building an OS or anything, I just want to store data that's readable by an OS later once we're done logging the data. I kinda wanna stick with some mainline COTS type stuff as far as the SD and information stored.
onaclov2000
In this case you're pretty much stuck with FAT, unless you are willing to write a Windows tool that reads the data for you. Which may be the best way to go: ignore filesystems altogether, write the raw data directly to the medium, and read it the same way, using low-level procedures and never caring for files, filesystems, directories etc on the microcontroller - and using a dedicated reader/converter tool on the PC to read it from the SD (which would become unreadable/"unformatted" for anything but your reader utility)
SF.
I wasn't sure if the comp would recognize the SD card if it wasn't a file format I.E. it would complain that it's not formatted, then that would be a bit of a hassle, cause I would have to be developing on both sides of the fence.
onaclov2000
Yes, it would complain and you'd need to ignore it. OTOH programming "both sides of the fence" while having all PC resources at your disposal is much easier than trying to do it all in microcontroller.
SF.