eLvErDe / hwraid

HWRaid: Free code from http://hwraid.le-vert.net
GNU General Public License v2.0
268 stars 103 forks source link

pci path over written during loop #94

Closed CrystalCat closed 5 years ago

CrystalCat commented 5 years ago

Hi dev~ I've found an issue during using megaraid-status script,desc as bellow:

adapter : PERC H730P Mini pd num: 164T + 21.2T drive drive using: 164T drives config as JBOD ,21.2T drives config as a RAID1 LD drive

lsscsi output:

[anaconda root@localhost disk_selector]# lsscsi
[0:0:0:0]    cd/dvd  iDRAC    Virtual CD       0329  /dev/sr0 
[0:0:0:1]    disk    iDRAC    Virtual Floppy   0329  /dev/sdr 
[1:0:0:0]    disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sda 
[1:0:1:0]    disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdb 
[1:0:2:0]    disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdc 
[1:0:3:0]    disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdd 
[1:0:4:0]    disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sde 
[1:0:5:0]    disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdf 
[1:0:6:0]    disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdg 
[1:0:7:0]    disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdh 
[1:0:8:0]    disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdi 
[1:0:9:0]    disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdj 
[1:0:10:0]   disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdk 
[1:0:11:0]   disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdl 
[1:0:14:0]   disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdm 
[1:0:15:0]   disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdn 
[1:0:16:0]   disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdo 
[1:0:17:0]   disk    ATA      ST4000NM0033-9ZM GA6E  /dev/sdp 
[1:2:0:0]    disk    DELL     PERC H730P Mini  4.27  /dev/sdq 

As we can see , /dev/sdq is the RAID1 LD drive, /dev/sda~sdo are JBOD drives.

exec megaraid-status in debug mode,output as bellow:

[anaconda root@localhost MegaCli]# ./megaraid-status 
# DEBUG : Looking for MegaCli64 in PATH next..
# DEBUG : Looking in PATH /bin
# DEBUG : Looking in PATH /sbin
# DEBUG : Looking in PATH /usr/bin
# DEBUG : Looking in PATH /usr/sbin
# DEBUG : Looking in PATH /mnt/sysimage/sbin
# DEBUG : Looking in PATH /mnt/sysimage/usr/sbin
# DEBUG : Looking in PATH /mnt/sysimage/bin
# DEBUG : Looking in PATH /mnt/sysimage/usr/bin
# DEBUG : Looking in PATH ./
# DEBUG : Found "MegaCli64" at ./MegaCli64
# DEBUG : Will use MegaCLI from here: ./MegaCli64
# DEBUG : Not a Cached value: ./MegaCli64 -adpCount -NoLog
-- Controller information --
# DEBUG : Not a Cached value: ./MegaCli64 -AdpAllInfo -a0 -NoLog
# DEBUG : Not a Cached value: ./MegaCli64 -AdpBbuCmd -GetBbuStatus -a0 -NoLog
-- ID | H/W Model       | RAM    | Temp | BBU    | Firmware     
c0    | PERC H730P Mini | 2048MB | 77C  | Good   | FW: 25.5.0.0018 

-- Array information --
# DEBUG : Not a Cached value: ./MegaCli64 -LDInfo -lall -a0 -NoLog
# DEBUG : Not a Cached value: ./MegaCli64 -LDInfo -l0 -a0 -NoLog
# DEBUG : Got Cached value: ./MegaCli64 -LDInfo -l0 -a0 -NoLog
# DEBUG : RAID Level: 1 Span Depth: 1 Disk Per Span: 0 Raid Type: RAID-1
# DEBUG : Not a Cached value: ./MegaCli64 -AdpGetPciInfo -a0 -NoLog
# DEBUG : Array PCI path : 0000:02:00.0
# DEBUG : Got Cached value: ./MegaCli64 -LDInfo -lall -a0 -NoLog
# DEBUG : Got Cached value: ./MegaCli64 -LDInfo -l0 -a0 -NoLog
# DEBUG : RAID Level: 1 Span Depth: 1 Disk Per Span: 0 Raid Type: RAID-1
/dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:0:0 0
/dev/disk/by-path/pci-0000:02:00.0-scsi-0:1:/dev/sda:0 /dev/sda
/dev/disk/by-path/pci-0000:02:00.0-scsi-0:2:/dev/sda:0 /dev/sda
/dev/disk/by-path/pci-0000:02:00.0-scsi-0:3:/dev/sda:0 /dev/sda
/dev/disk/by-path/pci-0000:02:00.0-scsi-0:4:/dev/sda:0 /dev/sda
/dev/disk/by-path/pci-0000:02:00.0-scsi-0:5:/dev/sda:0 /dev/sda
/dev/disk/by-path/pci-0000:02:00.0-scsi-0:6:/dev/sda:0 /dev/sda
/dev/disk/by-path/pci-0000:02:00.0-scsi-0:7:/dev/sda:0 /dev/sda
-- ID | Type   |    Size |  Strpsz | Flags | DskCache |   Status |  OS Path | CacheCade |InProgress   
c0u0  | RAID-1 |   1090G |   64 KB | RA,WB |  Default |  Optimal | /dev/sda | None      |None

OS Path should be /dev/sdq ,but it shows /dev/sda

[anaconda root@localhost disk_selector]# ls -al /dev/disk/by-path
total 0
drwxr-xr-x 2 root root 480 Sep 28 09:51 .
drwxr-xr-x 7 root root 140 Sep 28 09:51 ..
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:00:1a.0-usb-0:1.6.4:1.0-scsi-0:0:0:0 -> ../../sr0
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:00:1a.0-usb-0:1.6.4:1.0-scsi-0:0:0:1 -> ../../sdr
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:10:0 -> ../../sdk
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:11:0 -> ../../sdl
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:14:0 -> ../../sdm
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:15:0 -> ../../sdn
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:16:0 -> ../../sdo
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:17:0 -> ../../sdp
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:1:0 -> ../../sdb
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:2:0 -> ../../sdc
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:3:0 -> ../../sdd
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:4:0 -> ../../sde
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:5:0 -> ../../sdf
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:6:0 -> ../../sdg
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:7:0 -> ../../sdh
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:8:0 -> ../../sdi
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:0:9:0 -> ../../sdj
lrwxrwxrwx 1 root root   9 Sep 28 09:51 pci-0000:02:00.0-scsi-0:2:0:0 -> ../../sdq
lrwxrwxrwx 1 root root  10 Sep 28 09:51 pci-0000:02:00.0-scsi-0:2:0:0-part1 -> ../../sdq1
lrwxrwxrwx 1 root root  10 Sep 28 09:51 pci-0000:02:00.0-scsi-0:2:0:0-part2 -> ../../sdq2
lrwxrwxrwx 1 root root  10 Sep 28 09:51 pci-0000:02:00.0-scsi-0:2:0:0-part3 -> ../../sdq3

OS Path detection code as bellow :

               while arrayindex < arraynumber:
                        ldid = LDTable[controllerid][arrayindex]
                        cmd = '%s -LDInfo -l%d -a%d -NoLog' % (megaclipath, ldid, controllerid)
                        output = getOutput(cmd)
                        arrayinfo = returnArrayInfo(output,controllerid, ldid, arrayindex)

                        if pcipath:
                                diskprefix = str('/dev/disk/by-path/pci-' + pcipath + '-scsi-0:')
                                for j in range (8):
                                        diskpath = diskprefix + str(j) + ':' + str(arrayinfo[7]) + ':0'
                                        if os.path.exists(diskpath):
                                                arrayinfo[7] = os.path.realpath(diskpath)
                        else:
                                arrayinfo[7] = 'N/A'

                        # Pad the string length, just to make sure it's aligned with the headers...
                        if (rlen < len("Type")):

RAID1 LD info:

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :Virtual Disk 0
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 1.090 TB
Sector Size         : 512
Is VD emulated      : No
Mirror Data         : 1.090 TB
State               : Optimal
Strip Size          : 64 KB
N........

in my case , RAID1 LD target id is : 0

so the first pcipath will be /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:0:0 which is /dev/sda,then arrayinfo[7] (targetid) will be updated as /dev/sda , the rest of the loop won't match any path anymore.

pls help to check this issue,tkx~

ElCoyote27 commented 5 years ago

Ho, thanks for your report. Would you mind posting the output of:

find /dev/disk -ls

Thanks, V

CrystalCat commented 5 years ago

Hi~

command find /dev/disk -ls output

    26    0 drwxr-xr-x   7 root     root          140 Sep 30 20:15 /dev/disk/
   113    0 drwxr-xr-x   2 root     root          580 Sep 30 12:15 /dev/disk/by-uuid
 11162    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/9b3200d3-5a7c-459c-83da-23836dcc5ef2 -> ../../dm-8
 30309    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/2df84f6c-ae56-4ad8-a352-88396778c302 -> ../../dm-6
 15849    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/5ba381c2-1157-448e-8a4a-1dfd9a9300a7 -> ../../dm-5
 18834    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/93490627-edaf-489d-a492-dbfd673649d0 -> ../../dm-3
 19715    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/dcaf6c91-2c7f-4a1d-90b5-8fa9c4dc44c7 -> ../../dm-4
 18814    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/d185d860-8adf-479e-8c53-5e8a681a051d -> ../../dm-7
   319    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/72e023ff-d86a-4be4-9e84-84afeeba1cb7 -> ../../dm-2
   293    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/04352395-6e33-4737-bf02-c37155a796f2 -> ../../dm-1
   259    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/a1889873-7fe4-4687-8925-cd0705f6bdd7 -> ../../dm-0
 17638    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/d82900f7-40bd-4503-bcdf-3fc04bb79ec5 -> ../../sdh1
 27717    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/be6a8ccc-b0be-4a67-a871-fceabf7b4749 -> ../../sdb1
 11023    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/01baabc4-28c5-4b21-a3bc-d5a2087ee719 -> ../../sda1
 23668    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/38aa690e-74b0-46df-b0b3-ed521c2819b9 -> ../../sdm1
 28758    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/42b61347-efb8-46f0-a9ca-accd84c55296 -> ../../sde1
 25673    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/88800ef8-dee9-46e1-8374-2abb9306c48d -> ../../sdo1
   244    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/0ef92d72-8cf2-4874-9a71-f0367b53a04f -> ../../sdi1
 15551    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/e1007ffb-2892-41cf-a857-539ea4e77fb0 -> ../../sdg1
 31809    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/a486da32-cbc3-4bb6-9c7c-bfd24a62fd15 -> ../../sdk1
 30842    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/f7375c8d-30fb-4ec5-b5c2-627d001c7879 -> ../../sdj1
 24639    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/309f0f66-ef67-4139-bed8-afffffc286dc -> ../../sdn1
 18628    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/7d843991-1b33-4bbe-9731-9b318bb3b688 -> ../../sdd1
   222    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/6cdd5a71-29c1-45d9-a1e4-716c24d588d8 -> ../../sdl1
 12413    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/a5ec5630-3a6e-44ab-b3f9-8a286e15f448 -> ../../sdc1
 17616    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/afd711dc-91fd-4377-beac-516311792c5a -> ../../sdf1
 25651    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/bfd4d5ad-f699-4150-9867-f83524e31a56 -> ../../sdp1
 29761    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/7da30ac6-6e87-4fa1-8c57-b03c13237f7a -> ../../sdq2
   114    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-uuid/1F2D-0C9A -> ../../sdq1
   103    0 drwxr-xr-x   2 root     root           80 Sep 30 12:15 /dev/disk/by-partlabel
 11139    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partlabel/primary -> ../../sdg1
   104    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partlabel/EFI\\x20System\\x20Partition -> ../../sdq1
    55    0 drwxr-xr-x   2 root     root          420 Sep 30 20:15 /dev/disk/by-partuuid
 17632    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/40cb1417-c1a1-42dc-8dff-a4b4fb3ed562 -> ../../sdh1
 27711    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/45c44f7f-ae89-4f75-8699-c2eb8e4e2901 -> ../../sdb1
 11017    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/0d8b8d33-ecca-42c9-a434-557f738e7f20 -> ../../sda1
 23662    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/51720bb9-7762-4a7b-8285-1daa7fe2d991 -> ../../sdm1
 28752    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/7a9ef840-5e65-41c6-bb46-d45b7aa577e1 -> ../../sde1
 25667    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/b1ae254f-a5ec-4a03-97a1-3e0891beaba2 -> ../../sdo1
   238    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/1be233eb-47e2-4668-8981-bdb147805890 -> ../../sdi1
 15545    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/2884275d-3d6e-4e7c-a095-5f3b27775ff2 -> ../../sdg1
 31803    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/fa08443d-b78c-4632-b38f-adca79da6129 -> ../../sdk1
 30836    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/0cf50f33-e318-4157-8e40-a094655f8948 -> ../../sdj1
 24633    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/c90c5f32-8c7d-4301-9016-664e09e6b3f1 -> ../../sdn1
 18622    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/bf373120-ee3e-4359-b854-d8184eb442b8 -> ../../sdd1
   216    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/45e63599-f793-40fe-81ac-de0def4e9b7f -> ../../sdl1
 12407    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/dc4cf58f-d827-41b7-a9a1-fe1b881a14ea -> ../../sdc1
 17610    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/3c8e23e0-f1b1-4449-86a3-e15004cab90a -> ../../sdf1
 25645    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/cc3adde0-70c5-4870-9a2c-75f136c74975 -> ../../sdp1
 29755    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/96125b39-e8ed-4598-a8a4-8108ef53a9d5 -> ../../sdq2
   107    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/6e27b14c-5722-4376-aca2-1d752e9a3a75 -> ../../sdq1
    56    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-partuuid/c1e83ad2-a1b5-47d8-a371-b7304afbea98 -> ../../sdq3
    34    0 drwxr-xr-x   2 root     root          760 Sep 30 20:15 /dev/disk/by-path
 17635    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:7:0-part1 -> ../../sdh1
 27714    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:1:0-part1 -> ../../sdb1
 11020    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:0:0-part1 -> ../../sda1
 23665    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:14:0-part1 -> ../../sdm1
 28755    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:4:0-part1 -> ../../sde1
 25670    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:16:0-part1 -> ../../sdo1
   241    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:8:0-part1 -> ../../sdi1
 15548    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:6:0-part1 -> ../../sdg1
 31806    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:10:0-part1 -> ../../sdk1
 30839    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:9:0-part1 -> ../../sdj1
 24636    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:15:0-part1 -> ../../sdn1
 18625    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:3:0-part1 -> ../../sdd1
   219    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:11:0-part1 -> ../../sdl1
 12410    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:2:0-part1 -> ../../sdc1
 17613    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:5:0-part1 -> ../../sdf1
 28736    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:1:0 -> ../../sdb
 23646    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:14:0 -> ../../sdm
 27695    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:0:0 -> ../../sda
 30820    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:7:0 -> ../../sdh
 28722    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:4:0 -> ../../sde
   200    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:16:0 -> ../../sdo
 25648    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:17:0-part1 -> ../../sdp1
   186    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:6:0 -> ../../sdg
   172    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:9:0 -> ../../sdj
 17594    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:8:0 -> ../../sdi
 31787    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:10:0 -> ../../sdk
 27681    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:15:0 -> ../../sdn
   158    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:11:0 -> ../../sdl
 15529    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:3:0 -> ../../sdd
 11678    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:2:0 -> ../../sdc
 17580    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:17:0 -> ../../sdp
 27667    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:5:0 -> ../../sdf
 29758    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:2:0:0-part2 -> ../../sdq2
   110    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:2:0:0-part1 -> ../../sdq1
    59    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:2:0:0-part3 -> ../../sdq3
    35    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-path/pci-0000:02:00.0-scsi-0:2:0:0 -> ../../sdq
    27    0 drwxr-xr-x   2 root     root         1860 Sep 30 12:15 /dev/disk/by-id
 11159    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-uuid-LVM-32skd9Ir53e0wLdZc9EFtumOe8Qu3DYIH1fVGuSKcOYVM96v1oHm6i6whsXLE8Cx -> ../../dm-8
 11156    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-name-rootvg-lv_bnms -> ../../dm-8
 30306    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-uuid-LVM-32skd9Ir53e0wLdZc9EFtumOe8Qu3DYIHhxYt1y1SSxxc77H1iLFfqGisG1QBVhz -> ../../dm-6
 30303    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-name-rootvg-lv_opt -> ../../dm-6
 15846    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-uuid-LVM-32skd9Ir53e0wLdZc9EFtumOe8Qu3DYI7cOuURGjE0cREloQfhxarCxv5aVGnd36 -> ../../dm-5
 15843    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-name-rootvg-lv_var -> ../../dm-5
 18831    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-uuid-LVM-32skd9Ir53e0wLdZc9EFtumOe8Qu3DYI2bjPMaooDpIcFZRNSwtPd9AHP2GuxF2o -> ../../dm-3
 18828    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-name-rootvg-lv_crash -> ../../dm-3
 19712    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-uuid-LVM-32skd9Ir53e0wLdZc9EFtumOe8Qu3DYIcsEdATxHZpDM4DU1gh4MAHmlPcO8s5sC -> ../../dm-4
 19709    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-name-rootvg-lv_tmp -> ../../dm-4
 18811    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-uuid-LVM-32skd9Ir53e0wLdZc9EFtumOe8Qu3DYILeRaNE4h4Rb2rkVwkugbmtjvyjKPOeIR -> ../../dm-7
 18808    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-name-rootvg-lv_home -> ../../dm-7
   316    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-uuid-LVM-32skd9Ir53e0wLdZc9EFtumOe8Qu3DYIcBlEQK0bT4c133F8zW4ynfirfuDB2eiz -> ../../dm-2
   313    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-name-rootvg-lv_usr -> ../../dm-2
   290    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-uuid-LVM-32skd9Ir53e0wLdZc9EFtumOe8Qu3DYI6rvD4sTNOyvSnjySoe3ap49XM9mpVJDx -> ../../dm-1
   287    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-name-rootvg-lv_swap -> ../../dm-1
   256    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-uuid-LVM-32skd9Ir53e0wLdZc9EFtumOe8Qu3DYInLmTEVRx7PLkBGvD02UrAax7LasvnU1H -> ../../dm-0
   253    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/dm-name-rootvg-lv_root -> ../../dm-0
 27706    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091ca4d74-part1 -> ../../sdb1
 27703    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB45BD-part1 -> ../../sdb1
 17627    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c7ff71-part1 -> ../../sdh1
 17624    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5ZGQ-part1 -> ../../sdh1
 11012    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091ca1cb0-part1 -> ../../sda1
 11009    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5SKT-part1 -> ../../sda1
 23657    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c80086-part1 -> ../../sdm1
 23654    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5YJG-part1 -> ../../sdm1
 28747    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c91300-part1 -> ../../sde1
 28744    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5VMH-part1 -> ../../sde1
 25662    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c926ae-part1 -> ../../sdo1
 25659    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5VQ3-part1 -> ../../sdo1
   233    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c8232f-part1 -> ../../sdi1
   230    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5W5K-part1 -> ../../sdi1
 15540    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c478e6-part1 -> ../../sdg1
 15537    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5TXF-part1 -> ../../sdg1
 31798    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091ca5691-part1 -> ../../sdk1
 31795    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5SR7-part1 -> ../../sdk1
 30831    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091ca3e3c-part1 -> ../../sdj1
 30828    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5SR1-part1 -> ../../sdj1
 24628    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091ca507e-part1 -> ../../sdn1
 24625    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5SRN-part1 -> ../../sdn1
 18617    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c80820-part1 -> ../../sdd1
 18614    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5VX4-part1 -> ../../sdd1
   211    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c92de4-part1 -> ../../sdl1
   208    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5VDZ-part1 -> ../../sdl1
 12402    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091b3d7b8-part1 -> ../../sdc1
 12399    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB4NEZ-part1 -> ../../sdc1
 17605    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091ca89dc-part1 -> ../../sdf1
 17602    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5T52-part1 -> ../../sdf1
 28733    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091ca4d74 -> ../../sdb
 28730    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB45BD -> ../../sdb
 23643    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c80086 -> ../../sdm
 23640    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5YJG -> ../../sdm
 27692    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091ca1cb0 -> ../../sda
 27689    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5SKT -> ../../sda
 30817    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c7ff71 -> ../../sdh
 30814    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5ZGQ -> ../../sdh
 28719    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c91300 -> ../../sde
 28716    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5VMH -> ../../sde
   197    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c926ae -> ../../sdo
   194    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5VQ3 -> ../../sdo
 25639    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c928b7-part1 -> ../../sdp1
 25636    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5VAE-part1 -> ../../sdp1
   183    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c478e6 -> ../../sdg
   180    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5TXF -> ../../sdg
   169    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091ca3e3c -> ../../sdj
   166    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5SR1 -> ../../sdj
 17591    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c8232f -> ../../sdi
 17588    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5W5K -> ../../sdi
 31784    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091ca5691 -> ../../sdk
 31781    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5SR7 -> ../../sdk
 27678    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091ca507e -> ../../sdn
 27675    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5SRN -> ../../sdn
   155    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c92de4 -> ../../sdl
   152    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5VDZ -> ../../sdl
 15526    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c80820 -> ../../sdd
 15523    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5VX4 -> ../../sdd
 11675    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091b3d7b8 -> ../../sdc
 11672    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB4NEZ -> ../../sdc
 17577    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091c928b7 -> ../../sdp
 17574    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5VAE -> ../../sdp
 27664    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x5000c50091ca89dc -> ../../sdf
 27661    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/ata-ST4000NM0033-9ZM170_Z1ZB5T52 -> ../../sdf
 29752    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x61866da06389fa001f2056af1226585f-part2 -> ../../sdq2
 29749    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/scsi-361866da06389fa001f2056af1226585f-part2 -> ../../sdq2
   100    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x61866da06389fa001f2056af1226585f-part1 -> ../../sdq1
    97    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/scsi-361866da06389fa001f2056af1226585f-part1 -> ../../sdq1
    52    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/wwn-0x61866da06389fa001f2056af1226585f-part3 -> ../../sdq3
    49    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/scsi-361866da06389fa001f2056af1226585f-part3 -> ../../sdq3
    46    0 lrwxrwxrwx   1 root     root           10 Sep 30 12:15 /dev/disk/by-id/lvm-pv-uuid-Z04P5h-iZLG-4Ff4-wMyo-OEG0-onzf-umelR1 -> ../../sdq3
    31    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/wwn-0x61866da06389fa001f2056af1226585f -> ../../sdq
    28    0 lrwxrwxrwx   1 root     root            9 Sep 30 12:15 /dev/disk/by-id/scsi-361866da06389fa001f2056af1226585f -> ../../sdq
ElCoyote27 commented 5 years ago

Hi, Thanks for posting the output and also for posting the code snippet. It seems you're not using the latest version.. Would you mind trying the latest with --debug and post the output here? https://github.com/ElCoyote27/hwraid/blob/master/wrapper-scripts/megaclisas-status

ElCoyote27 commented 5 years ago

The current upstream code has some 'dbgprint' and a 'break' which may make it easier to investigate:

                        if pcipath:
                                diskprefix = str('/dev/disk/by-path/pci-' + pcipath + '-scsi-0:')
                                dbgprint('Will look for DISKprefix : ' + diskprefix)
                                for j in range (8):
                                        diskpath = diskprefix + str(j) + ':' + str(arrayinfo[7]) + ':0'
                                        dbgprint('Looking for DISKpath : ' + diskpath)
                                        if os.path.exists(diskpath):
                                                arrayinfo[7] = os.path.realpath(diskpath)
                                                dbgprint('Found DISK match: ' + diskpath + ' -> ' + arrayinfo[7])
                                                break
                        else:
                                arrayinfo[7] = 'N/A'
CrystalCat commented 5 years ago

Hi~ here's the full log with debug option,a little bit long,aha

# ./megaraid-status 
# DEBUG (109) : Looking for MegaCli64 in PATH...
# DEBUG (99) : Looking in PATH /usr/local/sbin
# DEBUG (99) : Looking in PATH /usr/local/bin
# DEBUG (99) : Looking in PATH /sbin
# DEBUG (99) : Looking in PATH /bin
# DEBUG (99) : Looking in PATH /usr/sbin
# DEBUG (99) : Looking in PATH /usr/bin
# DEBUG (99) : Looking in PATH /root/bin
# DEBUG (99) : Looking in PATH /opt/MegaRAID/MegaCli
# DEBUG (103) : Found "MegaCli64" at /opt/MegaRAID/MegaCli/MegaCli64
# DEBUG (112) : Will use this executable: /opt/MegaRAID/MegaCli/MegaCli64
# DEBUG (146) : Not a Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -adpCount -NoLog
-- Controller information --
# DEBUG (146) : Not a Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -a0 -NoLog
# DEBUG (146) : Not a Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -a0 -NoLog
-- ID | H/W Model       | RAM    | Temp | BBU    | Firmware     
c0    | PERC H730P Mini | 2048MB | 75C  | Good   | FW: 25.5.0.0018 

-- Array information --
# DEBUG (146) : Not a Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -lall -a0 -NoLog
# DEBUG (146) : Not a Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -l0 -a0 -NoLog
# DEBUG (143) : Got Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -l0 -a0 -NoLog
# DEBUG (421) : RAID Level: 1 Span Depth: 1 Disk Per Span: 0 Raid Type: RAID-1
# DEBUG (146) : Not a Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -AdpGetPciInfo -a0 -NoLog
# DEBUG (286) : Array PCI path : 0000:02:00.0
# DEBUG (143) : Got Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -lall -a0 -NoLog
# DEBUG (143) : Got Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -l0 -a0 -NoLog
# DEBUG (421) : RAID Level: 1 Span Depth: 1 Disk Per Span: 0 Raid Type: RAID-1
# DEBUG (701) : Will look for DISKprefix : /dev/disk/by-path/pci-0000:02:00.0-scsi-0:
# DEBUG (704) : Looking for DISKpath : /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:0:0
# DEBUG (707) : Found DISK match: /dev/disk/by-path/pci-0000:02:00.0-scsi-0:0:0:0 -> /dev/sda
-- ID | Type   |    Size |  Strpsz | Flags | DskCache |   Status |  OS Path | CacheCade |InProgress   
c0u0  | RAID-1 |   1090G |   64 KB | RA,WB |  Default |  Optimal | /dev/sda | None      |None         
# DEBUG (737) : Array state : LD c0u0, status : Optimal

# DEBUG (146) : Not a Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -PDGetNum -a0 -NoLog
-- Disk information --
# DEBUG (143) : Got Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -lall -a0 -NoLog
# DEBUG (146) : Not a Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -a0 -NoLog
# DEBUG (475) : Firmware State: Online, Spun Up Online, Spun Up
# DEBUG (503) : Disk Info: 0 0 False
# DEBUG (475) : Firmware State: Online, Spun Up Online, Spun Up
# DEBUG (503) : Disk Info: 0 1 32
# DEBUG (775) : Disk c03212 status : Online, Spun Up
# DEBUG (161) : Confed 0/0Disk: 03212 Not already present in Disk Table, adding
# DEBUG (775) : Disk c03213 status : Online, Spun Up
# DEBUG (161) : Confed 1/0Disk: 03213 Not already present in Disk Table, adding
# DEBUG (143) : Got Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -lall -a0 -NoLog
# DEBUG (143) : Got Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -a0 -NoLog
# DEBUG (475) : Firmware State: Online, Spun Up Online, Spun Up
# DEBUG (503) : Disk Info: 0 0 False
# DEBUG (475) : Firmware State: Online, Spun Up Online, Spun Up
# DEBUG (503) : Disk Info: 0 1 32
-- ID  | Type | Drive Model                          | Size     | Status          | Speed    | Temp | Slot ID  | LSI Device ID
c0u0p0 | HDD  | TOSHIBA AL14SEB120N DM057610A10XF02C | 1.090 TB | Online, Spun Up | 12.0Gb/s | 53C  | [32:12]  | 12      
c0u0p1 | HDD  | TOSHIBA AL14SEB120N DM057610A11XF02C | 1.090 TB | Online, Spun Up | 12.0Gb/s | 53C  | [32:13]  | 13      

# DEBUG (143) : Got Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -a0 -NoLog
# DEBUG (161) : Confed 2/0Disk: 03212 Not already present in Disk Table, adding
# DEBUG (161) : Confed 2/0Disk: 03213 Not already present in Disk Table, adding
# DEBUG (143) : Got Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -PDGetNum -a0 -NoLog
# DEBUG (146) : Not a Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0 -NoLog
# DEBUG (853) : Total Drives in system : 18
# DEBUG (854) : Total Configured Drives : 2
# DEBUG (855) : Total Unconfigured Drives : 16
-- Unconfigured Disk information --
# DEBUG (143) : Got Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -lall -a0 -NoLog
# DEBUG (143) : Got Cached value: /opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0 -NoLog
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: Online, Spun Up Online, Spun Up
# DEBUG (560) : Firmware State: Online, Spun Up Online, Spun Up
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (560) : Firmware State: JBOD JBOD
# DEBUG (875) : Unconfed 2/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 3/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 4/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 5/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 6/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 7/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 8/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 9/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 10/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 11/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 12/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 13/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 14/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 15/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 16/0 Disk c0uXpY status : JBOD
# DEBUG (875) : Unconfed 17/0 Disk c0uXpY status : JBOD
-- ID   | Type | Drive Model                      | Size     | Status | Speed    | Temp | Slot ID  | LSI Device ID
c0uXpY  | HDD  | Z1ZB5SKTST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 33C  | [32:0]   | 0       
c0uXpY  | HDD  | Z1ZB45BDST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 33C  | [32:1]   | 1       
c0uXpY  | HDD  | Z1ZB4NEZST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 33C  | [32:2]   | 2       
c0uXpY  | HDD  | Z1ZB5VX4ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 35C  | [32:3]   | 3       
c0uXpY  | HDD  | Z1ZB5VMHST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 34C  | [32:4]   | 4       
c0uXpY  | HDD  | Z1ZB5T52ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 33C  | [32:5]   | 5       
c0uXpY  | HDD  | Z1ZB5TXFST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 41C  | [32:6]   | 6       
c0uXpY  | HDD  | Z1ZB5ZGQST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 40C  | [32:7]   | 7       
c0uXpY  | HDD  | Z1ZB5W5KST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 39C  | [32:8]   | 8       
c0uXpY  | HDD  | Z1ZB5SR1ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 38C  | [32:9]   | 9       
c0uXpY  | HDD  | Z1ZB5SR7ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 39C  | [32:10]  | 10      
c0uXpY  | HDD  | Z1ZB5VDZST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 37C  | [32:11]  | 11      
c0uXpY  | HDD  | Z1ZB5YJGST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 46C  | [32:14]  | 14      
c0uXpY  | HDD  | Z1ZB5SRNST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 47C  | [32:15]  | 15      
c0uXpY  | HDD  | Z1ZB5VQ3ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 49C  | [32:16]  | 16      
c0uXpY  | HDD  | Z1ZB5VAEST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 51C  | [32:17]  | 17      

# DEBUG (912) : Printing Outputs[][]
# DEBUG (914) : /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -a0 -NoLog

Adapter #0
Number of Virtual Disks: 1
Virtual Drive: 0 (Target Id: 0)
Name                :Virtual Disk 0
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 1.090 TB
Sector Size         : 512
Is VD emulated      : No
Mirror Data         : 1.090 TB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 2
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
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: Yes
LD has drives that support T10 power conditions: Yes
LD's IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: No
Number of Spans: 1
Span: 0 - Number of PDs: 2
PD: 0 Information
Enclosure Device ID: 32
Slot Number: 12
Drive's position: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 1
Device Id: 12
WWN: 5000039728003CF8
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 1.090 TB [0x8bba0cb0 Sectors]
Non Coerced Size: 1.090 TB [0x8baa0cb0 Sectors]
Coerced Size: 1.090 TB [0x8ba80000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: Online, Spun Up
Device Firmware Level: DM05
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000039728003cfa
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: TOSHIBA AL14SEB120N     DM057610A10XF02C
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 12.0Gb/s
Link Speed: 12.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :53C (127.40 F)
PI Eligibility:  No
Drive is formatted for PI information:  Yes
PI: PI with type 2
Port-0 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
PD: 1 Information
Enclosure Device ID: 32
Slot Number: 13
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: 1
Device Id: 13
WWN: 5000039728003E18
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 1.090 TB [0x8bba0cb0 Sectors]
Non Coerced Size: 1.090 TB [0x8baa0cb0 Sectors]
Coerced Size: 1.090 TB [0x8ba80000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: Online, Spun Up
Device Firmware Level: DM05
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000039728003e1a
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: TOSHIBA AL14SEB120N     DM057610A11XF02C
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 12.0Gb/s
Link Speed: 12.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :53C (127.40 F)
PI Eligibility:  No
Drive is formatted for PI information:  Yes
PI: PI with type 2
Port-0 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Exit Code: 0x00
# DEBUG (914) : /opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -a0 -NoLog

Adapter #0
==============================================================================
Versions
================
Product Name    : PERC H730P Mini
Serial No       : 66301T0
FW Package Build: 25.5.0.0018
Mfg. Data
================
Mfg. Date       : 06/05/16
Rework Date     : 06/05/16
Revision No     : A04
Battery FRU     : N/A
Image Versions in Flash:
================
BIOS Version       : 6.33.01.0_4.16.07.00_0x06120200
Ctrl-R Version     : 5.18-0700
FW Version         : 4.270.00-8112
NVDATA Version     : 3.1511.00-0014
Boot Block Version : 3.07.00.00-0003
Pending Images in Flash
================
None
PCI Info
================
Controller Id   : 0000
Vendor Id       : 1000
Device Id       : 005d
SubVendorId     : 1028
SubDeviceId     : 1f47
Host Interface  : PCIE
ChipRevision    : C0
Link Speed           : 3
Number of Frontend Port: 0
Device Interface  : PCIE
Number of Backend Port: 8
Port  :  Address
0        500056b3f7fea5ff
1        0000000000000000
2        0000000000000000
3        0000000000000000
4        0000000000000000
5        0000000000000000
6        0000000000000000
7        0000000000000000
HW Configuration
================
SAS Address      : 51866da06389fa00
BBU              : Present
Alarm            : Absent
NVRAM            : Present
Serial Debugger  : Present
Memory           : Present
Flash            : Present
Memory Size      : 2048MB
TPM              : Absent
On board Expander: Absent
Upgrade Key      : Absent
Temperature sensor for ROC    : Present
Temperature sensor for controller    : Present
ROC temperature : 75  degree Celsius
Controller temperature : 75  degree Celcius
Settings
================
Current Time                     : 22:35:51 9/30, 2018
Predictive Fail Poll Interval    : 300sec
Interrupt Throttle Active Count  : 16
Interrupt Throttle Completion    : 50us
Rebuild Rate                     : 30%
PR Rate                          : 30%
BGI Rate                         : 30%
Check Consistency Rate           : 30%
Reconstruction Rate              : 30%
Cache Flush Interval             : 4s
Max Drives to Spinup at One Time : 4
Delay Among Spinup Groups        : 12s
Physical Drive Coercion Mode     : 128MB
Cluster Mode                     : Disabled
Alarm                            : Disabled
Auto Rebuild                     : Enabled
Battery Warning                  : Enabled
Ecc Bucket Size                  : 255
Ecc Bucket Leak Rate             : 240 Minutes
Restore HotSpare on Insertion    : Disabled
Expose Enclosure Devices         : Disabled
Maintain PD Fail History         : Disabled
Host Request Reordering          : Enabled
Auto Detect BackPlane Enabled    : SGPIO/i2c SEP
Load Balance Mode                : Auto
Use FDE Only                     : Yes
Security Key Assigned            : No
Security Key Failed              : No
Security Key Not Backedup        : No
Default LD PowerSave Policy      : Controller Defined
Maximum number of direct attached drives to spin up in 1 min : 0
Auto Enhanced Import             : No
Any Offline VD Cache Preserved   : No
Allow Boot with Preserved Cache  : No
Disable Online Controller Reset  : No
PFK in NVRAM                     : No
Use disk activity for locate     : No
POST delay                       : 90 seconds
BIOS Error Handling              : Pause on Errors
Current Boot Mode                 :Normal
Capabilities
================
RAID Level Supported             : RAID0, RAID1, RAID5, RAID6, RAID10, RAID50, RAID60, PRL 11, PRL 11 with spanning, PRL11-RLQ0 DDF layout with no span, PRL11-RLQ0 DDF layout with span
Supported Drives                 : SAS, SATA
Allowed Mixing:
Mix in Enclosure Allowed
Status
================
ECC Bucket Count                 : 0
Limitations
================
Max Arms Per VD          : 32
Max Spans Per VD         : 8
Max Arrays               : 128
Max Number of VDs        : 64
Max Parallel Commands    : 928
Max SGE Count            : 60
Max Data Transfer Size   : 8192 sectors
Max Strips PerIO         : 128
Max LD per array         : 16
Min Strip Size           : 64 KB
Max Strip Size           : 1.0 MB
Max Configurable CacheCade Size: 0 GB
Current Size of CacheCade      : 0 GB
Current Size of FW Cache       : 1931 MB
Device Present
================
Virtual Drives    : 1
Degraded        : 0
Offline         : 0
Physical Devices  : 19
Disks           : 18
Critical Disks  : 0
Failed Disks    : 0
Supported Adapter Operations
================
Rebuild Rate                    : Yes
CC Rate                         : Yes
BGI Rate                        : Yes
Reconstruct Rate                : Yes
Patrol Read Rate                : Yes
Alarm Control                   : Yes
Cluster Support                 : No
BBU                             : Yes
Spanning                        : Yes
Dedicated Hot Spare             : Yes
Revertible Hot Spares           : Yes
Foreign Config Import           : Yes
Self Diagnostic                 : Yes
Allow Mixed Redundancy on Array : No
Global Hot Spares               : Yes
Deny SCSI Passthrough           : No
Deny SMP Passthrough            : No
Deny STP Passthrough            : No
Support Security                : Yes
Snapshot Enabled                : No
Support the OCE without adding drives : Yes
Support PFK                     : No
Support PI                      : No
Support Boot Time PFK Change    : No
Disable Online PFK Change       : No
Support Shield State            : Yes
Block SSD Write Disk Cache Change: No
Support Online FW Update        : Yes
Supported VD Operations
================
Read Policy          : Yes
Write Policy         : Yes
IO Policy            : Yes
Access Policy        : Yes
Disk Cache Policy    : Yes
Reconstruction       : Yes
Deny Locate          : No
Deny CC              : No
Allow Ctrl Encryption: No
Enable LDBBM         : Yes
Support Breakmirror  : Yes
Power Savings        : Yes
Supported PD Operations
================
Force Online                            : Yes
Force Offline                           : Yes
Force Rebuild                           : Yes
Deny Force Failed                       : No
Deny Force Good/Bad                     : No
Deny Missing Replace                    : No
Deny Clear                              : No
Deny Locate                             : No
Support Temperature                     : Yes
NCQ                                     : No
Disable Copyback                        : No
Enable JBOD                             : Yes
Enable Copyback on SMART                : No
Enable Copyback to SSD on SMART Error   : No
Enable SSD Patrol Read                  : No
PR Correct Unconfigured Areas           : Yes
Enable Spin Down of UnConfigured Drives : No
Disable Spin Down of hot spares         : Yes
Spin Down time                          : 30
T10 Power State                         : Yes
Error Counters
================
Memory Correctable Errors   : 0
Memory Uncorrectable Errors : 0
Cluster Information
================
Cluster Permitted     : No
Cluster Active        : No
Default Settings
================
Phy Polarity                     : 0
Phy PolaritySplit                : 0
Background Rate                  : 30
Strip Size                       : 64kB
Flush Time                       : 4 seconds
Write Policy                     : WB
Read Policy                      : Adaptive
Cache When BBU Bad               : Disabled
Cached IO                        : No
SMART Mode                       : Mode 6
Alarm Disable                    : No
Coercion Mode                    : 128MB
ZCR Config                       : Unknown
Dirty LED Shows Drive Activity   : No
BIOS Continue on Error           : 1
Spin Down Mode                   : None
Allowed Device Type              : SAS/SATA Mix
Allow Mix in Enclosure           : Yes
Allow HDD SAS/SATA Mix in VD     : No
Allow SSD SAS/SATA Mix in VD     : No
Allow HDD/SSD Mix in VD          : No
Allow SATA in Cluster            : No
Max Chained Enclosures           : 4
Disable Ctrl-R                   : No
Enable Web BIOS                  : No
Direct PD Mapping                : Yes
BIOS Enumerate VDs               : Yes
Restore Hot Spare on Insertion   : No
Expose Enclosure Devices         : No
Maintain PD Fail History         : No
Disable Puncturing               : No
Zero Based Enclosure Enumeration : Yes
PreBoot CLI Enabled              : No
LED Show Drive Activity          : Yes
Cluster Disable                  : Yes
SAS Disable                      : No
Auto Detect BackPlane Enable     : SGPIO/i2c SEP
Use FDE Only                     : Yes
Enable Led Header                : No
Delay during POST                : 0
EnableCrashDump                  : No
Disable Online Controller Reset  : No
EnableLDBBM                      : Yes
Un-Certified Hard Disk Drives    : Allow
Treat Single span R1E as R10     : Yes
Max LD per array                 : 16
Power Saving option              : Don't spin down unconfigured drives
Don't spin down Hot spares
Don't Auto spin down Configured Drives
Power settings apply to all drives - individual PD/LD power settings cannot be set
Max power savings option is  not allowed for LDs. Only T10 power conditions are to be used.
Cached writes are not used for spun down VDs
Can schedule disable power savings at controller level
Default spin down time in minutes: 30
Enable JBOD                      : Yes
TTY Log In Flash                 : Yes
Auto Enhanced Import             : No
BreakMirror RAID Support         : Yes
Disable Join Mirror              : Yes
Enable Shield State              : No
Time taken to detect CME         : 60s
Exit Code: 0x00
# DEBUG (914) : /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -lall -a0 -NoLog

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :Virtual Disk 0
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 1.090 TB
Sector Size         : 512
Is VD emulated      : No
Mirror Data         : 1.090 TB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 2
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
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: Yes
LD has drives that support T10 power conditions: Yes
LD's IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: No
Exit Code: 0x00
# DEBUG (914) : /opt/MegaRAID/MegaCli/MegaCli64 -AdpGetPciInfo -a0 -NoLog

PCI information for Controller 0
--------------------------------
Bus Number      : 2
Device Number   : 0
Function Number : 0
Exit Code: 0x00
# DEBUG (914) : /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -a0 -NoLog

BBU status for Adapter: 0
BatteryType: BBU
Voltage: 3918 mV
Current: 0 mA
Temperature: 49 C
Battery State: Optimal
BBU Firmware Status:
Charging Status              : None
Voltage                                 : OK
Temperature                             : OK
Learn Cycle Requested                     : No
Learn Cycle Active                      : No
Learn Cycle Status                      : OK
Learn Cycle Timeout                     : No
I2c Errors Detected                     : No
Battery Pack Missing                    : No
Battery Replacement required            : No
Remaining Capacity Low                  : No
Periodic Learn Required                 : No
Transparent Learn                       : No
No space to cache offload               : No
Pack is about to fail & should be replaced : No
Cache Offload premium feature required  : No
Module microcode update required        : No
BBU GasGauge Status: 0x0238
Relative State of Charge: 100 %
Charger Status: Complete
Remaining Capacity: 499 mAh
Full Charge Capacity: 503 mAh
isSOHGood: Yes
Exit Code: 0x00
# DEBUG (914) : /opt/MegaRAID/MegaCli/MegaCli64 -PDGetNum -a0 -NoLog

Number of Physical Drives on Adapter 0: 18
Exit Code: 0x12
# DEBUG (914) : /opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0 -NoLog

Adapter #0
Enclosure Device ID: 32
Slot Number: 0
Enclosure position: 1
Device Id: 0
WWN: 5000c50091ca1cb0
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5c0
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5SKTST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :33C (91.40 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 1
Enclosure position: 1
Device Id: 1
WWN: 5000c50091ca4d74
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5c1
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB45BDST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :33C (91.40 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 2
Enclosure position: 1
Device Id: 2
WWN: 5000c50091b3d7b8
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5c2
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB4NEZST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :33C (91.40 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 3
Enclosure position: 1
Device Id: 3
WWN: 5000c50091c80820
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5c3
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5VX4ST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :35C (95.00 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 4
Enclosure position: 1
Device Id: 4
WWN: 5000c50091c91300
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5c4
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5VMHST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :34C (93.20 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 5
Enclosure position: 1
Device Id: 5
WWN: 5000c50091ca89dc
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5c5
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5T52ST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :33C (91.40 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 6
Enclosure position: 1
Device Id: 6
WWN: 5000c50091c478e6
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5c6
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5TXFST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :41C (105.80 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 7
Enclosure position: 1
Device Id: 7
WWN: 5000c50091c7ff71
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5c7
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5ZGQST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :40C (104.00 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 8
Enclosure position: 1
Device Id: 8
WWN: 5000c50091c8232f
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5c8
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5W5KST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :39C (102.20 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 9
Enclosure position: 1
Device Id: 9
WWN: 5000c50091ca3e3c
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5c9
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5SR1ST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :38C (100.40 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 10
Enclosure position: 1
Device Id: 10
WWN: 5000c50091ca5691
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5ca
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5SR7ST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :39C (102.20 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 11
Enclosure position: 1
Device Id: 11
WWN: 5000c50091c92de4
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5cb
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5VDZST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :37C (98.60 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 12
Drive's position: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 1
Device Id: 12
WWN: 5000039728003CF8
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 1.090 TB [0x8bba0cb0 Sectors]
Non Coerced Size: 1.090 TB [0x8baa0cb0 Sectors]
Coerced Size: 1.090 TB [0x8ba80000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: Online, Spun Up
Device Firmware Level: DM05
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000039728003cfa
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: TOSHIBA AL14SEB120N     DM057610A10XF02C
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 12.0Gb/s
Link Speed: 12.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :53C (127.40 F)
PI Eligibility:  No
Drive is formatted for PI information:  Yes
PI: PI with type 2
Port-0 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 13
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: 1
Device Id: 13
WWN: 5000039728003E18
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 1.090 TB [0x8bba0cb0 Sectors]
Non Coerced Size: 1.090 TB [0x8baa0cb0 Sectors]
Coerced Size: 1.090 TB [0x8ba80000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: Online, Spun Up
Device Firmware Level: DM05
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000039728003e1a
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: TOSHIBA AL14SEB120N     DM057610A11XF02C
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 12.0Gb/s
Link Speed: 12.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :53C (127.40 F)
PI Eligibility:  No
Drive is formatted for PI information:  Yes
PI: PI with type 2
Port-0 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: 12.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 14
Enclosure position: 1
Device Id: 14
WWN: 5000c50091c80086
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5ce
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5YJGST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :46C (114.80 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 15
Enclosure position: 1
Device Id: 15
WWN: 5000c50091ca507e
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5cf
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5SRNST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :47C (116.60 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 16
Enclosure position: 1
Device Id: 16
WWN: 5000c50091c926ae
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5d0
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5VQ3ST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :49C (120.20 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 17
Enclosure position: 1
Device Id: 17
WWN: 5000c50091c928b7
Sequence Number: 2
Media Error Count: 0
Other Error Count: 2
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 3.638 TB [0x1d1c0beb0 Sectors]
Non Coerced Size: 3.637 TB [0x1d1b0beb0 Sectors]
Coerced Size: 3.637 TB [0x1d1b00000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  512
Firmware state: JBOD
Device Firmware Level: GA6E
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500056b3f7fea5d1
Connected Port Number: 0(path0)
Inquiry Data:             Z1ZB5VAEST4000NM0033-9ZM170                         GA6E
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :51C (123.80 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : N/A
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No
Exit Code: 0x00
# DEBUG (914) : /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -l0 -a0 -NoLog

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :Virtual Disk 0
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 1.090 TB
Sector Size         : 512
Is VD emulated      : No
Mirror Data         : 1.090 TB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 2
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
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: Yes
LD has drives that support T10 power conditions: Yes
LD's IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: No
Exit Code: 0x00
# DEBUG (914) : /opt/MegaRAID/MegaCli/MegaCli64 -adpCount -NoLog

Controller Count: 1.
Exit Code: 0x01
# DEBUG (916) : Printing arraydisk[]
HDD | Z1ZB5SKTST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 33C  | 32 | 0 | 0
HDD | Z1ZB45BDST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 33C  | 32 | 1 | 1
HDD | Z1ZB4NEZST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 33C  | 32 | 2 | 2
HDD | Z1ZB5VX4ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 35C  | 32 | 3 | 3
HDD | Z1ZB5VMHST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 34C  | 32 | 4 | 4
HDD | Z1ZB5T52ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 33C  | 32 | 5 | 5
HDD | Z1ZB5TXFST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 41C  | 32 | 6 | 6
HDD | Z1ZB5ZGQST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 40C  | 32 | 7 | 7
HDD | Z1ZB5W5KST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 39C  | 32 | 8 | 8
HDD | Z1ZB5SR1ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 38C  | 32 | 9 | 9
HDD | Z1ZB5SR7ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 39C  | 32 | 10 | 10
HDD | Z1ZB5VDZST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 37C  | 32 | 11 | 11
HDD | Z1ZB5YJGST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 46C  | 32 | 14 | 14
HDD | Z1ZB5SRNST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 47C  | 32 | 15 | 15
HDD | Z1ZB5VQ3ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 49C  | 32 | 16 | 16
HDD | Z1ZB5VAEST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD | 6.0Gb/s | 51C  | 32 | 17 | 17
# DEBUG (918) : Printing ConfDisks[]
03213
03212
# DEBUG (920) : Printing NagiosGoodDisks[]
03213
03212
# DEBUG (922) : Printing NagiosBadDisks[]
CrystalCat commented 5 years ago

continue:

my understanding of current OS path detection algorithm : iterate channel from 0~7 (variable j) using last matched as OS path

in this case, all JBOD disks in channel 0 . RAID1 disk in channel 2 it's is a good idea that using device targetid and channel id together the determine its path,also , search MegaCli doc ,can't find any command has disk channel id information,so sad :(

ElCoyote27 commented 5 years ago

Hi, Yes, I think I have to re-work that rudimentary part of the code. I am currently trying to locate a system when I could have a reproducer and work on a fix.

ElCoyote27 commented 5 years ago

Unfortunately, this is going to have to wait until I get back (where I can add a disk to make it JBOD on my H730P). I had no luck making a disk JBOD on an H710P: [root@vkvm1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -PDMakeJBOD -PhysDrv[32:10] -a0

Adapter: 0: Failed to change PD state at EnclId-32 SlotId-10.

Exit Code: 0x01

ElCoyote27 commented 5 years ago

Please pull the new version from my repo and let's see if it fixes the os path for the RAID LUN. If it works, I'll try to add code to display the JBOD native paths.

ElCoyote27 commented 5 years ago

@CrystalCat Please let me know how it goes.

CrystalCat commented 5 years ago

Hi ELCoyote27~ sorry for the delay.

latest code works,matching RAID1 and JBOD path perfectly,

code review:

            if pcipath:
                diskprefix = str('/dev/disk/by-path/pci-' + pcipath + '-scsi-0:')
                dbgprint('Will look for DISKprefix : ' + diskprefix)
                # RAID disks are usually with a channel of '2', JBOD disks with a channel of '0'
                for j in range (1, 8):
                    diskpath = diskprefix + str(j) + ':' + str(arrayinfo[7]) + ':0'
                    dbgprint('Looking for DISKpath : ' + diskpath)
                    if os.path.exists(diskpath):
                        arrayinfo[7] = os.path.realpath(diskpath)
                        dbgprint('Found DISK match: ' + diskpath + ' -> ' + arrayinfo[7])
                        break
            else:
                arrayinfo[7] = 'N/A'

I've found that pcipath detection algorithm changed. won't check channel 0 any more , channel starts from 1 to 7 ,if disk matched, then use it as result.

in this case, RAID disk in channel '2',is there any chance that more than two channels has the same targetid? if it happens , current code won't check rest of channels after first match. Cuz can't find channel id from megacli, current method will do its job as it designed.

 Anyway,thanks for your help~

latest code exec output:

# ./megaclisas-status 
-- Controller information --
-- ID | H/W Model       | RAM    | Temp | BBU    | Firmware     
c0    | PERC H730P Mini | 2048MB | 75C  | Good   | FW: 25.5.0.0018 

-- Array information --
-- ID | Type   |    Size |  Strpsz | Flags | DskCache |   Status |  OS Path | CacheCade |InProgress   
c0u0  | RAID-1 |   1090G |   64 KB | RA,WB |  Default |  Optimal | /dev/sdq | None      |None         

-- Disk information --
-- ID  | Type | Drive Model                          | Size     | Status          | Speed    | Temp | Slot ID  | LSI ID  
c0u0p0 | HDD  | TOSHIBA AL14SEB120N DM057610A10XF02C | 1.090 TB | Online, Spun Up | 12.0Gb/s | 53C  | [32:12]  | 12      
c0u0p1 | HDD  | TOSHIBA AL14SEB120N DM057610A11XF02C | 1.090 TB | Online, Spun Up | 12.0Gb/s | 52C  | [32:13]  | 13      

-- Unconfigured Disk information --
-- ID   | Type | Drive Model                      | Size     | Status | Speed    | Temp | Slot ID  | LSI ID | Path    
c0uXpY  | HDD  | Z1ZB5SKTST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 33C  | [32:0]   | 0      | /dev/sda
c0uXpY  | HDD  | Z1ZB45BDST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 33C  | [32:1]   | 1      | /dev/sdb
c0uXpY  | HDD  | Z1ZB4NEZST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 31C  | [32:2]   | 2      | /dev/sdc
c0uXpY  | HDD  | Z1ZB5VX4ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 34C  | [32:3]   | 3      | /dev/sdd
c0uXpY  | HDD  | Z1ZB5VMHST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 34C  | [32:4]   | 4      | /dev/sde
c0uXpY  | HDD  | Z1ZB5T52ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 33C  | [32:5]   | 5      | /dev/sdf
c0uXpY  | HDD  | Z1ZB5TXFST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 40C  | [32:6]   | 6      | /dev/sdg
c0uXpY  | HDD  | Z1ZB5ZGQST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 40C  | [32:7]   | 7      | /dev/sdh
c0uXpY  | HDD  | Z1ZB5W5KST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 39C  | [32:8]   | 8      | /dev/sdi
c0uXpY  | HDD  | Z1ZB5SR1ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 38C  | [32:9]   | 9      | /dev/sdj
c0uXpY  | HDD  | Z1ZB5SR7ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 39C  | [32:10]  | 10     | /dev/sdk
c0uXpY  | HDD  | Z1ZB5VDZST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 37C  | [32:11]  | 11     | /dev/sdl
c0uXpY  | HDD  | Z1ZB5YJGST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 44C  | [32:14]  | 14     | /dev/sdm
c0uXpY  | HDD  | Z1ZB5SRNST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 46C  | [32:15]  | 15     | /dev/sdn
c0uXpY  | HDD  | Z1ZB5VQ3ST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 48C  | [32:16]  | 16     | /dev/sdo
c0uXpY  | HDD  | Z1ZB5VAEST4000NM0033-9ZM170 GA6E | 3.637 TB | JBOD   | 6.0Gb/s  | 51C  | [32:17]  | 17     | /dev/sdp
ElCoyote27 commented 5 years ago

Hi @CrystalCat Thanks for the feedback and also for testing this code. I'm sending a PR to @eLvErDe ASAP. Kind regards from Canada, Vincent

CrystalCat commented 5 years ago

Hi~ Not a big deal .If any test needs perform,pls let me know. And pls confirm problem fixed ,then I'll mark this issue as close. Thanks again :>