Megacli

From Halfface
Jump to navigation Jump to search

How many raid cards do we have in system.

MegaCli64 -adpcount

Megaraid output. List disks.

MegaCli64 -CfgDsply -aAll | grep "Physical Disk:"

sda has gone missing. Drivers seems connected to megaraid.

smartctl -a -d megaraid,3 /dev/sdb |less

All Adapter Information

MegaCli64 -AdpAllInfo -aAll

Battery status.

MegaCli64 -AdpBbuCmd -aAll

Virtual drive information. Information about MegaRaid raid configuration.

MegaCli64 -LDInfo -Lall -aALL

View information about physical drives

MegaCli64 -PDList -aALL

Status of patrol read

MegaCli64 -AdpPR -Info -aALL

List make of disks.

MegaCli64 -ShowSummary -aALL | grep -i samsung

List information about underlying disk.

MegaCli64 -PDList -aALL | grep "^Device Id:"
Device Id: 47
Device Id: 49
Device Id: 48
Device Id: 46
smartctl -a -d megaraid,47 /dev/sda

Get event log

MegaCli64 -AdpEventLog -GetEvents -f /tmp/events.log -aALL && cat /tmp/events.log

Firmware log

MegaCli64 -FwTermLog Dsply -a0

Replace disk. First one disk will be missing. Second disk will rebuild.

MegaCli64 -PDList -aALL -NoLog | grep -E 'Enclosure|Slot|Firmware'

Replace broken disk.

MegaCli64 -PDList -aALL -NoLog | grep -E 'Enclosure|Slot|Firmware'
MegaCli64 -PDRbld -ShowProg -physdrv[252:2] -aALL -NoLog

Enclosure information.

MegaCli64 -EncInfo -aALL

What is the time of the raid adapter.

MegaCli64 AdpGetTime -aALL

Set time on adapter.

MegaCli64 -AdpSetTime $(date '+%Y%m%d %H:%M:%S') -a0

Is bios enabled.

MegaCli64 -AdpBIOS -Dsply a0

Display boot drive.

MegaCli64 AdpBootDrive Get a0