12

I have 3 SATA devices on my system. They show up under /proc/scsi/scsi, although these are not SCSI devices. Why do my SATA devices show up under the SCSI directory?

$ cat /proc/scsi/scsi 
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: WDC WD2500AAJS-6 Rev: 01.0
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: TSSTcorp Model: CDDVDW TS-H653Z  Rev: 4303
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi4 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: ST3320620AS      Rev: 3.AA
  Type:   Direct-Access                    ANSI  SCSI revision: 05

1 Answer 1

22

They show up as SCSI devices because the drivers speak SCSI to the next kernel layer (the generic disk driver). This isn't actually true of all SATA drivers on all kernel versions with all kernel compile-time configurations, but it's common. Even PATA devices can appear as SCSI at that level (again, that depends on the kernel version and kernel compile-time configuration, as well as whether the ide-scsi module is used).

It doesn't really matter whether the driver speaks SCSI to the physical device. Often, it does. ATAPI, used for talking to PATA/SATA optical drives and other devices, is a SCSI-based protocol encapsulation. However, PATA/SATA disks don't use ATAPI. The libata set of drivers also includes a translator between the ATA command set and SCSI so that you can place PATA/SATA disks under the umbrella of the SCSI subsystem. The separate ide interface inside the kernel is more of a historical survivance.

You'll notice that USB disks also appear as SCSI, for the same reason (and they speak SCSI too on the USB bus). The same goes for Firewire.

7
  • Do many IDE devices speak SCSI, and do they show up under /proc/scsi? On another system, I have an IDE DVD drive which is listed under /proc/ide/hdb/model. Commented Nov 10, 2010 at 1:37
  • @Stefan: All non-ancient IDE hardware devices speak SCSI to the controller. All (I think) IDE drivers can speak SCSI (or maybe I should say look SCSI) to the generic disk layer if compiled accordingly, but they (and a few SATA drivers) can also look like IDE. Commented Nov 10, 2010 at 1:45
  • Gilles, can you please precise the layers (from hw to Linux upper layers)? I guess we have something like: device (physical drive), SATA host controller (PHY HBA), Low level driver (receiving SCSI commands, speaking to PHY HBA), SCSI-core midlayer (scsi_mod.ko), libata OR scsi-disk-driver (sd_mod.ko), block (available through /dev/sdX). Do you agree?
    – Totor
    Commented Nov 3, 2013 at 18:10
  • I meant "can you please specify"...
    – Totor
    Commented Nov 4, 2013 at 0:46
  • Does it mean the protocol which is used betwenn the mainboard and the drive is SCSI?
    – zomega
    Commented Nov 21, 2022 at 18:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .