<br><br><div class="gmail_quote">On Fri, Mar 4, 2011 at 2:17 PM, Andreas Dilger <span dir="ltr"><<a href="mailto:adilger@dilger.ca">adilger@dilger.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 2011-03-04, at 11:07 AM, Stephane Cerveau wrote:<br>
> I have several keys from the same brand, model and I have the same issue.<br>
><br>
> When I said, a different key, it was a different brand.<br>
<br>
</div>I would typically blame the USB key.  Some cheap vendors use unreliable chips, and sometimes even mis-label e.g. 1GB flash as 2GB.<br>
<div class="im"><br>
> At the end, it seems that ext2 is working fine!<br>
<br>
</div>Except I don't think ext2 is doing this bitmap validation at runtime, like ext3/4 is doing.<br>
<br>
I'm not sure whether "badblocks" is verifying that the storage is behaving correctly (i.e. correct block addressing), or only whether it is able to write/read a particular sector on disk.<br></blockquote><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
You could use a more advanced block device verification tool, like llverdev from Lustre, which writes a unique test pattern to every block, and then reads it back afterward.<br></blockquote><div> </div><div>Quick test, in the meantime:<br>
<div><br>
badblocks -n -t0xffff /dev/the_thumb_drive<br>
<br>
-n is non-destructive.  -w is destructive of data.<br>
<br>
then I'd try '-n -trandom -p5' <br>
</div><div> <br></div></div></div>If you don't mind losing the data (I don't think you do), then use -w, rather than -n.<br clear="all"><br>-- <br>Stephen Samuel <a href="http://www.bcgreen.com">http://www.bcgreen.com</a>  Software, like love, <br>
778-861-7641                              grows when you give it away<br>