# Megacli commands



## abdul (Oct 19, 2009)

I am having LSI internal RAID card attached in my machine. Some of Megacli commands are not working properly.

```
freebsd# ./MegaCli -PDList a0
                                     
Adapter #0

Enclosure Device ID: 252
Slot Number: 0
Device Id: 26
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 149.049 GB [0x12a19eb0 Sectors]
Non Coerced Size: 148.549 GB [0x12919eb0 Sectors]
Coerced Size: 148.080 GB [0x12829000 Sectors]
Firmware state: Online
SAS Address(0): 0xf243204596c6e2a
Connected Port Number: 0(path0) 
Inquiry Data:                                                                     
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Foreign State: None 
Device Speed: 3.0Gb/s 
Link Speed: 3.0Gb/s 
Media Type: Hard Disk Device



Enclosure Device ID: 252
Slot Number: 1
Device Id: 19
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 465.761 GB [0x3a386030 Sectors]
Non Coerced Size: 465.261 GB [0x3a286030 Sectors]
Coerced Size: 464.729 GB [0x3a175800 Sectors]
Firmware state: Online
SAS Address(0): 0x922210b59905f43
Connected Port Number: 1(path0) 
Inquiry Data:                                                                     
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Foreign State: None 
Device Speed: 3.0Gb/s 
Link Speed: 3.0Gb/s 
Media Type: Hard Disk Device



Enclosure Device ID: 252
Slot Number: 2
Device Id: 11
Sequence Number: 1
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 74.530 GB [0x950f8b0 Sectors]
Non Coerced Size: 74.030 GB [0x940f8b0 Sectors]
Coerced Size: 73.574 GB [0x9326000 Sectors]
Firmware state: Unconfigured(good), Spun Up
SAS Address(0): 0x625131a6c932529
Connected Port Number: 2(path0) 
Inquiry Data:                                                                     
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Foreign State: Foreign 
Foreign Secure: Drive is not secured by a foreign lock key
Device Speed: 3.0Gb/s 
Link Speed: 3.0Gb/s 
Media Type: Hard Disk Device




Exit Code: 0x00
freebsd# ./MegaCli -PDInfo PhysDrv[?:0] a0
./MegaCli: No match.

Exit Code: 0x01
```
PDList gives eid and sid as 252 and 0,1,2 for three drives but PDInfo showa no match 

what is the problem 


Thank u in advance


----------



## SirDice (Oct 19, 2009)

You probably need to escape the [ and ].


----------



## abdul (Oct 19, 2009)

No it's not working for also.

```
freebsd# ./MegaCli -PDInfo physdrv ?:0  a0
./MegaCli: No match.
```


----------



## SirDice (Oct 19, 2009)

To escape means you have to put an \ in front of it.

Otherwise the shell will interpret it before executing the command.


----------



## mvalery (Dec 18, 2009)

Try the next way:

```
# ./MegaCli -PdInfo -PhysDrv \[252:0\] -aAll
```
or

```
# ./MegaCli -PdInfo -PhysDrv \[\?:0\] -aAll
```


----------

