Skip to contentSkip to conversation

SMART support for libata

DISCUSSION Greg Stark 6 participants 11 messages Dec 8, 2004 – Jun 11, 2005 libata

lore
Share & tools
lore

Greg Stark

author
#0 lore raw

I don't mean to be a pest, I'm just curious what the status is of SMART support for libata. It doesn't look like it's mentioned in any of the status updates. Did I miss it? Is it relatively low priority after the hardware support? Is anyone interested in working on it? What has to be done?

Signature · 1 line
greg
#1 lore raw

Re: SMART support for libata (SATA)

From Jeff's recent "libata-dev queue updated" email:

* ATA passthru (read: SMART support)

So it's still in the development area which (AFAIK) means it isn't being pushed into 2.6.10 :(

HTH
David

Quoted 7 lines · Greg Stark

I don't mean to be a pest, I'm just curious what the status is of SMART support for libata. It doesn't look like it's mentioned in any of the status updates. Did I miss it? Is it relatively low priority after the hardware support? Is anyone interested in working on it? What has to be done?

#2 lore raw
In reply to Greg Stark
Quoted 4 lines · Greg Stark

I don't mean to be a pest, I'm just curious what the status is of SMART support for libata. It doesn't look like it's mentioned in any of the status updates. Did I miss it? Is it relatively low priority after the hardware support? Is anyone interested in working on it? What has to be done?

The code exists in libata-dev queue. It's currently waiting on official
SCSI opcode assignments, and someone to add code to filter out SET
FEATURES - XFER MODE commands.

Jeff

author
#3 lore raw

FWIW here's a report of a bit of a problem with libata-dev and SMART support. I'm not actually clear whether this is the fault of libata or the traditional IDE drivers though.

I built 2.6.12rc4 with 2.6.11-bk6-libata-dev1.patch applied. (I had to fix up a couple things that didn't apply against 2.6.12)

I updated to 5.33 per someone's suggestion on the mailing list and SMART support started working. Yay. At that point I noticed my old PATA drive was getting really hot so I put it to sleep with "hdparm -Y".

Now whenever smartd probes that drive my system freezes for a few seconds and I get this in my syslog:

Jun  8 12:49:36 stark kernel: hda: status timeout: status=0xd0 { Busy }
Jun  8 12:49:36 stark kernel: 
Jun  8 12:49:36 stark kernel: ide: failed opcode was: 0xe5

I'm fine with failing to get SMART info from a sleeping drive. I'm not clear whether it's actually possible to get data back or not though it would be nice to know how much sleeping is lowering the drive temperature. But freezing the machine is unkind.

Signature · 1 line
greg
#4 lore raw
Quoted 8 lines · Greg Stark

getting really hot so I put it to sleep with "hdparm -Y".

Now whenever smartd probes that drive my system freezes for a few seconds and I get this in my syslog:

Jun  8 12:49:36 stark kernel: hda: status timeout: status=0xd0 { Busy }
Jun  8 12:49:36 stark kernel: Jun  8 12:49:36 stark kernel: ide: failed opcode was: 0xe5

That is normal and expected behaviour.
A "sleeping" drive never responds to commands
until woken with a reset.

You should be using "-y" (standby) instead of "-Y" (sleep).

Cheers

author
#5 lore raw
Quoted 9 lines · Mark Lord
Quoted 7 lines · Greg Stark

getting really hot so I put it to sleep with "hdparm -Y".
Now whenever smartd probes that drive my system freezes for a few seconds and I get this in my syslog:

Jun  8 12:49:36 stark kernel: hda: status timeout: status=0xd0 { Busy }
Jun  8 12:49:36 stark kernel: Jun  8 12:49:36 stark kernel: ide: failed

opcode was: 0xe5

Quoted 3 lines

That is normal and expected behaviour.
A "sleeping" drive never responds to commands
until woken with a reset.

I'm fine with errors and SMART failing to get any data.

It's the part about my entire computer freezing for 5-10s that doesn't seem kosher to me.

Quoted 1 line

You should be using "-y" (standby) instead of "-Y" (sleep).

I'll try that. But that's not going to make it spin up when it gets a SMART query is it?

Signature · 1 line
greg
#6 lore raw

Greg Stark wrote:
..

Quoted 4 lines
Quoted 1 line

You should be using "-y" (standby) instead of "-Y" (sleep).

I'll try that. But that's not going to make it spin up when it gets a SMART query is it?

Depends on what SMART items are being queried.

Actually, what you should *really* be using is "hdparm -S" with a suitable timeout value (say, 30 or larger).

Cheers

author
#7 lore raw
Quoted 10 lines · Mark Lord

Greg Stark wrote:
..

Quoted 3 lines
Quoted 1 line

You should be using "-y" (standby) instead of "-Y" (sleep).

I'll try that. But that's not going to make it spin up when it gets a SMART query is it?

Depends on what SMART items are being queried.

Actually, what you should *really* be using is "hdparm -S" with a suitable timeout value (say, 30 or larger).

Not really since the drive will just spin up ever few seconds as bdflush (or whatever it's called these days) dribbles out pages.

What I should *really* be using is the noflushd daemon. That's been on hold since I found it didn't work with SATA drives. But I wonder if it would work these days.

Signature · 1 line
greg
#8 lore raw
Quoted 14 lines · Greg Stark
Quoted 10 lines · Mark Lord

Greg Stark wrote:
..

Quoted 3 lines
Quoted 1 line

You should be using "-y" (standby) instead of "-Y" (sleep).

I'll try that. But that's not going to make it spin up when it gets a SMART query is it?

Depends on what SMART items are being queried.

Actually, what you should *really* be using is "hdparm -S" with a suitable timeout value (say, 30 or larger).

Quoted 6 lines

Not really since the drive will just spin up ever few seconds as bdflush (or whatever it's called these days) dribbles out pages.

What I should *really* be using is the noflushd daemon. That's been on hold since I found it didn't work with SATA drives. But I wonder if it would work these days.

noflushd is ancient, have you tried playing with laptop mode?

Signature · 1 line
Jens Axboe
author
#9 lore raw
Quoted 7 lines · Jens Axboe
Quoted 5 lines
Quoted 1 line

Greg Stark wrote:

What I should *really* be using is the noflushd daemon. That's been on hold since I found it didn't work with SATA drives. But I wonder if it would work these days.

noflushd is ancient, have you tried playing with laptop mode?

Where do I find more about this?

Signature · 1 line
greg
#10 lore raw
Quoted 11 lines · Greg Stark
Quoted 7 lines · Jens Axboe
Quoted 5 lines
Quoted 1 line

Greg Stark wrote:

What I should *really* be using is the noflushd daemon. That's been on hold since I found it didn't work with SATA drives. But I wonder if it would work these days.

noflushd is ancient, have you tried playing with laptop mode?

Where do I find more about this?

Documentation/laptop-mode.txt

Quoted 1 line

greg

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed