How to tell which SATA controller a drive is using?

My motherboard has three separate SATA controllers each in their own IOMMU group. Two ASMedia controllers and the one in the Intel PCH.

I want to make sure my main drives are using the Intel controller.

How can I see which SATA controllers are being used and for which drives?

Looking for GNU/Linux commands that display text info.

EDIT: Here's my lshw -class storage -class disk output:

*-storage description: SATA controller product: ASM1062 Serial ATA Controller vendor: ASMedia Technology Inc.
*-storage description: SATA controller product: ASM1062 Serial ATA Controller vendor: ASMedia Technology Inc.
*-storage description: SATA controller product: 9 Series Chipset Family SATA Controller [AHCI Mode] vendor: Intel Corporation
*-scsi:0 physical id: 1 logical name: scsi2 capabilities: emulated *-disk description: ATA Disk bus info: scsi@2:0.0.0
*-scsi:1 physical id: 2 logical name: scsi3 capabilities: emulated *-disk description: ATA Disk bus info: scsi@3:0.0.0
*-scsi:2 physical id: 3 logical name: scsi4 capabilities: emulated *-disk description: ATA Disk bus info: scsi@4:0.0.0
2

2 Answers

The device hierarchy is available in /sys, if you don't want to do it manually, you can use udevadm:

$ udevadm info -q path -n /dev/sda
/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0/block/sda

So on my system, /dev/sda is SCSI unit 0:0:0:0, and the SATA controller has PCI id 0000:00:1f.2, which is the Intel PCH controller:

$ lspci
00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series Chipset Family SATA AHCI Controller (rev 05)
1
$ ls -l /sys/class/block |grep -I "sd*"

Then lspci | grep SATA to find it

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like