Is Disk Utility reliable?

6,413

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.

Share:
6,413

Related videos on Youtube

bmaupin
Author by

bmaupin

Updated on September 18, 2022

Comments

  • bmaupin
    bmaupin over 1 year

    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?

    • Admin
      Admin almost 13 years
      I was able to confirm the results of disk utility by downloading smartmontools (sudo aptitude install smartmontools) and running sudo smartctl -a /dev/sda
  • bmaupin
    bmaupin almost 13 years
    I ran badblocks, and it didn't find anything: ubuntu@ubuntu:~$ sudo badblocks -vsb 512 /dev/sda Checking blocks 0 to 312581807 Checking for bad blocks (read-only test): done Pass completed, 0 bad blocks found. But in disk utility, current pending sector count and uncorrectable sector count are still 1. I even ran it in destructive write mode (badblocks -wsb 512 /dev/sda --I don't care about the data at this point), and it didn't find any bad blocks after 4 passes. Any other suggestions?
  • psusi
    psusi almost 13 years
    @Bryan and the counts are still 1 after the write test? And you aren't mixing up the drives and running badblocks on a drive other than the one you are reading the smart status from? If so, then your drive must have buggy firmware.
  • bmaupin
    bmaupin almost 13 years
    @psusi yes, the counts are still 1. There's only one drive in the system, but I verified it by installing the smartmontools package and running sudo smartctl -a /dev/sda. I'll see if there are any firmware updates. If not, I need to convince Seagate the drive is bad, because according to Seatools it's fine, but "Seagate reserves the right to return a good drive back to its owner and to charge for all associated shipping costs." Thanks for your help!
  • psusi
    psusi almost 13 years
    Just to make sure, the count of 1 is in the pending attribute, not reallocated, right?
  • bmaupin
    bmaupin almost 13 years
    Yes, I have a count of 1 for "Current Pending Sector Count", ID 197, and a count of 1 for "Uncorrectable Sector count", ID 198
  • bmaupin
    bmaupin almost 13 years
    I talked to Seagate support, they had me do a low level format. I checked disk utility again, and it still showed the same thing, so I went ahead and sent it in for warranty service, in case the firmware is messed up. I'm guessing it's nothing major, but it's under warranty and I don't want to worry whether my drive's gonna fail down the road.