Sunday, February 8, 2015

SD Card write limit effect

I set up a test for a particular type of SD card (Transcend 2GB Standard) where i continually write a single file from the computer to the disk. I set up another test to run simultaneously using a third party device to write to the same type of SD card.


The objective was to determine if the SD Card has write leveling or not. But I found some confusing results.


The Process


In order to write to these SD cards, I wrote a short C# script, which will copy a single 16Kb file which will alternate between containing all 1's and all 0's. For the third party device I used the same file and used its specific copying instructions to copy the file. The writes were synchronised (since the third party device takes longer) and this was handled by the c# script. After the file was copied to the SD card it was copied back to the computer and an MD5 check-sum was performed to ensure they were the same file. The reason that we alternated the 0's and 1's was so that we were sure that the file was being copied and read successfully.


The Results


So in the end we successfully wrote using both devices about 10 Million times over the period of several days. From this we concluded that the SD card indeed has Write leveling, because otherwise this would not succeed (the card would have the same block written repeatedly and would eventually fail [What's the life expectancy of an SD card? ]).


BUT then we put both SD cards into a computer and attempted to read their contents, the one that was written by the PC was fine, but the one written by the 3rd party device could not be read. It would not even appear in disk manager ...


So the question is:


1. Why would the SD card break in this way? Is this the effect we expected to see when we exceed the write limit on solid state devices?


2. Why is this dependant on the device that is writing the SD card, doesnt the internal electrics handle how the data is stored?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...