Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Running hdparm -Tt on a SATA drive: Inappropriate ioctl
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
IvanYosifov
l33t
l33t


Joined: 15 Oct 2004
Posts: 778
Location: Bulgaria

PostPosted: Tue Oct 11, 2005 9:43 am    Post subject: Running hdparm -Tt on a SATA drive: Inappropriate ioctl Reply with quote

Hi,

Code:

home ~ # hdparm -Tt /dev/sda

/dev/sda:
 Timing cached reads:   3112 MB in  2.00 seconds = 1555.46 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
 Timing buffered disk reads:  162 MB in  3.03 seconds =  53.47 MB/sec
HDIO_DRIVE_CMD(null) (wait for flush complete) failed: Inappropriate ioctl for device
home ~ #


Are those "Inappropriate ioctl for device" errors normal ? I seem to be getting them on almost all hdparm options, even simple things like:

Code:

home ~ # hdparm -i /dev/sda

/dev/sda:
 HDIO_GET_IDENTITY failed: Inappropriate ioctl for device
home ~ #


The HDD is a Seagate Barracuda 7200.7 160GB.
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Tue Oct 11, 2005 10:11 am    Post subject: Reply with quote

Unfortunately, you can't use hdparm (or hddtemp, or similar) on SATA devices yet.

Try on an ide drive and you shouldn't see any problems.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
IvanYosifov
l33t
l33t


Joined: 15 Oct 2004
Posts: 778
Location: Bulgaria

PostPosted: Wed Oct 12, 2005 7:43 am    Post subject: Reply with quote

O, shit.

FYI, I found this on hdparm's freshmeat page.

Quote:

> is hdparm useful with sata drives, does

> it work with sata drives?

SATA drives in the 2.6 kernel are handled by the new "libata" SCSI driver. If you add the "ATA passthru" patch (from Jeff Garzik) to your kernel, then hdparm can work with those drives.

Some flags, like "-d", are not supported by libata. Currently, ALL SATA hard drives use DMA, so there is no need for -d. But eventually libata will have to implement ATA PIO (for CF cards..), and at that time it may (or not) begin to support the "-d" flag.


So it should be working with some kernel patching. :)
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Wed Oct 12, 2005 10:57 am    Post subject: Reply with quote

I forgot to mention sdparm, which some users have reported as been quite usable with SATA drives, look on the forums for details.
Haven't tried it myself yet.

IvanYosifov wrote:
FYI, I found this on hdparm's freshmeat page.

-- snip --

So it should be working with some kernel patching. :)

Nice find!

From the mentioned developer; http://linux.yyz.us/sata/, and the patches(?), http://www.kernel.org/pub/linux/kernel/people/jgarzik/libata/.

It's probably only a matter of time before it's added to the kernel.

The one which really interests me, from http://linux.yyz.us/sata/software-status.html
Quote:
SMART support
SMART support will be integrated very soon. SCSI T10 committee assigned the necessary opcode numbers for ATA passthru (SMART support requires this, in libata). Now only a few small tweaks are needed before this can be integrated into mainline.

There are also some lingering reports that using SMART commands while the disk is in heavy usage leads to timeouts and other failures. This needs to be investigated.

This was updated only 6 days ago, and refers to 2.6.13-rcX, so things are definately moving along.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
IvanYosifov
l33t
l33t


Joined: 15 Oct 2004
Posts: 778
Location: Bulgaria

PostPosted: Fri Oct 14, 2005 7:21 am    Post subject: Reply with quote

It is good to see that things are moving along. I hope the patches go into the mainline kernel soon. :D
Back to top
View user's profile Send private message
IvanYosifov
l33t
l33t


Joined: 15 Oct 2004
Posts: 778
Location: Bulgaria

PostPosted: Sat Oct 22, 2005 2:47 pm    Post subject: Reply with quote

http://www.ussg.iu.edu/hypermail/linux/kernel/0510.2/1325.html

We should be having it in the 2.6.15 vanilla kernel.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum