LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-18-2016, 02:21 PM   #1
Summer Deep
Member
 
Registered: Oct 2016
Location: Manchester, UK
Distribution: LXLE 18.04, MX 18, Mint XFCE, antiX 17
Posts: 31

Rep: Reputation: Disabled
'Disks' application - how reliable is it?


This is the feature which seems to be present in most distros in the Ubuntu/Mint family, and maybe quite a few others (eg Knoppix). It's the one which, as well as giving a graphical illustration of the hard drive's partitions, provides basic information about its make, serial number, capacity and 'general health' (bad sectors and current temperature). It's this latter aspect that I'm concerned with. Last week I bought a second-hand Samsung 120GB hard drive as a spare part and to play around with. When I tested it using the 'Disks' feature on a Knoppix usb, it stated something like: 'Disk is OK, 5630 bad sectors'. Quite apart from the question of whether a hard drive with 5000+ bad sectors can be correctly described as OK, I wonder just how accurate or reliable this figure was - it's provided instantaneously without any perceptible 'scanning' period. When I returned the disk to the store (CEX in Manchester), they ran what seemed to be a more technically sophisticated scan using a Windows-based analyser, which apparently showed it to be free of bad sectors. They still gave me a full refund though, LOL. The Linux 'Disks' application by the way shows the vast majority of my HDDs to have no bad sectors. Any views?
 
Old 10-18-2016, 03:46 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora 33
Posts: 3,598

Rep: Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027
Disks was probably accessing the SMART count of reallocated sectors. My disk which is 4 years old appers to have 0.

Code:
sudo smartctl -A /dev/sda |grep -E '(RAW|Reallocated)'
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
 
2 members found this post helpful.
Old 10-18-2016, 03:50 PM   #3
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: USA
Distribution: Lubuntu 14.04, Windows Vista
Posts: 6,277
Blog Entries: 3

Rep: Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841
Quote:
Originally Posted by Summer Deep View Post
Any views?
Hi...

From what I understand here and here, it appears that Disks is simply reporting what the hard drive is telling it. From the times I've used Disks myself, it's always struck me as reliable and accurate, despite the irony you've mentioned.

However, the utility is only as good as the information it's receiving from S.M.A.R.T.

To confirm the condition of your drive, you can also run the diagnostic utility provided by your hard drive's manufacturer. If you need help finding it, please let is know the manufacturer of your drive.

Regards...
 
1 members found this post helpful.
Old 10-18-2016, 04:18 PM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,554

Rep: Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088
S.M.A.R.T. will not report a drive as "Failing" due to bad sectors until it has nearly exhausted its supply of spare sectors. That is long past the point where most people would consider the drive unsuitable for anything you care about.
 
1 members found this post helpful.
Old 10-19-2016, 04:53 AM   #5
Summer Deep
Member
 
Registered: Oct 2016
Location: Manchester, UK
Distribution: LXLE 18.04, MX 18, Mint XFCE, antiX 17
Posts: 31

Original Poster
Rep: Reputation: Disabled
Thanks everyone, plenty to think about there.....This SMART data business seems well worth exploring, though most of what I've seen of it so far goes rather above my head (UltraDMA CRC Error Count, anyone?!). I've got a utility which analyses SMART hard drive data on a Windows 8.1 desktop machine, and can't help but be amused by the precision of its predictions: according to its analysis of the spin up time, the drive is set to fail on 9 November 2023 at 06-50 and 13 seconds. Presumably this means that if I need to send a couple of emails at 06-40 on that day, I should be okay so long as I don't hang about. On the other hand, a few minutes earlier it had predicted a date in 2021 for this to occur, so maybe not....The other HDD I've had an issue with was one that had a Windows OS on 80% of its volume, and a Linux one on the rest. It showed 40 bad sectors on the 'Disks' analyser, so I ran the CHKDSK -R command on the Windows section, which is supposed to identify bad sectors and try to repair them, but this just resulted in the number of bad sectors increasing to 53. Then I tried erasing all the partitions with GParted, but the 53 bad sectors remained on the disk. Not sure whether there are any other tricks to try - maybe the disk is just irretrievably impaired?
 
Old 10-19-2016, 09:15 AM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,554

Rep: Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088
Look at the detailed S.M.A.R.T. attributes. Disk tool considers reallocated sectors (attribute 5) to be "bad". Once the drive has internally detected a bad sector and reallocated it to a spare sector, that reallocation is permanent. To the OS, the sector still appears fault free. A count of 53 reallocated sectors is something that bears watching, but as long as that number does not continue to increase, the drive is not in terrible shape.

Farther down the list, attribute 197 is the count of bad sectors that are pending reallocation. Those bad sectors are visible to the OS (will cause an I/O error when read). The next time those sectors are written, they will either be declared "good" (the write was successful) or they will be reallocated to a spare sector (reallocated sector count will increase). As long as the raw value for that attribute is zero, the drive still appears fault-free to the OS.

Note that these counts only reflect sectors that developed a problem after the drive left the factory. Even when the counts are zero, it does not mean the platter is perfect. The manufacturer will have identified and mapped out bad or weak spots on the disk, and none of that is reported in the S.M.A.R.T. attributes.
 
1 members found this post helpful.
Old 10-19-2016, 12:04 PM   #7
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,852

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
I assume this is a Samsung SSD, not a regular hard drive. If that's the case, you can rule out any mechanical failure of the drive. Since SSDs have limited writes to any given sector, I assume that the bad sector count would indicate that for those sectors, the write count has been exceeded and the drive firmware has marked them "bad". Having a bad sector count that high would indicate that the drive has seen heavy use. When the drive runs out of spare sectors for reallocation, the drive will fail. I'd just keep and eye on it and run the SMART test from time to time to see if the bad sector count is increasing.
 
Old 10-19-2016, 12:23 PM   #8
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,554

Rep: Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088
I seriously doubt that a "second-hand Samsung 120GB hard drive" is an SSD.
 
Old 10-19-2016, 01:36 PM   #9
Summer Deep
Member
 
Registered: Oct 2016
Location: Manchester, UK
Distribution: LXLE 18.04, MX 18, Mint XFCE, antiX 17
Posts: 31

Original Poster
Rep: Reputation: Disabled
^^ That's correct. It was a 2.5" mechanical hard drive, probably at least 7 or 8 years old.
 
Old 10-19-2016, 03:35 PM   #10
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,852

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
Sorry for the confusion. Just bought a used intel 110GB ssd. Many people are trading up to 250GB or 500GB ssds now that prices have come down. Thought you might have been in the same boat. I can't remember the last time I bought even a 250GB standard hard drive. Do they make them any more?
 
Old 10-19-2016, 07:30 PM   #11
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,554

Rep: Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088
On a drive that spent 7 or 8 years knocking about in a laptop, 53 reallocated sectors might not be excessive. What's important to know is whether the drive continues to develop new bad sectors. I recommend zeroing the entire drive ("dd if=/dev/zero of=/dev/sdX bs=1M"). That should ensure that any currently pending sectors or as yet undetected bad sectors get reallocated. Then you can check whether the reallocation count or pending sector count increases (the smartd daemon can do that automatically). If you don't want to zero the drive, just reading it ("dd if=/dev/sdX of=/dev/null bs=64k conv=noerror") will at least discover any as yet undetected bad sectors and put them in the "pending" list.
 
Old 11-14-2016, 07:14 PM   #12
Summer Deep
Member
 
Registered: Oct 2016
Location: Manchester, UK
Distribution: LXLE 18.04, MX 18, Mint XFCE, antiX 17
Posts: 31

Original Poster
Rep: Reputation: Disabled
Here's an update/postscript that I couldn't resist making. Bought a 250 GB Hitachi 2.5" mechanical hard drive from CEX at the weekend, scanned it with the 'Disks' utility on a Knoppix usb, which revealed that it had over 131,000 bad sectors but, as usual, was apparently 'OK'. Needless to say I've become a little sceptical about the effectiveness (or even the existence) of the testing procedures at some branches of this company, but still don't fully understand how 'Disks' can be apparently so indulgent in its assessment of the overall state of the disk. How many 'bad sectors' does it take to render a hard drive 'not OK'?

Last edited by Summer Deep; 11-14-2016 at 07:22 PM.
 
Old 11-14-2016, 07:56 PM   #13
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: USA
Distribution: Lubuntu 14.04, Windows Vista
Posts: 6,277
Blog Entries: 3

Rep: Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841
Quote:
Originally Posted by Summer Deep View Post
Bought a 250 GB Hitachi 2.5" mechanical hard drive from CEX at the weekend, scanned it with the 'Disks' utility on a Knoppix usb, which revealed that it had over 131,000 bad sectors but, as usual, was apparently 'OK'.
Hi...

Just as a side note, you might want to verify that number with Hitachi's hard drive diagnostic utility, which you can find here.

At the point you consider this issue resolved, please don't forget the mark this thread as "SOLVED" by clicking on "Thread Tools" directly above your initial post. Thanks!

Regards...

Last edited by ardvark71; 11-14-2016 at 08:09 PM. Reason: Added a word.
 
Old 11-14-2016, 07:56 PM   #14
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,554

Rep: Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088
Quote:
Originally Posted by Summer Deep View Post
How many 'bad sectors' does it take to render a hard drive 'not OK'?
That is determined by the drive's manufacturer. When the SMART report starts saying "FAILING NOW" for one of the attributes, then the tool should report the drive as failed. The thresholds for the minimum acceptable values for each of the normalized attributes are set by the manufacturer. The tool is just reporting what the drive is saying.

Just out of curiosity, what does "smartctl -A" report for that drive?
 
Old 11-15-2016, 07:39 PM   #15
Summer Deep
Member
 
Registered: Oct 2016
Location: Manchester, UK
Distribution: LXLE 18.04, MX 18, Mint XFCE, antiX 17
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ardvark71 View Post

At the point you consider this issue resolved, please don't forget the mark this thread as "SOLVED"

It was a very generalized original question, to which I wasn't expecting a specific 'solution', so I'm not sure it needs to be designated as 'solved'. Nonetheless, maybe the issue has now been aired as adequately as is practicable.

Quote:
Originally Posted by rknicholls
Just out of curiosity, what does "smartctl -A" report for that drive?
Sorry, I returned the hard drive to the retailer and no longer have it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New RHES - how to resize current disks and create new the disks spuds99 Linux - Server 3 09-29-2013 06:13 PM
[SOLVED] added a couple of new disks and now /dev/sd* disks are all messed up nass Linux - Hardware 4 10-30-2012 10:16 AM
[SOLVED] RAID 5 with 4 hard disks... array started with only 3 out of 4 disks kikinovak Slackware 9 08-11-2012 06:33 AM
Installation Disks not recognized as official disks when booting with floppy coal-fire-ice Mandriva 13 12-09-2004 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration