Fastest way to check for bad sectors in HDD?
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
Related videos on Youtube
Computer's Guy
Updated on September 18, 2022Comments
-
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 over 9 yearsTake a look at fsck.
-
Computer's Guy over 9 yearsisn't that for linux file systems?
-
Mitch over 9 yearsIt is. What file system(s) are you using?
-
Computer's Guy over 9 yearsThe hard drives may have different file systems, i need to check the hardware for bad sectors regardless of their OS.
-
-
Computer's Guy over 9 yearsthomas-krenn.com/en/wiki/SMART_tests_with_smartctl#Short_Test I found more info here.