If I have corrupt files and want to detect whether the Flash NAND SSD is the issue or whether the installation is just corrupt, would scanning for bad sectors help, or is this just useful on regular hard disk drives?

  • Before you do anything else, make sure you back up important data. That being said, I think SSD will detect/reallocate bad sectors so is basically a non issue compared to bad sectors in spindle based drives. – jmreicha Sep 20 '11 at 19:32
  • What led you to believe that the installation was corrupt? And what program specifically is corrupt? – cmorse Sep 23 '11 at 19:59

Generally speaking, SSD's firmware should be taking care of re-locating your data if the current location is about to go bad. However. Nothing is 100% reliable, including flash firmware re-allocation algorithms. I'd say the chance of real bad sector (e.g. you write data, but cannot read it back, or read back not what you've written) on SSD is pretty low, but it won't hurt to scan for bad sectors either.

If some non-trivial amount of bad sectors do turn up on SSD I wouldn't use that SSD at all though, it means something is seriously wrong with either its firmware or the flash NAND itself.

| improve this answer | |

I would first suggest querying the drive's SMART parameters. For example, the drive might have exhausted its supply of spare memory blocks. You'll want to use the most recent version of smartmontools you can easily get your hands on (one easy/free source: an Ubuntu LiveCD.)

Smartmontools can also activate a drive self-test and show you the device's smart error logs, if any.

If SMART shows no issues, then it's probably not "media" issues (ie bad NAND cells.) Corruption might have been caused by a firmware issue; flash drives have often seen many firmware revisions, so check for updated firmware for your drive.

To answer your original question: yes, you can run badblocks (or similar) on an SSD.

| improve this answer | |

First make a backup of any important data on the drive.

You can check the output of smart, it should report things like reallocated sector count, wear levelling count, program fail count, erase fail count, uncorrectable error count and so on.

The manufacturer of your ssd probably has some more specific drive test software which might give you more data.

Do you know exactly which files are corrupt? Is there any pattern to it (only newly written files? only old files? random? if you download a large file (maybe some Linux install cd/dvd image), and calculate it's checksum does it match the checksum posted on the dl page?)?

If none of these give anything conclusive, there are more destructive methods of testing. They do have a few drawbacks. First, they will destroy any data currently on the drive, second, some can be very slow, third, some will use up some of the limited amount of writes each drive has (shouldn't be that big of a problem for most new drives, but still). I'd use the manufacturers sw to reset the drive (clears out all cells, making it appear as a new drive), run badblocks (the destructive write test), reset the drive again, put a few files with known checksums on the drive, and compare the checksums.

You might as well test your memory and cpu before going for the destructive tests since memory/cpu errors can also corrupt files, but the tests don't destroy any data and don't really cause much wear on your hw.

If you fail during any of the tests, post where and with what error, if not then the drive seems fine, although I would still keep an eye on it using smart, creating checksums of all files on it and comparing them every so often for any changes that shouldn't be there.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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