Hard Disk Health


Hard disk's fail after a while, they start to get more and more bad sectors where the data can't be read or written anymore.
Other times hard disk's fail due to mechanical damage and other problems.
This guide is going to help you see if your hard disk is damaged due to bad sectors or in a good health.

If you have Ubuntu, you can check the hard disk health from there. If you don't have Ubuntu you can use a Live USB.
If you need help on how to make and boot a Live USB click on Making and Booting a Live USB.

After the Live USB boots, press Ctrl + Alt + T to open a terminal, you should get a command prompt such as ubuntu@ubuntu:~$

First install the package "smartmontools"

Type sudo apt-get install smartmontools

Type sudo parted -ls

You should get a list of the disks and partitions as below
ubuntu@ubuntu:~$ sudo parted -ls
Model: ATA HGST HTS541010A9 (scsi) <---- Disk name
Disk /dev/sda: 1000GB <---- Disk name as known to Linux with size
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 
Number  Start   End     Size    File system     Name                  Flags
 1      1049kB  316MB   315MB   fat16           EFI Partition         boot, esp
 4      316MB   9979MB  9664MB  linux-swap(v1)
 5      9979MB  16.8GB  6784MB  ext4
 2      16.8GB  896GB   880GB   ntfs            Microsoft basic data  msftdata
 3      896GB   1000GB  104GB   ext4

Model: Seagate BUP Slim BK (scsi) <---- Disk name Disk /dev/sdb: 2000GB <---- Disk name as known to Linux with size Sector size (logical/physical): 512B/4096B Partition Table: msdos Disk Flags: Number Start End Size Type File system Flags 1 1049kB 2000GB 2000GB primary ntfs boot
Get the name of the disk you want to see the health of such as /dev/sda /dev/sdb etc.

Type sudo smartctl -a <disk name here> such as sudo smartctl -a /dev/sda

You should get the results similar to below
SMART overall-health self-assessment test result: PASSED

Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   100   100   062    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0025   100   100   040    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0023   180   100   033    Pre-fail  Always       -       1
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       746
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0 <---- Bad sectors
  7 Seek_Error_Rate         0x002f   100   100   067    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0025   100   100   040    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0032   075   075   000    Old_age   Always       -       11217
 10 Spin_Retry_Count        0x0033   100   100   060    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       664
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0033   100   100   097    Pre-fail  Always       -       0
187 Reported_Uncorrect      0x0032   100   099   000    Old_age   Always       -       2162691
188 Command_Timeout         0x0032   100   099   000    Old_age   Always       -       51550748673
190 Airflow_Temperature_Cel 0x0022   068   046   045    Old_age   Always       -       32 (Min/Max 29/44)
191 G-Sense_Error_Rate      0x0032   090   090   000    Old_age   Always       -       2588
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       9437328
193 Load_Cycle_Count        0x0032   036   036   000    Old_age   Always       -       649937
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0 <---- Bad sectors attempted to be copied
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0 <---- Bad sectors waiting to be copied
198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0 <---- Bad sectors that couldn't be copied
199 UDMA_CRC_Error_Count    0x0036   100   100   000    Old_age   Always       -       1
223 Load_Retry_Count        0x002a   100   100   000    Old_age   Always       -       0
The most important attributes to look for are indicated above. The higher the number under "RAW_VALUE" the worse it is.

  • Reallocated_Sector_Ct
  •     Shows how many bad sectors have been reallocated.
  • Reallocated_Event_Count
  •     Shows how many attempts to reallocate have been made.
  • Current_Pending_Sector
  •     Shows how many bad sectors are waiting to be copied.
  • Offline_Uncorrectable
  •     Shows how many bad sectors couldn't be reallocated.

    If a hard disk shows 0 for all of these attributes, then it's in a very good condition.
    The more bad sectors it has the worse it is, and you should backup to a replacement hard disk.

    If you have a failing hard disk and would like to recover files from it or copy it to another hard disk click on How to Recover Files From a Failing Hard Disk.

    RELATED TOPICS
    Live USB, Ubuntu, Partition table, Partition table, Partitions, Filesystems, Testdisk