1

I have some problem of identify RAID adapter in Centos 6.5

I have some LSI RAID adapters in one server. For any RAID adapters I cat get bus id by lspci. Also I have list of block devs (for example /dev/sd[b,c,d,f]).

How I can identify for specified dev (for example /dev/sdf) its RAID adapter bus id ?

Thanks for your time.

bodgit
  • 4,661
  • 13
  • 26
Black S.
  • 35
  • 3

1 Answers1

1

You can work out which PCI device owns a disk block device using the /dev/disk/by-path/* nodes, for example:

$ ls -l /dev/disk/by-path/*
lrwxrwxrwx. 1 root root  9 Mar  2 18:10 /dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx. 1 root root 10 Mar  2 18:10 /dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx. 1 root root 10 Mar  2 18:10 /dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0-part2 -> ../../sda2
lrwxrwxrwx. 1 root root 10 Mar  2 18:10 /dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0-part3 -> ../../sda3

This is on a VMware machine, so for example sda is owned by PCI device 03:00.0 corresponds to:

03:00.0 Serial Attached SCSI controller: VMware PVSCSI SCSI Controller (rev 02)
bodgit
  • 4,661
  • 13
  • 26