Program to check SD card health?

Barfo

Lifer
Jan 4, 2005
27,539
212
106
Some data in my phone's card has become corrupted, is there a program that'll let me check on its health, like there is with HDs?
 

lxskllr

No Lifer
Nov 30, 2004
59,092
9,514
126
I'd buy a new card. I found this(GNU/Linux utility)

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.

http://superuser.com/questions/376274/check-the-physical-health-of-a-usb-stick-in-linux
 

Barfo

Lifer
Jan 4, 2005
27,539
212
106
Thanks, it certainly looks like it it will be easier to just buy another card.
 

Berryracer

Platinum Member
Oct 4, 2006
2,779
1
81
after some time, an SD card will just die that's how it is...very unreliable media IMHO