Hard Disk Health

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
mintymatrix
Level 4
Level 4
Posts: 232
Joined: Sat Dec 21, 2013 9:05 pm

Hard Disk Health

Post by mintymatrix »

My computer faced a little booting problem, few days back. Looked like a file-system problem.
Later I checked from the DISKS application, it mentioned :

500 GB (500,107,862,016 bytes)
WDC WD5000BEVT-24A0RT0 (01.01A02)
Disk is OK, one bad sector (45° C / 113° F)


Also checked sudo badblocks -v /dev/sda3

Checking blocks 0 to 104857599
Checking for bad blocks (read-only test): done
Pass completed, 0 bad blocks found. (0/0/0 errors)


Which did not show any bad blocks. Is bad blocks similar to bad sector ?

and cat /etc/fstab
# /etc/fstab: static file system information.
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=51e4bce9-2e77-4939-928b-5c3bacd2d027 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda3 during installation
UUID=4252dbdb-0192-4ccc-8ffe-f1ddea8d895a /home ext4 defaults 0 2
# swap was on /dev/sda2 during installation
UUID=5823e3fc-8cad-4702-9c36-589284fa6360 none swap sw 0 0

Is my hard disk in good health ?
Is there any application that can provide more detailed analysis ?
Or is it a file system problem ?

User avatar
catweazel
Level 19
Level 19
Posts: 9910
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Hard Disk Health

Post by catweazel »

mintymatrix wrote:
Mon Apr 29, 2019 1:22 am
Is bad blocks similar to bad sector ?
Is my hard disk in good health ?
Is there any application that can provide more detailed analysis ?
Or is it a file system problem ?
Blocks sit inside sectors. Install smartmontools then use man smartctl in a terminal. The application will show you the SMART values for the drive, assuming it supports SMART.

Example usage:

Code: Select all

sudo smartctl -a /dev/nvme0n1
sudo smartctl -a /dev/sda
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

oldgranola
Level 4
Level 4
Posts: 416
Joined: Fri Sep 05, 2014 1:39 am

Re: Hard Disk Health

Post by oldgranola »

Thanks catweazel for the reminder. Not sure why its not part of the base LM install. Was in my Manjuro. I tried installing the gui front end via LM cinnamon software manager but it totally barfed and hung. Had to kill-9 the software manager. Not to hijack the thread...
comadore, pcDOS, hpux, solaris, vms-vax ....blah blah blah..
Yet I'm still a fn nooob

User avatar
mintymatrix
Level 4
Level 4
Posts: 232
Joined: Sat Dec 21, 2013 9:05 pm

Re: Hard Disk Health

Post by mintymatrix »

catweazel wrote:
Mon Apr 29, 2019 1:42 am
mintymatrix wrote:
Mon Apr 29, 2019 1:22 am
Is bad blocks similar to bad sector ?
Is my hard disk in good health ?
Is there any application that can provide more detailed analysis ?
Or is it a file system problem ?
Blocks sit inside sectors. Install smartmontools then use man smartctl in a terminal. The application will show you the SMART values for the drive, assuming it supports SMART.

Example usage:

Code: Select all

sudo smartctl -a /dev/nvme0n1
sudo smartctl -a /dev/sda
Thanks

Code: Select all

sudo smartctl -a /dev/sda

smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-109-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Scorpio Blue Serial ATA
Device Model:     WDC WD5000BEVT-24A0RT0
Serial Number:    WD-WX81A90P4225
LU WWN Device Id: 5 0014ee 600869de8
Firmware Version: 01.01A02
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    5400 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:    Mon Apr 29 14:22:05 2019 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00)	Offline data collection activity
					was never started.
					Auto Offline Data Collection: Disabled.
Self-test execution status:      (   0)	The previous self-test routine completed
					without error or no self-test has ever 
					been run.
Total time to complete Offline 
data collection: 		(13200) seconds.
Offline data collection
capabilities: 			 (0x7b) SMART execute Offline immediate.
					Auto Offline data collection on/off support.
					Suspend Offline collection upon new
					command.
					Offline surface scan supported.
					Self-test supported.
					Conveyance Self-test supported.
					Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
					power-saving mode.
					Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
					General Purpose Logging supported.
Short self-test routine 
recommended polling time: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 ( 154) minutes.
Conveyance self-test routine
recommended polling time: 	 (   5) minutes.
SCT capabilities: 	       (0x7037)	SCT Status supported.
					SCT Feature Control supported.
					SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
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   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   186   175   021    Pre-fail  Always       -       1691
  4 Start_Stop_Count        0x0032   098   098   000    Old_age   Always       -       2828
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   100   253   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   090   090   000    Old_age   Always       -       7999
 10 Spin_Retry_Count        0x0032   100   100   051    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   098   098   000    Old_age   Always       -       2821
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       184
193 Load_Cycle_Count        0x0032   189   189   000    Old_age   Always       -       35124
194 Temperature_Celsius     0x0022   101   088   000    Old_age   Always       -       46
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       1
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   100   253   051    Old_age   Offline      -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Conveyance offline  Completed without error       00%         0         -

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

What can we deduce from this report ?

User avatar
mintymatrix
Level 4
Level 4
Posts: 232
Joined: Sat Dec 21, 2013 9:05 pm

Re: Hard Disk Health

Post by mintymatrix »

sudo smartctl -s on -iHA --log=error -f brief -q noserial /dev/sda

Code: Select all

sudo smartctl -s on -iHA --log=error -f brief -q noserial /dev/sda

smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-109-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Scorpio Blue Serial ATA
Device Model:     WDC WD5000BEVT-24A0RT0
Firmware Version: 01.01A02
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    5400 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:    Mon Apr 29 14:39:25 2019 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     POSR-K   200   200   051    -    0
  3 Spin_Up_Time            POS--K   186   175   021    -    1691
  4 Start_Stop_Count        -O--CK   098   098   000    -    2828
  5 Reallocated_Sector_Ct   PO--CK   200   200   140    -    0
  7 Seek_Error_Rate         -OSR-K   100   253   000    -    0
  9 Power_On_Hours          -O--CK   090   090   000    -    7999
 10 Spin_Retry_Count        -O--CK   100   100   051    -    0
 11 Calibration_Retry_Count -O--CK   100   100   000    -    0
 12 Power_Cycle_Count       -O--CK   098   098   000    -    2821
192 Power-Off_Retract_Count -O--CK   200   200   000    -    184
193 Load_Cycle_Count        -O--CK   189   189   000    -    35124
194 Temperature_Celsius     -O---K   102   088   000    -    45
196 Reallocated_Event_Count -O--CK   200   200   000    -    0
197 Current_Pending_Sector  -O--CK   200   200   000    -    1
198 Offline_Uncorrectable   ----CK   100   253   000    -    0
199 UDMA_CRC_Error_Count    -O--CK   200   200   000    -    0
200 Multi_Zone_Error_Rate   ---R--   100   253   051    -    0
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

SMART Error Log Version: 1
No Errors Logged

User avatar
catweazel
Level 19
Level 19
Posts: 9910
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Hard Disk Health

Post by catweazel »

mintymatrix wrote:
Mon Apr 29, 2019 2:43 am

Code: Select all

  5 Reallocated_Sector_Ct   PO--CK   200   200   140    -    0
  7 Seek_Error_Rate         -OSR-K   100   253   000    -    0
 10 Spin_Retry_Count        -O--CK   100   100   051    -    0
 11 Calibration_Retry_Count -O--CK   100   100   000    -    0
196 Reallocated_Event_Count -O--CK   200   200   000    -    0
198 Offline_Uncorrectable   ----CK   100   253   000    -    0
199 UDMA_CRC_Error_Count    -O--CK   200   200   000    -    0
200 Multi_Zone_Error_Rate   ---R--   100   253   051    -    0
No Errors Logged
The drive is fine. You might wish to boot into a live session on USB or DVD and fsck that drive. If the block is bad, it will be reallocated.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

User avatar
mintymatrix
Level 4
Level 4
Posts: 232
Joined: Sat Dec 21, 2013 9:05 pm

Re: Hard Disk Health

Post by mintymatrix »

catweazel wrote:
Mon Apr 29, 2019 3:40 am
mintymatrix wrote:
Mon Apr 29, 2019 2:43 am

Code: Select all

  5 Reallocated_Sector_Ct   PO--CK   200   200   140    -    0
  7 Seek_Error_Rate         -OSR-K   100   253   000    -    0
 10 Spin_Retry_Count        -O--CK   100   100   051    -    0
 11 Calibration_Retry_Count -O--CK   100   100   000    -    0
196 Reallocated_Event_Count -O--CK   200   200   000    -    0
198 Offline_Uncorrectable   ----CK   100   253   000    -    0
199 UDMA_CRC_Error_Count    -O--CK   200   200   000    -    0
200 Multi_Zone_Error_Rate   ---R--   100   253   051    -    0
No Errors Logged
The drive is fine. You might wish to boot into a live session on USB or DVD and fsck that drive. If the block is bad, it will be reallocated.
Thanks. What is the entire code for that ? only fsck ?

User avatar
catweazel
Level 19
Level 19
Posts: 9910
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Hard Disk Health

Post by catweazel »

mintymatrix wrote:
Mon Apr 29, 2019 4:23 am
Thanks. What is the entire code for that ? only fsck ?
sudo fsck /dev/sdX ought to do it.

You can read this for a bit more assistance: https://www.maketecheasier.com/check-re ... sck-linux/

Cheers.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

User avatar
Pjotr
Level 21
Level 21
Posts: 14114
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Hard Disk Health

Post by Pjotr »

When the disk is old, even the suspicion of hardware faults could be a valid reason to replace it....

Whatever you do, back up your data on a very regular basis. On an external medium.
Tip: 10 things to do after installing Linux Mint 19.3 Tricia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

User avatar
catweazel
Level 19
Level 19
Posts: 9910
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Hard Disk Health

Post by catweazel »

Pjotr wrote:
Mon Apr 29, 2019 4:45 am
When the disk is old, even the suspicion of hardware faults could be a valid reason to replace it....

Whatever you do, back up your data on a very regular basis. On an external medium.
Both good points. Thanks for adding them.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

User avatar
mintymatrix
Level 4
Level 4
Posts: 232
Joined: Sat Dec 21, 2013 9:05 pm

Re: Hard Disk Health

Post by mintymatrix »

catweazel wrote:
Mon Apr 29, 2019 4:37 am
mintymatrix wrote:
Mon Apr 29, 2019 4:23 am
Thanks. What is the entire code for that ? only fsck ?
sudo fsck /dev/sdX ought to do it.

You can read this for a bit more assistance: https://www.maketecheasier.com/check-re ... sck-linux/

Cheers.
Thanks, I will check that code and get back.

Post Reply

Return to “Newbie Questions”