Fastest way to check for bad sectors in HDD?

28,314

Solution 1

You have to check some SMART utilities.

You can use "Disk Utility" (aka palimpsest or gnome-disks depending on the Ubuntu release) for this.

In command line I suggest you install the smartmontools package (sudo apt install smartmontools) and play around with smartctl.

Example:

sudo smartctl --all /dev/sda

Solution 2

If your drives have SMART, I would go about this by installing "gsmartcontrol" and doing a short test on all drives. Then throw away the ones that do not even pass the short test or display errors/warnings and perform a long test on the remaining drives.

To truly find out if a drive is damaged or not, I guess you will need to check every sector of it and that's what the long test does.

But I am no expert, maybe there is a better way?

Solution 3

For those who find this question looking for a solution to the badblocks error Value too large for defined data type (as you might get trying to scan a 6TB drive): try setting larger block size:

badblocks -b 4096 /dev/sde
Share:
28,314

Related videos on Youtube

Computer's Guy
Author by

Computer's Guy

Updated on September 18, 2022

Comments

  • Computer's Guy
    Computer's Guy over 1 year

    I have a bunch of disks, probably 50 or more laying there, I know some of them are broken and some should still work fine, I need a way to check them without wasting days.

    Do you know any tools besides badblocks, that can do it without taking too much time?

    • Mitch
      Mitch over 9 years
      Take a look at fsck.
    • Computer's Guy
      Computer's Guy over 9 years
      isn't that for linux file systems?
    • Mitch
      Mitch over 9 years
      It is. What file system(s) are you using?
    • Computer's Guy
      Computer's Guy over 9 years
      The hard drives may have different file systems, i need to check the hardware for bad sectors regardless of their OS.
  • Computer's Guy
    Computer's Guy over 9 years