Tuesday, April 16, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 6673  / 3 Years ago, mon, june 21, 2021, 3:10:56

I'm using ubuntu 11.04. Disk utility is reporting I have a bad sector on my hard drive. Is this reliable?



I'm skeptical that it's reporting accurately because




  1. When I googled "ubuntu disk utility bad sectors," it brought me to this bug:
    https://bugs.launchpad.net/ubuntu/+source/libatasmart/+bug/438136?comments=all

  2. I've scanned the drive with the manufacturer's tool (Seagate Seatools) and it didn't report any errors

  3. I scanned the drive with a couple other tools and they didn't report any errors

  4. Running fdisk and ntfsfix didn't find anything (other than ntfsinfo saying that my windows volume was "scheduled for check")

  5. Disk utility is reporting some crazy numbers in other places: the read error rate is over 60 million (yet still green), the seek error rate is over 150 billion (yet still green), hardware ECC recovered is over 84 million (again, green). see these screenshots:



    Edit: wikipedia's entry for SMART has this to say for each of these attributes: "The raw value has different structure for different vendors and is often not meaningful as a decimal number."



    im1



    im2




Having said all that, my windows partition has become unbootable (ntoskrnl.exe missing or corrupted, etc.) multiple times over the last several years, and other than the fact that windows is relatively unreliable, bad sectors would explain why it keeps messing up.



What's the best way to determine whether or not there really is anything wrong with the drive?


More From » hard-drive

 Answers
7

Yes, it is reliable. Run sudo badblocks -b 512 /dev/sda to scan the disk and find where the bad sector is. It will show the number of the bad sector. You can then verify it with:



sudo dd if=/dev/sda of=/dev/null iflag=direct bs=512 skip=sector_number count=1


Make sure you type the command exactly as stated, using the correct sector_number from badblocks. This should fail with an IO error ( since the sector is bad ). If it doesn't, then you got something wrong. If it does, then you can proceed with trying to repair the bad sector:



sudo dd if=/dev/zero of=/dev/sda oflag=direct bs=512 seek=sector_number count=1


After that, check the SMART status again and the pending_count should have gone down. If the reallocated_count is still zero, then the disk is fine.


[#44953] Tuesday, June 22, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
damomnning

Total Points: 422
Total Questions: 90
Total Answers: 106

Location: Mali
Member since Thu, Aug 13, 2020
4 Years ago
damomnning questions
;