2009-05-14 10:13:45 Safe filesystem on a SD-Card
Patrick Hotz (GERMANY)
Message: 74069
Hi Guys,
i use currently a 2GB SD-Card over SPI with a vfat filesystem.
Normally it works ok but sometimes i loose files or files get corrupted (thats always if i reset the system without a "reboot").
I think thats a problem of the filesystem because vfat is not "reset-safe"....
What filsystem is safe? I think that a flash-filesystem is better than vfat or someting else....
Can somebody give me a short example how i can format my card and mount it? I have tried "mkfs.jffs2" but i dont know what i have to set at all the options....
Regards,
Patrick
TranslateQuoteReplyEditDelete
2009-05-14 10:31:00 Re: Safe filesystem on a SD-Card
Mike Frysinger (UNITED STATES)
Message: 74071
pick any filesystem that has journaling options. FAT is not journaled. the default Linux EXT3 filesystem is journaled.
QuoteReplyEditDelete
2009-05-14 10:45:19 Re: Safe filesystem on a SD-Card
Patrick Hotz (GERMANY)
Message: 74072
Hi Mike,
i have just turned on the ext3 support in kernel but i dont find any options to format this filesystem...
The uClinux is 2008R1 and i can´t use another version (sadly ;-( ).....
TranslateQuoteReplyEditDelete
2009-05-14 10:57:02 Re: Safe filesystem on a SD-Card
Mike Frysinger (UNITED STATES)
Message: 74073
i'm pretty sure e2fsprogs has been in the uclinux-dist forever
otherwise you can download/build it yourself from the e2fsprogs homepage
QuoteReplyEditDelete
2009-05-14 11:03:37 Re: Safe filesystem on a SD-Card
Patrick Hotz (GERMANY)
Message: 74075
That means the e2fsprogs are for ext3 too?
I have thought that the "2" means ext2......
Also i have to use the e2fsprogs to make a filesystem....
TranslateQuoteReplyEditDelete
2009-05-14 14:10:21 Re: Safe filesystem on a SD-Card
Mike Frysinger (UNITED STATES)
Message: 74079
EXT2 was the original filesystem. all subsequent EXT# are handled by e2fsprogs -- the naming is historical at this point.
QuoteReplyEditDelete
2009-05-15 01:47:18 Re: Safe filesystem on a SD-Card
Konstantin Hartwich (GERMANY)
Message: 74086
hey,
try to issue a "sync" command after copying, (thats what happens when you "reboot", some remaining cached data of file system information and/or remaining data gets flushed to device, so you wont loose data..
had the same problems with CF cards and harddisks
so it generally aplies to all kind of storage file systems i think...to ensure data consistency, "sync" before powerdown. there is not that much a matter of journaling file system or not, simply prevent from data getting lost in the cache somewhere.
QuoteReplyEditDelete
2009-05-15 03:13:57 Re: Safe filesystem on a SD-Card
Patrick Hotz (GERMANY)
Message: 74088
Hi,
now i have compiled "ext3" without "ext2" in Kernel and created a filesystem on my SD-Card with mke2fs.
Now i have a problem with mounting the Card:
New MMC/SD card found: 1876 MB(1967128576 bytes)
spi_mmc: unknown partition table
mount: mounting /dev/spi_mmc on /media failed
TranslateQuoteReplyEditDelete
2009-05-15 03:51:21 Re: Safe filesystem on a SD-Card
Patrick Hotz (GERMANY)
Message: 74091
or i use a jffs2 filesystem.
( the only problem i have is that i don´t know how i can create it... mkfs.jffs2 /dev/spi_mmc shows lots of options i can set)
what have to do exactly?
mkfs.jffs2 .......
Regards,
Patrick
TranslateQuoteReplyEditDelete
2009-05-15 05:03:04 Re: Safe filesystem on a SD-Card
Mike Frysinger (UNITED STATES)
Message: 74103
a mmc card is like any other block device. you can either format the entire thing, or partition it up. what you decide determines what device nodes you use.
please review the documentation:
docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:spi_mmc