Bug 24700 - gdu tells me my brand new hard drive is failing
Summary: gdu tells me my brand new hard drive is failing
Status: RESOLVED FIXED
Alias: None
Product: libatasmart
Classification: Unclassified
Component: library (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Lennart Poettering
QA Contact: Lennart Poettering
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-23 09:44 UTC by Bastien Nocera
Modified: 2009-10-27 14:00 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Scary! (74.74 KB, image/png)
2009-10-23 09:44 UTC, Bastien Nocera
Details
skdump /dev/sda output (1.54 KB, application/octet-stream)
2009-10-23 10:17 UTC, Bastien Nocera
Details
smartctl -a output (3.94 KB, text/plain)
2009-10-23 10:21 UTC, Bastien Nocera
Details

Description Bastien Nocera 2009-10-23 09:44:46 UTC
Created attachment 30641 [details]
Scary!

DeviceKit-disks-008-1.fc12.x86_64
libatasmart-0.16-1.fc12.x86_64

Says 2 million sectors are failing, and that the temperature is zero.
Comment 1 David Zeuthen (not reading bugmail) 2009-10-23 09:50:09 UTC
Please attach out skdump binary blob (option --save). Thanks.
Comment 2 David Zeuthen (not reading bugmail) 2009-10-23 09:55:02 UTC
Hmm.. 2 million sectors of 512 bytes a pop gives.. 1TB.. which is much bigger than the size of the disk. 

Perhaps libatasmart could be smart about this (e.g. decide that the parsing of the attribute failed) - and then possibly complain on stderr (or, better, syslog) so the owner can file a bug.
Comment 3 David Zeuthen (not reading bugmail) 2009-10-23 09:55:53 UTC
(In reply to comment #2)
> Hmm.. 2 million sectors of 512 bytes a pop gives.. 1TB.. which is much bigger
> than the size of the disk. 

MATH FAIL... 2 million times 512 bytes is roughly 1GB.

Never mind the suggestion in comment 2 then.
Comment 4 David Zeuthen (not reading bugmail) 2009-10-23 09:58:11 UTC
Also, for comparison, please attach smartctl -a output. Thanks.
Comment 5 Bastien Nocera 2009-10-23 10:17:44 UTC
Created attachment 30644 [details]
skdump /dev/sda output
Comment 6 Bastien Nocera 2009-10-23 10:21:29 UTC
Created attachment 30645 [details]
smartctl -a output
Comment 7 Bastien Nocera 2009-10-23 10:24:13 UTC
This is the 64GB SSD in a gen1 macbook air. It's as new, and (if I can read the libatasmart output correctly) has only been turned on for 9 hours when I uploaded the original screenshot.
Comment 8 David Zeuthen (not reading bugmail) 2009-10-23 13:12:19 UTC
(In reply to comment #7)
> This is the 64GB SSD in a gen1 macbook air. It's as new, and (if I can read the
> libatasmart output correctly) has only been turned on for 9 hours when I
> uploaded the original screenshot.

Attribute five (which is interpreted as "reallocated sector count") seems to be constant and smartctl(8) seems to agree with libatasmart.

Might be worth checking if a disk firmware upgrade from the vendor is available, and if so, fixes this issue. Otherwise I guess we can get Lennart to blacklist things.

Comment 9 Lennart Poettering 2009-10-23 15:34:05 UTC
(In reply to comment #2)

> Perhaps libatasmart could be smart about this (e.g. decide that the parsing of
> the attribute failed) - and then possibly complain on stderr (or, better,
> syslog) so the owner can file a bug.

We actually do something like this. But this raw value is still in range, so we don't complain.
Comment 10 Lennart Poettering 2009-10-23 15:45:10 UTC
I have now blacklisted the two bogus attributes for this drive in exactly this firmware in the hope that Apple fixes this in a later firmware.
Comment 12 David Zeuthen (not reading bugmail) 2009-10-23 20:14:10 UTC
(In reply to comment #0)
> Created an attachment (id=30641) [details]
> Scary!

Btw, I wonder why it reads "60 GB Hard Disk" and not "60 GB Solid-State Disk" like with my disk

 http://people.freedesktop.org/~david/f12-smart.png

What's the content of /sys/block/sda/queue/rotational (should be 0 but is probably 1). If 1, please attach the output of 'hdparm -I /dev/sda' (mine says: Nominal Media Rotation Rate: Solid State Device).

Hmm, could be that the IDENTIFY data from the drive is just lying - 1st gen Macbook Air sounds a bit vintage - but you say the disk is brand new? Does this mean 'never used' instead?

Thanks,
Comment 13 Bastien Nocera 2009-10-24 02:40:12 UTC
I use MacOS X so often that I didn't realise it didn't run the latest software/wasn't updated. I'll update the machine and report back.

As for vintage, the machine was released early 2008:
http://en.wikipedia.org/wiki/MacBook_Air#Specifications

The machine is a refurb, never used.
Comment 14 Bastien Nocera 2009-10-24 13:51:27 UTC
Snow Leopard with all the software/firmware updates installed doesn't update the firmware of the SSD, so no changes there.

MacOS X claims the device has passed SMART tests just fine as well, so it probably ignores that value the same way the libatasmart patch does.

Thanks for the fix Lennart, could you please make sure it gets into F12, so it doesn't complain about my setup on startup?
Comment 15 David Zeuthen (not reading bugmail) 2009-10-24 14:18:03 UTC
(In reply to comment #14)
> Snow Leopard with all the software/firmware updates installed doesn't update
> the firmware of the SSD, so no changes there.

OK - I guess this makes sense since Apple don't worry about other OSes than their own on their hardware.

> MacOS X claims the device has passed SMART tests just fine as well, so it
> probably ignores that value the same way the libatasmart patch does.

libatasmart/DKD/gnome-disk-utility is more thorough than most other SMART stacks / user-interfaces (including both smartctl and Apple's stack) insofar that we warn the user if there's "many" bad sectors instead of blindly trusting the self-assessment done by the disk.

("many" depends on a number of things - we don't warn if there's only one - but we do warn if you have ten or hundreds - IIRC it depends on the size of the disk - Lennart knows.)
Comment 16 Bastien Nocera 2009-10-24 15:33:23 UTC
Shall I file a separate bug about the hard disk not showing up as SSD?
Comment 17 David Zeuthen (not reading bugmail) 2009-10-24 15:48:58 UTC
(In reply to comment #16)
> Shall I file a separate bug about the hard disk not showing up as SSD?

Please provide the info requested in comment 12 ;-)
Comment 18 Lennart Poettering 2009-10-25 15:59:58 UTC
(In reply to comment #14)

> Thanks for the fix Lennart, could you please make sure it gets into F12, so it
> doesn't complain about my setup on startup?

Sure. will do. will combine this with some other patches (idle wakeup stuff). Those are a bit more dangerous so I am not sure I will ask for breaking F12 freeze for this, but rather push it into F12 after the release via the usual karma stuff.

Comment 20 Lennart Poettering 2009-10-27 14:00:34 UTC
(In reply to comment #19)
> FYI:
> http://thread.gmane.org/gmane.linux.utilities.smartmontools/5252
> and:
> https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/438136/comments/4
> 
> Maybe the firmware check needs to be updated.

I modified the blacklist entry now slightly so that it covers more firmware versions:

http://git.0pointer.de/?p=libatasmart.git;a=patch;h=4a6caeca4e8e9585a86470c11d2e75d5c1368d59


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.