smartmontools/smartctl does not work on SATA drives on Linux Kernel 2.6.20-15.27

Bug #106821 reported by Hendrik van den Boogaard on 2007-04-15
26
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Undecided
Unassigned
linux-source-2.6.20 (Ubuntu)
Medium
Unassigned
linux-source-2.6.22 (Ubuntu)
Medium
Chuck Short

Bug Description

Binary package hint: linux-image-2.6.20-15-generic

On my ASUS A8N-VM CSM motherboard my PATA harddisks are reported OK but the SATA drives are not. Requestingall S.M.A.R.T. info from the drive result in an error like the one below. On the older kernel (2.6.20-14.22) the output is fine.

smartctl -d ata -a /dev/sda

smartctl version 5.36 [x86_64-unknown-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Device Model: ST3500841AS
Serial Number: 3PM10863
Firmware Version: 3.AAH
User Capacity: 500,107,862,016 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 7
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Sun Apr 15 19:22:24 2007 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Error SMART Status command failed
Please get assistance from http://smartmontools.sourceforge.net/
Register values returned from SMART Status command are:
CMD=0x50
FR =0x00
NS =0x00
SC =0x00
CL =0x00
CH =0x00
SEL=0x00
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

Jools Wills (jools) wrote :

Since upgrading to feisty I'm also having a similar problem with all my SATA drives.

root@aero:~# smartctl -d ata -l selftest /dev/sdd
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Error SMART Status command failed
Please get assistance from http://smartmontools.sourceforge.net/
Register values returned from SMART Status command are:
CMD=0x50
FR =0xda
NS =0x00
SC =0x00
CL =0xc2
CH =0x00
SEL=0x00
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

the PATA drives are ok. I have 5xSATA drives on 2 "RAID bus controller: Silicon Image, Inc. SiI 3114 [SATALink/SATARaid] Serial ATA Controller (rev 02)"

the drives are Maxtor 6V300F0 (300gb sata drives)

Changed in linux-source-2.6.20:
status: Unconfirmed → Confirmed

Interesting. I thought the problem might have been NVidia related because I read some stuff about the libpata (?) driver for NVidia and that they changed things around. I have a Asus A8N-VM CSM myself, but the SIL3114 is really different from my 'IDE interface: nVidia Corporation MCP51 Serial ATA Controller (rev a1)'. I'm sure we are not the only two people having problems with SMART on SATA, but so far there is not any status update on this or other people reporting in on this thread ;(.

Jools Wills (jools) wrote :

I build a 2.6.21-rc6 kernel from kernel.org and tried it. The smart stuff is working fine. It was also working on an earlier kernel. I should try a stock 2.6.20 kernel to see if it's something specific to ubuntu causing the problem.

Brenden Bain (brendenbain) wrote :

I also have this problem on this kernel. I only have one SATA disk connected to a GA-K8NF-9 (nForce 4) Motherboard. I get the following error intermittently:

brenden@greig:~$ sudo smartctl -d ata /dev/sda -H
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Error SMART Status command failed
Please get assistance from http://smartmontools.sourceforge.net/
Register values returned from SMART Status command are:
CMD=0x50
FR =0x00
NS =0x00
SC =0x1e
CL =0x0c
CH =0x86
SEL=0x00
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

The same command will work without error at other times.

This only started happening on the upgrade to Fiesty.

Anthony DeChiaro (adechiaro) wrote :

Also able to reproduce on two stock Feisty systems, both with SATA drives, get the standard "Error SMART Status command failed" message. Have not tried on Edgy or previous, so cannot comment if it worked there or not.

Anders Häggström (hagge) wrote :

I'm another one in the list of people affected by this bug.
smartmontools worked out just fine on my old installation (64-bit fully updated Edgy), as long as I added "-d ata" to the command. In Feisty I get the exact same error as the first post.

Today I have tried starting from the live-cd (64-bit, if that makes any difference) and only installed smartmontools (v5.36) but I get the same result as I do with my harddisk installation of Feisty (fully uppdated with aptitude as of today).

Harddisk installation: Feisty-server
# uname -a
Linux gandalf 2.6.20-15-server #2 SMP Sun Apr 15 06:22:36 UTC 2007 x86_64 GNU/Linux

Harddisks (4pcs): ST3320620AS

And yes, SMART is enabled in bios.

jcsston (launchpad-jory) wrote :

I can also confirm this happens with the 2.6.20 kernel in feisty.

Looking at the commit logs for 2.6.21 kernel this looks like the change that fixed it for 2.6.21,
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.21.y.git;a=commit;h=af068bd1debcc76c1bc265aa01401901bf0067ed

Ramaddan (ramaddan) wrote :

Just to confirm.

Same problem here, and everything is up to date.

Ramaddan (ramaddan) wrote :

Sorry, forgot to say.

I'm using 64 bit Feisty, on an ASUS M2N32-SLI Deluxe Wireless Edition.
If that is of any help.

Adam Funk (a-funk) wrote :

I'm having the same problem with package linux-image-2.6.20-16-generic, version 2.6.20-16.29.

SuSUntu (bdk2001) wrote :

Just tried this out with latest Ubuntu Feisty kernel 2.6.20-16-generic and got the error messages from 'smartctl'. As others have reported, I had used 'smartctl' successfully under Edgy (I used it in a script to report drive info in Conky). I just got around to setting this up in Feisty after a period of laziness, so I am just discovering the issue.

Since the error message suggests using '-T permissive', I tried the '-T permissove' option, and it forces 'smartctl' to overlook the "status" error and report all other drive info successfully.

According to 'smartctl' man pages, multiple "-T permissive" commands may be required to overcome multiple errors. Since it only required one '-T permissive' command, I must conclude that the "status" error is the only one encountered. This seems to be the case as I could only find one mention of an error in the 'smartctl' output amongst all the other information. The error text is as follows:

Error SMART Status command failed
Please get assistance from http://smartmontools.sourceforge.net/
Register values returned from SMART Status command are:
CMD=0x50
FR =0x00
NS =0x00
SC =0x00
CL =0x00
CH =0x00
SEL=0x00

Also, a 'diff' (meld) comparison of output from the 'smartctl' command using '-T permissive' in one instance and '-T verypermissive' in another ('-T verypermissive' tells 'smartctl' to ignore any number of errors) yielded a difference of only the outputs' timestamps.

Bottom line: until the underlying issue is resolved (consensus thus far says it is the kernel) you can modify your commands by adding 'the '-T permissive' (which should suffice) or the '-T verypermissve' option. For example:

smartctl -a -d ata /dev/sda

becomes

smartctl -T permissive -a -d ata /dev/sda

or

smartctl -T verypermissive -a -d ata /dev/sda

I tested this on three SATA drives with success:

- Western Digital Raptor 37GB HDD (SATA 1.5 Gbit/s HDD on main MB 1.5 Gbit/s connection)
- Samsung 160GB HDD (SATA 1.5 Gbit/s HDD on main MB 1.5 Gbit/s connection)
- Seagate 320GB HDD (SATA 3.0 Gbit/s HDD on SI 3114 1.5 Gbit/s SATA/RAID controller built-in to MB)

Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue that you reported is one that should be reproducable with the live environment of the Desktop CD of the development release - Gutsy Gibbon. It would help us greatly if you could test with it so we can work on getting it fixed in the actively developed kernel. You can find out more about the development release at http://www.ubuntu.com/testing/ . Thanks again and we appreciate your help.

Changed in linux-source-2.6.20:
assignee: nobody → brian-murray
status: Confirmed → Incomplete
Adam Funk (a-funk) wrote :

"The issue that you reported is one that should be reproducable with the live environment of the Desktop CD of the development release - Gutsy Gibbon."

I'd be happy to help if I can. Is it as simple as just booting the live Gutsy CD to see if the smartctl commands work properly?

Brian Murray (brian-murray) wrote :

I'm not sure if smartctl is included on the live CD you may have to install it but booting the live CD and seeing if the smartctl commands work properly. I would also be sure to test on a device that did not work with the 2.6.20 kernel. Thanks again!

Some more info about when I discovered this bug:

- The bug was not present until the very latest beta from Feisty Fawn. Only the last release candidates gave these bugs, all versions I have run before from Edgy Eft and Dapper Drake did not have this problem either.
- I now changed my computer motherboard from a Asus A8N-VM CSM to a M2NPV-VM, both have a NVIDIA GeForce 6150 + nForce 430 chipset but the bug is still there however with all latest updates the smartcontrol program tells me to try '-T permissive'
- Adding this '-T permissive' option gives the same error but after this error all smart output is listed OK!
- A program like hdtemp does not work either and says the drive is sleeping. (I am currently not near to my PC so I cannot check the exact error)

Jools Wills (jools) wrote :

There was a kernel patch which broke smart over sata. A stock 2.6.20/2.6.21 kernel seems to be fine. Perhaps something was backported from 2.6.22 on ubuntu where the problem is also in the stock (kernel.org) kernel.

Some references

Debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=428975
KLML http://groups.google.com/group/fa.linux.kernel/browse_frm/thread/be4ed50364851176

Fix/Patch

http://article.gmane.org/gmane.linux.ide/20799/raw

Changed in linux-source-2.6.20:
status: Incomplete → Confirmed
Changed in linux-source-2.6.20:
assignee: brian-murray → ubuntu-kernel-team
importance: Undecided → Medium
status: Confirmed → Triaged
Changed in linux-source-2.6.22:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
ubuntu_demon (ubuntu-demon) wrote :

smartmontools / smartctl doesn't work in Feisty for me. But it *does* work in Gutsy (Tribe 3 with kernel 2.6.22)

My lspci :
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e2)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02)
00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)
01:04.0 CardBus bridge: O2 Micro, Inc. OZ601/6912/711E0 CardBus/SmartCardBus Controller (rev 40)
01:0a.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22/A IEEE-1394a-2000 Controller (PHY/Link)
03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
04:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 20)

Feisty :
$uname -a
Linux T-2500 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux

$ sudo smartctl -a /dev/sda
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: ATA SAMSUNG HM080JI Version: YC10
Serial number: S082J10YA48024
Device type: disk
Local Time is: Fri Aug 3 02:44:20 2007 CEST
Device does not support SMART

Error Counter logging not supported

[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']
Device does not support Self Test logging

Download full text (5.6 KiB)

The same here with Feisty 2.6.20-16-generic, also tried the previous kernel 2.6.20-15-generic
smartmontools do not work.

Also tried to upgrade smartmontools to 5.37 (used the *.deb package from sourceforge and confirmed that filenames and places where they go are identical to the official 5.36 coming with Ubuntu) -> does nort work:

------------
sudo smartctl -a /dev/sda
Password: *****
smartctl version 5.37 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.10 family
Device Model: ST3320620AS
Serial Number: 9QF22C7X
Firmware Version: 3.AAJ
User Capacity: 320.072.933.376 bytes
Device is: In smartctl database [for details use: -P show]
ATA Version is: 7
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Wed Aug 8 16:11:51 2007 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Error SMART Status command failed
Please get assistance from http://smartmontools.sourceforge.net/
Values from ATA status return descriptor are:
 00 09 0c 00 00 00 00 00 00 00 00 00 00 00 50
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
--------------------

The really annoying thing is that my 'old' openSUSE 10.3 (kernel 2.6.18.8-0.5) works perfectly.
Se a sample outputs on the very same hardware here:

--------
Capabilities:

pp:/home/ingo # smartctl -c /dev/sda
smartctl version 5.37 [i686-suse-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF READ SMART DATA SECTION ===
General SMART Values:
Offline data collection status: (0x82) Offline data collection activity
                                        was completed without error.
                                        Auto Offline Data Collection:
Enabled.
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: ( 430) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
                                        Auto Offline data collection
on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        No 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 suppo...

Read more...

Chuck Short (zulcss) wrote :

Added the fix to my git tree.

Changed in linux-source-2.6.22:
assignee: ubuntu-kernel-team → zulcss
status: Triaged → Fix Committed
ingo (ingo-steiner) wrote :

Many thanks!

Additionally it would be great to have the fix also backported to the current 2.6.20-16-generic kernel?

Ben Collins (ben-collins) wrote :

Chuck, please confirm whether this fix is in current release and update this bug if needed.

gumptravels (pml-dtbb) wrote :

This bug is still current on some systems, I just updated to the following kernel on two feisty systems, and one works, and one still does not.

Linux storage2 2.6.20-16-generic #2 SMP Fri Feb 1 02:59:08 UTC 2008 i686 GNU/Linux

The 'storage2' machine is using an nforce3 chipset as follows:

00:0a.0 IDE interface: nVidia Corporation CK8S Serial ATA Controller (v2.5) (rev a2)

The other system with the 'server' kernel seems to work (different sata controller also):

Linux blacktower 2.6.20-16-server #2 SMP Fri Feb 1 03:10:48 UTC 2008 i686 GNU/Linux

The 'blacktower' is running an nforce2 chipset with the following sata PCI card:

01:08.0 Mass storage controller: Promise Technology, Inc. PDC20518/PDC40518 (SATAII 150 TX4) (rev 02)

Either the generic kernel does not seem to work with smart still, or its chipset related..

I will try installing the server kernel on the storage2 machine and try to get back to this thread.. but for now, either the generic kernel is still a problem, or there is a chipset related problem.

gumptravels (pml-dtbb) wrote :

Okay, I tried the server kernel on the system with the nforce3 chipset (storage2 machine), and it still produces the following output and does not work:

root@storage2:~# smartctl --device=ata -s on /dev/sda
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
Error SMART Status command failed
Please get assistance from http://smartmontools.sourceforge.net/
Register values returned from SMART Status command are:
CMD=0x50
FR =0x00
NS =0x00
SC =0x00
CL =0x00
CH =0x00
SEL=0x00
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.

So it seems it may be chipset related... are there any fixes that can be backported to feisty?

Hardware report as follows:
root@storage2:~# lspci
00:00.0 Host bridge: nVidia Corporation nForce3 250Gb Host Bridge (rev a1)
00:01.0 ISA bridge: nVidia Corporation nForce3 250Gb LPC Bridge (rev a2)
00:01.1 SMBus: nVidia Corporation nForce 250Gb PCI System Management (rev a1)
00:02.0 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)
00:02.1 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)
00:02.2 USB Controller: nVidia Corporation nForce3 EHCI USB 2.0 Controller (rev a2)
00:05.0 Bridge: nVidia Corporation CK8S Ethernet Controller (rev a2)
00:08.0 IDE interface: nVidia Corporation CK8S Parallel ATA Controller (v2.5) (rev a2)
00:0a.0 IDE interface: nVidia Corporation CK8S Serial ATA Controller (v2.5) (rev a2)
00:0b.0 PCI bridge: nVidia Corporation nForce3 250Gb AGP Host to PCI Bridge (rev a2)
00:0e.0 PCI bridge: nVidia Corporation nForce3 250Gb PCI-to-PCI Bridge (rev a2)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R200 QL [Radeon 8500 LE]
02:06.0 Ethernet controller: Intel Corporation 82543GC Gigabit Ethernet Controller (Copper) (rev 02)

root@storage2:~# uname -a
Linux storage2 2.6.20-16-server #2 SMP Fri Feb 1 03:10:48 UTC 2008 i686 GNU/Linux

root@storage2:~# cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 12
model name : AMD Athlon(tm) 64 Processor 3000+
stepping : 0
cpu MHz : 1000.000

gumptravels (pml-dtbb) wrote :

I tried installing a backport of smartmontools 5.37, but it has the same issue.

The 'blacktower' system works even with 5.36 however.. so I don't think its smartmontools related, and still a kernel issue that may need a backported fix if its been fixed upstream already.

The Hardy Heron Alpha series was recently released which contains an updated version of the kernel. You can download and try the new Hardy Heron Alpha release from http://cdimage.ubuntu.com/releases/hardy/ . You should be able to then test the new kernel via the LiveCD. If you can, please verify if this bug still exists or not and report back your results. General information regarding the release can also be found here: http://www.ubuntu.com/testing/ . Thanks

Changed in linux:
status: New → Incomplete
Changed in linux-source-2.6.20:
status: Triaged → Won't Fix
Changed in linux-source-2.6.22:
status: Fix Committed → Fix Released
ingo (ingo-steiner) wrote :

I checked with Hardy Alpha as of Feb. 12 2008, kernel 2.6.24.?-7 amd64 version
All is ok for me with my Nvidia nForce-570-Ultra chipset.

However on Feisty the bug still persists.

I do not use Gusty here, was too buggy for my use, so I reverted to Feisty.
Ingo

I'm closing the "linux" task because this particular issue has been fixed in version 2.6.22 and marked as "won't fix" for the previous release.

Thanks for your time.

Changed in linux:
status: Incomplete → Fix Released

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.