Skip to main content

How can get RAID bus ID by label? [Resolved]

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.


Question Credit: Black S.
Question Reference
Asked March 17, 2019
Tags: raid, centos6
Posted Under: Network
15 views
1 Answers

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)

credit: bodgit
Answered March 17, 2019
Your Answer