You should be able to compare the disk serial number from -pdlist
with the output from lshw
.
# MegaCLI -pdlist -a0 | grep "Inquiry Data:"
Inquiry Data: XXXXXXXXXXXXHitachi YYYYYYYY ZZZZZZ
...
Then search the output of lshw
for the serial number. The device name will be in the logical name
field.
I can't verify this because all of my disks are in a volume.
Identifying Logical Drives
Compare the Target Id
from MegaCLI with the scsi bus target for the device. In lshw
it is bus info
.
# MegaCli -ldinfo -Lall -aall
Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-6, Secondary-0, RAID Level Qualifier-3
Size : 7.275 TB
State : Optimal
Strip Size : 64 KB
Number Of Drives : 6
Span Depth : 1
Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Access Policy : Read/Write
Disk Cache Policy : Disabled
Ongoing Progresses:
Check Consistency : Completed 17%, Taken 89 min.
Encryption Type : None
Virtual Drive: 1 (Target Id: 1)
Name :
RAID Level : Primary-6, Secondary-0, RAID Level Qualifier-3
Size : 7.275 TB
State : Optimal
Strip Size : 64 KB
Number Of Drives : 6
Span Depth : 1
Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Access Policy : Read/Write
Disk Cache Policy : Disabled
Ongoing Progresses:
Check Consistency : Completed 17%, Taken 89 min.
Encryption Type : None
From lshw:
# lshw -class disk
...
*-enclosure UNCLAIMED
description: SCSI Enclosure
product: Bobcat
vendor: LSI CORP
physical id: 1.75.0
bus info: scsi@0:1.117.0
version: 0504
configuration: ansiversion=5
*-disk:0
description: SCSI Disk
product: MR9260-16i
vendor: LSI
physical id: 2.0.0
bus info: scsi@0:2.0.0
logical name: /dev/sda
version: 2.12
serial: svDASJ-f8kM-4qp5-BswW-3IKC-DDyA-djz8N7
size: 7450GiB
capacity: 7450GiB
capabilities: lvm2
configuration: ansiversion=5
*-disk:1
description: SCSI Disk
product: MR9260-16i
vendor: LSI
physical id: 2.1.0
bus info: scsi@0:2.1.0
logical name: /dev/sdb
version: 2.12
serial: NHUvUy-1tm4-aGYW-g6DZ-t1Z9-gxW8-JhvFfL
size: 7450GiB
capacity: 7450GiB
capabilities: lvm2
configuration: ansiversion=5