md5 - Testing the robustness of a flash drive: dd'ing the drive till it fails? -


I have been given a cheap, branded 2 GB flash drive. As I have a big flash drive, I have decided to use it to test the strength of the flash technology.

I am planning to write everything on 1 drive, check for accuracy, write 0, check and so on. I'll log the result, and later I'll look for the failures.

I am looking for the most resource-saving technique to do this. In my current strategy, the Linux DD command is used for writing and reading, and compared to the results compared to files and zeros. Another way would be to write people and zero on the drive, and calculate the MD5 of its contents. This comprehensive IO reads and is a simple trade off between high CPU usage; I think I measure the time of each method and decide.

Is there a better, more beautiful way to do this?

Choose a random 32-bit number. Write that read every block in each block, re-run the new 32-bit number drive, hash algorithms like MD5 are CPU intensive. Since you really know the pattern and are just checking that the drive does not screw bits, simple direct comparison is the best way to do not use DD ... write directly from a language like c or pear (if Sometimes there is a standing train near orange ...)

No comparison file is needed ... Pattern fits into memory In fact, the entire exam probably fits into the CPU cache. If done neatly, but flash drives definitely be an obstacle. Find a number that's not right, you know that you've got your bad block.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -