From: Douglas Gilbert <dougg@torque.net>
To: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: Richard Bollinger <rabollinger@gmail.com>,
linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: SATA Drive Information (vs hdparm -i)?
Date: Fri, 23 Sep 2005 11:06:55 +1000 [thread overview]
Message-ID: <4333552F.6070207@torque.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0509221729480.6613@shark.he.net>
Randy.Dunlap wrote:
> On Fri, 23 Sep 2005, Douglas Gilbert wrote:
>
>
>>Richard Bollinger wrote:
>>
>>>Is there a program for SATA drives which reveals the depth of
>>>information that "hdparm -i" does for IDE drives? sdparm reveals
>>>almost nothing in comparison:
>>>
>>># sdparm -i /dev/sda
>>> /dev/sda: ATA WDC WD3200JD-00K 08.0
>>>Device identification VPD page:
>>> Addressed logical unit:
>>> id_type: vendor specific [0x0], code_set: ASCII
>>> 00 4c 69 6e 75 78 20 41 54 41 2d 53 43 53 49 20 73 Linux ATA-SCSI s
>>> 10 69 6d 75 6c 61 74 6f 72 imulator
>>
>>Richard,
>>libata needs to improve the information it provides for
>>the Device Identification VPD page [0x83]. For example
>>as defined in section 10.3.4.2 in the just released sat-r06 .
>>Something approaching a world wide unique identifier is
>>needed.
>>
>>
>>># hdparm -i /dev/hda
>>>
>>>/dev/hda:
>>>
>>> Model=WDC WD800BB-00JHC0, FwRev=05.01C05, SerialNo=WD-MAM96054404
>>> Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs mtGapReq }
>>> RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=66
>>> BuffType=unknown, BuffSize=2048kB, MaxMultSect=16, MultSect=off
>>> CurCHS=16383/16/63, CurSects=-66060037, LBA=yes, LBAsects=156301488
>>> IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
>>> PIO modes: pio0 pio3 pio4
>>> DMA modes: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 *udma5
>>> AdvancedPM=no
>>> Drive Supports : Reserved : ATA-1 ATA-2 ATA-3 ATA-4 ATA-5 ATA-6
>>
>>However an improved "sdparm -i" is not what you seem to be
>>asking for. Most of the above information is derived from
>>the response to the IDENTIFY [PACKET] DEVICE ATA command.
>>There seems to be two options for providing this:
>> 1) libata to implement ioctls like HDIO_GET_IDENTITY
>> 2) libata to implement SCSI ATA Translation [SAT]
>> facilities such as:
>> a) the ATA Information VPD page
>> b) SCSI ATA pass through commands
>> c) MODE SELECT SCSI command
>>
>>Option 1) is the simplest but it requires that the SAT layer
>>is on the host computer [as it is in the case of libata].
>>Hopefully external USB and Firewire storage enclosures will
>>be enhanced to support the [draft] SAT standard and in
>>that case the SAT layer will be in the enclosure. SATA
>>disks [and S-ATAPI devices] in a SAS fabric may either
>>tunnel through the SAS fabric [via SAS Tunnelling Protocol
>>[STP]] or have a SAT layer in the fabric [typically in the
>>enclosure holding the disks]. Only the STP route allows for
>>option 1) .
>>
>>I have published some patches for 2 a) and 2 c) and someone
>>else has published some patches for 2 b). I am unaware
>>if any have been accepted into libata yet.
>>
>>Option 2) still needs an application client to output
>>information like "hdparm -i". "sdparm --page=ai" will
>>do this at a lower level if 2) a is implemented in
>>libata. Another approach is to make the hdparm application
>>libata aware and issue [shock horror] SCSI commands :-)
>>
>>hdparm has a "-Istdin" command line option which accepts
>>the raw (binary) IDENTIFY x DEVICE response. So
>>implementing option 2 a), using sg_inq, dd and finally
>>hdparm could do it. That is a bit convoluted.
>
>
> Jeff also has 'blktool' that may be useful.
> Latest available afaik is at sf.net/projects/gkernel .
>
> sample output on my SATA /dev/sda:
>
> # ./blktool /dev/sda id
> scsi-version: 5
> vendor-id: ATA
> product-id: ST3160023AS
> product-rev: 3.00
> device-type: direct-access
> sectors: 312581808
> sector-size: 512
> #
Randy,
Thanks for reminding me about blktool.
blktool's information is derived from a SCSI INQUIRY
command (and a READ CAPACITY command). sg3_utils's
"sg_inq /dev/sda" will give something similar.
For SATA disks this is a subset of the information
provided by the IDENTIFY DEVICE ATA command.
A "standard" SCSI INQUIRY responds with 36 bytes of
information (although the associated VPD pages,
when implemented, provide a lot more information) while
the IDENTIFY DEVICE ATA command responds with 512 bytes
of information.
My guess is that Richard is interested in the transport
specific information shown in "hdparm -i".
Doug Gilbert
next prev parent reply other threads:[~2005-09-23 1:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-22 19:06 SATA Drive Information (vs hdparm -i)? Richard Bollinger
2005-09-23 0:23 ` Douglas Gilbert
2005-09-23 0:31 ` Randy.Dunlap
2005-09-23 1:01 ` Richard Bollinger
2005-09-23 1:14 ` Douglas Gilbert
2005-09-23 1:18 ` Richard Bollinger
2005-09-23 1:16 ` Ric Wheeler
2005-09-23 1:20 ` Randy.Dunlap
2005-09-23 1:33 ` Ric Wheeler
2005-09-23 1:06 ` Douglas Gilbert [this message]
2005-09-23 1:50 ` Mark Lord
2005-09-23 14:22 ` Luben Tuikov
2005-09-24 3:18 ` Douglas Gilbert
2005-09-25 14:56 ` Luben Tuikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4333552F.6070207@torque.net \
--to=dougg@torque.net \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=rabollinger@gmail.com \
--cc=rdunlap@xenotime.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.