How to check the health status of a USB stick? How do I know that a USB is broken beyand repair, or repairable?

link|improve this question
7  
Throw it away. Your invested time is more expensive than buying a new one. – mailq Jan 8 at 23:29
I have to agree with @mailq. You can buy a decent 4 GB thumb drive for $2.00 these days. – iglvzx Jan 9 at 6:24
feedback

migrated from serverfault.com Jan 9 at 4:16

This question came from our site for system administrators and desktop support professionals.

4 Answers

It depends on the failure mode, I suppose. They're cheap for a reason.

As a USB device, watching the bus via device manager in Windows or the output of dmesg in Linux will tell you if the device is even recognized as being plugged in. If it isn't, then either the controller on board or the physical connections are broken.

If the device is recognized as being plugged in, but doesn't get identified as a disk controller (and I don't know how that could happen, but...) then the controller is shot.

If it's recognized as a disk drive, but you can't mount it, you might be able to repair it via fdisk and rewrite the partition table, then make another filesystem.

If you're looking for the equivalent of S.M.A.R.T., then you won't find it. Thumbdrive controllers are cheap. They're commodity storage, and not meant to have the normal failsafes and intelligence that modern drives have.

link|improve this answer
feedback

There is no way to query a USB memory stick for SMART-like parameters; I'm not aware of any memory sticks which support doing so even via publicly-available proprietary software. The best you can do is to check that you can successfully read+write to the entire device using badblocks.

https://en.wikipedia.org/wiki/Badblocks

You want to specify one of the write tests, which will wipe all data on the stick; make a backup first.

Find the device by looking at dmesg after plugging in the USB stick; you'll see a device name (most likely sd_, ie sdc, sdd, etc.) and manufacturer information. Make sure you're using the proper device!

If the stick is formatted with a valid filesystem, you may have to unmount it first.

Example syntax, for a USB stick enumerated as /dev/sdz, outputting progress information, with a data-destructive write test and error log written to usbstick.log:

sudo badblocks -w -s -o usbstick.log /dev/sdz

You'll need to repartition and reformat the stick afterwards, assuming it passes; this test will wipe everything on the stick. Any failures indicate a failure of the device's memory controller, or it has run out of spare blocks to remap failed blocks. In that case, no area of the device can be trusted.

link|improve this answer
feedback

If it isn't working, it isn't fixable. It doesn't matter what OS you're using.

link|improve this answer
This does depend on your perception of "work" doesn't it. For example for some people it could just be that the partition table is corrupt. I wouldn't write it off without a LITTLE investigation! – SimonJGreen Jan 8 at 23:38
Server Fault is for Professional System Administrators only. If a Professional can't make it work then it's dead. – Chris S Jan 9 at 2:59
"I wouldn't write it off without a LITTLE investigation!" - I would. My time, both in terms of how much my employer pays for it at work and what they expect for that money, and how much I value my own time outside work, is worth more than the cost of a memory stick. If its cheap, throw it away, if its expensive then return it under warranty if possible. Life's too short for much else. – DJ Pon3 Jan 9 at 8:45
feedback

USB drives are pretty rudimentary, there's not a lot that can go wrong on them! Generally, if it shows up as a drive and you can format it then it works. You could try having a look at the Portable version of CrystalDiskInfo as that's a quick lightweight analysing tool. Very few USB sticks report back S.M.A.R.T. info and the like though.

link|improve this answer
1  
For reference, here's the Crystal Disk Info manual in English: crystalmark.info/software/CrystalDiskInfo/manual-en – Matt Simmons Jan 8 at 23:34
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.