Results 1 to 4 of 4
Hi all,
I have an transcend sd card in my embedded device.when i am running an application to test it gets corrupted once in 100 times or less...
My sd ...
- 11-11-2009 #1Banned
- Join Date
- May 2008
- Posts
- 2
SD card partition corrupted
Hi all,
I have an transcend sd card in my embedded device.when i am running an application to test it gets corrupted once in 100 times or less...
My sd card test application shall mount the sd card writes the 1 kb file to sd card and unmount the sd card and again mount the sd card reads the 1 kb file and compare with file written into sd card and unmounts the sd card.The sequence of steps is as follows:-
mount /dev/mmcblk1 /mnt/sd
write the 1 kb file
umount /mnt/sd
mount /dev/mmcblk1 /mnt/sd
read the 1 kb file and compares
umount /mnt/sd
if i perform the above test and power off and power on the embedded device and perform the test again if we do like this for 40-50 time the partition of the sd card is getting corrupted and i am not able access the content of the sd card either in linux or windows pc...I need to format the sdcard to access it again...
Below i am attaching the dmesg of the error...
I would like to find a solution for why the card is getting corrupted...
Thanks in Advance...
- 11-11-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,970
It could be the card itself. SD flash memory has a limited number of write cycles to each sector. Decent cards will remap sectors automatically in order to balance the writes over time so that you won't hit a bad sector too quickly. In fact, many SD cards only allow about 10,000 write cycles to any cell. Although that might seem like a relatively big number, it is a limit that can be reached pretty quickly. So, try a new card or one from a different manufacturer, and don't try to use the cards for a lot of rewrite activity. If your embedded system needs to do a lot of writes, then you might want to look into 1" hard drives. There are a number of those available with 1+GB of storage in a CF form factor.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 11-12-2009 #3Banned
- Join Date
- May 2008
- Posts
- 2
No i am using the new sd card and of different manufatures but i am getting the same problem..
can any one know how can partition of the sd card can corrupt...
- 11-12-2009 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,970
Well, have you sync'd the file systems also, before you umount it? Try this:
Code:mount /dev/mmcblk1 /mnt/sd write the 1 kb file sync umount /mnt/sd
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote