Re: multiple issues with devstat_*(9)

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Wed, 06 Apr 2011 20:47:50 +0300
John Baldwin wrote:
> On Monday, April 04, 2011 4:43:16 pm Alexander Best wrote:
>> On Fri Apr  1 11, John Baldwin wrote:
>>> This is probably due to the hard drives being IDE (really ATA) rather than
>>> SCSI.  I agree this should show the pass devices.
>> hmmmm...one could argue. the drives are ATA, however they are being associated
>> to the CAM subsystem. depends what one considers under "scsi interface".
>> personally i'd like to see them inder "scsi".
> 
> No, SCSI is a transport protocol.  Alexandar Motin's work added a new
> transport layer that speaks ATA and that is what ada uses.  CAM does not
> send SCSI commands to adaX devices AFAIK.

Generally right, but to be complete: CAM differentiates types at
transport and protocol layers. At the protocol layer there are SCSI and
ATA protocols (used by da and ada drivers respectively, for example). At
the transport layer there never was such thing as "SCSI", there are:
SPI, FC, SAS, PPB, USB (several protocols), iSCSI, etc. All of them can
handle SCSI commands. Newly added ATA and SATA transports handle both
ATA and SCSI commands: ATA -- always, SCSI -- optionally, using ATAPI
extension.

>>>> otaku% iostat -t ide
>>>>        tty            cpu
>>>>  tin  tout us ni sy in id
>>>>    1    92  5  0  4  0 90
>>>> otaku% iostat -t other
>>>>        tty            cpu
>>>>  tin  tout us ni sy in id
>>>>    1    92  5  0  4  0 90
>>>>
>>>> ...what about md0? ada0? ada1? md0?
>>> md0 is a memory disk, it is neither SCSI nor IDE.  However, -t ide (or even
>>> better, a -t ata), should show all of your other devices (adaX and cd0) along
>>> with their passX devices I think.
>> so md0 should show up under -t other. i don't think there's a -t ata.
> 
> Yes, I think we should possibly add a -t ata, possibly as an alias for
> -t ide.

Have no objections, but I would like to clarify what exactly that option
should mean. It is simple for cases of SATA and SAS disks -- first is
IDE/ATA (ATA/SATA), second is SCSI (SCSI/SAS). But it becomes tricky for
ATA/SATA CD/DVD, ZIP/MO, tape drives - they use SCSI protocol commands,
but ATA/SATA transport. As result, while adaX devices are definitely IDE
(ATA) from any point of view; cdX, daX, saX, etc. can use any transport.
So should they be reported as SCSI, respecting command protocol, or IDE
(ATA), respecting transport?

-- 
Alexander Motin
Received on Wed Apr 06 2011 - 15:47:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC