raid-megacli-lsiRAID MegaCLI LSI – это инструмент командной строки для настройки и управления RAID-контроллерами LSI. Он используется для создания массивов RAID, переконфигурации и мониторинга состояния дисковой подсистемы. MegaCLI LSI может быть установлен на Linux и Windows. Интерфейс командной строки программы позволяет администраторам получить полный контроль над массивами RAID и настроить их в соответствии с требованиями конкретной задачи. Использование MegaCLI LSI может существенно упростить техническую поддержку и повысить уровень безопасности данных.

yum install wget unzip -y
wget https://galaxydata.ru/community/wp-content/uploads/2018/10/8-07-14_MegaCLI.zip
unzip 8-07-14_MegaCLI.zip -d /opt/8-07-14_MegaCLI
rpm -i /opt/8-07-14_MegaCLI/Linux/MegaCli-8.07.14-1.noarch.rpm
ln -s /opt/MegaRAID/MegaCli/MegaCli64 /usr/bin/megacli

Controller Status und Config

megacli -AdpAllInfo -aAll

Состояние логического диска:

megacli -LDInfo -L0 -a0

Вывод информации о жестком диске на контроллер

megacli -PDList -a0

Output

Adapter #0

Enclosure Device ID: 252
Slot Number: 0
Drive's position: DiskGroup: 2, Span: 0, Arm: 0
Enclosure position: N/A
Device Id: 0
WWN: 55cd2e414f63a1f9
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: 894.252 GB [0x6fc81ab0 Sectors]
Non Coerced Size: 893.752 GB [0x6fb81ab0 Sectors]
Coerced Size: 893.75 GB [0x6fb80000 Sectors]
Sector Size:  0
Logical Sector Size:  0
Physical Sector Size:  0
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: 0121
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x4433221103000000
Connected Port Number: 1(path0)
Inquiry Data: BTYS8194084W960CGN  INTEL SSDSC2KB960G7                     SCV10121
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: Solid State Device
Drive:  Not Certified
Drive Temperature :21C (69.80 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No

 

Drive Temperature

megacli -PDList -aAll | grep Temperature

Output

Drive Temperature :21C (69.80 F)
Drive Temperature :22C (71.60 F)
Drive Temperature :26C (78.80 F)
Drive Temperature :26C (78.80 F)
Drive Temperature :23C (73.40 F)
Drive Temperature :23C (73.40 F)

 

megacli -adpbbucmd -aall

Output

BBU status for Adapter: 0

BatteryType: iBBU08
Voltage: 4000 mV
Current: 0 mA
Temperature: 29 C
Battery State: Optimal
Design Mode  : 48+ Hrs retention with a non-transparent learn cycle and moderate service life.

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: 0x0100
  Relative State of Charge: 83 %
  Charger System State: 1
  Charger System Ctrl: 0
  Charging current: 0 mA
  Absolute state of charge: 53 %
  Max Error: 0 %
  Battery backup charge time : 48 hours +

BBU Capacity Info for Adapter: 0

  Relative State of Charge: 83 %
  Absolute State of charge: 53 %
  Remaining Capacity: 823 mAh
  Full Charge Capacity: 997 mAh
  Run time to empty: Battery is not being charged.
  Average time to empty: 1 Hour, 39 Min.
  Estimated Time to full recharge: Battery is not being charged.
  Cycle Count: 19

BBU Design Info for Adapter: 0

  Date of Manufacture: 06/30, 2011
  Design Capacity: 1530 mAh
  Design Voltage: 4100 mV
  Specification Info: 0
  Serial Number: 2401
  Pack Stat Configuration: 0x0000
  Manufacture Name: LS36681
  Firmware Version   :
  Device Name: bq27541
  Device Chemistry: LPMR
  Battery FRU: N/A
  Transparent Learn = 0
  App Data = 0

BBU Properties for Adapter: 0

  Auto Learn Period: 28 Days
  Next Learn time: None  Learn Delay Interval:0 Hours
  Auto-Learn Mode: Disabled
  BBU Mode = 5

Exit Code: 0x00

Logs

megacli -fwtermlog -dsply -aall

Output

04/22/23 16:15:42: EVT#51723-04/22/23 16:15:42: 44=Time established as 04/22/23 16:15:42; (43 seconds since power on)
04/22/23 16:16:10: bumpCharge_iBBU08 : Expander_GPIO Data being Written = 0xff
04/22/23 16:16:10: EVT#51724-04/22/23 16:16:10: 149=Battery temperature is normal
04/22/23 16:16:10: i2cEepromWriteEnable : i2cExpander_GPIOstatus = 0xbf
04/22/23 16:16:13: i2cEepromWriteEnable : i2cExpander_GPIOstatus = 0xff
04/22/23 16:16:13: Given BBUMode 5, is the same as Current BBUMode
04/22/23 16:16:13: Date of first hasn't been updated Properly
04/22/23 16:16:54: Unable to get driver version my_timer_count=73
04/22/23 16:16:54: MSI-X Enabled: MSIX offset = 00002000
04/22/23 16:16:54: MSIX[0]: 00000000:fee00058 - 0
04/22/23 16:16:54: MSIX[1]: 00000000:00000000 - 0
04/22/23 16:16:54: MSIX[2]: 00000000:00000000 - 0
04/22/23 16:16:54: MSIX[3]: 00000000:00000000 - 0
04/22/23 16:16:54: findMsiState: Setting MSI Mode to 2 (0=Legacy, 1=MSI, 2=MSI-X)
04/22/23 16:16:54: EVT#51725-04/22/23 16:16:54: 389=Host driver is loaded and operational
04/22/23 16:16:54: MfiCmdInitQueue[0]: FW now OPERATIONAL
04/22/23 16:16:54: q.flags.mfaIs64Bits=0, q.flags.contextIs64Bits=0
04/22/23 16:16:54: q.responseQueueEntries=3f0, responseQueueStatr=3606e000
04/22/23 16:16:54: q.producerIndexPtr=749ff000, q.consumerIndexPtr=74a00000
04/22/23 16:16:54: producerIndex=0
04/22/23 16:17:10: EVT#51726-04/22/23 16:17:10: 147=Battery started charging
04/22/23 16:17:10: InhibitCharging : i2cExpander_GPIOstatus = 0xfe
04/22/23 16:18:10: EVT#51727-04/22/23 16:18:10: 242=Battery charge complete

04/22/23 16:18:10: *** MegaRAID INTELLIGENT BATTERY MONITORED INFORMATION ***
04/22/23 16:18:10: ____________________________________________________________________________

04/22/23 16:18:10: Temperature : 29 C Voltage : 4030 mV
04/22/23 16:18:10: Current : 0 mA Charging Current : 0 mA
04/22/23 16:18:10: Max Error : 0 % GasGaugeStat : 0x100
04/22/23 16:18:10: Available Data Retention Time on the Battery 95 Hours
04/22/23 16:18:10: iBBU08 Battery Charger Status: Charging 0x1 Fault 0x0
04/22/23 16:18:10: FWbbuState : 1
04/22/23 16:18:10: ____________________________________________________________________________

04/22/23 16:18:10: *** BATTERY CAPACITY INFORMATION ***
04/22/23 16:18:10: _____________________________________________
04/22/23 16:18:10: Relative State of Charge : 83 %
04/22/23 16:18:10: Absolute State of Charge : 53 %
04/22/23 16:18:10: Remaining Capacity : 823 mAh
04/22/23 16:18:10: Full Charge Capacity : 997 mAh
04/22/23 16:18:10: Time to Empty : 65535 Min
04/22/23 16:18:10: Average Time to Empty : 99 Min
04/22/23 16:18:10: Average Time to Full : 5220 Min
04/22/23 16:18:10: Cycle Count : 19
04/22/23 16:18:10: Max Error : 0 %
04/22/23 16:18:10: _____________________________________________
04/22/23 16:18:10: *** BATTERY FEATURE PROPERTIES ***
04/22/23 16:18:10: _________________________________________________

04/22/23 16:18:10: Auto Learn Period : 28 days
04/22/23 16:18:10: Next Learn Time : 0
04/22/23 16:18:10: Battery ID : 3ede0961
04/22/23 16:18:10: bbuMode : 5
04/22/23 16:18:10: Delayed Learn Interval: 0 hours from scheduled time
04/22/23 16:18:10: AutoLearnMode : 1
04/22/23 16:18:10: Next Learn scheduled on: 01 01 2000 0: 0: 0
04/22/23 16:18:10: _________________________________________________
04/22/23 16:25:10: bbuMonitorBatteryStatus: BBU relax cycle of 1 minutes has started.
04/22/23 16:25:10: bbuMonitorBatteryStatus: BBU relax cycle has completed.

Exit Code: 0x00

Check Raid Cache

What do the «Cache Policy» values mean ?

Cache Policy’s
are how the raid card uses on board RAM to collect data before writing out to disk or to read data before the system asks for it. Write cache is used when we have a lot of data to write and it is faster to write data sequentially to disk instead of writing small chunks. Read cache is used when the system has asked for some data and the raid card keeps the data in cache in case the system asks for the same data again. It is always faster to read and write to cache then to access spinning disks. Understand that you should only use caching if you have good UPS power to the system. If the system looses power and does not flush the cache it is possible to loose data. No one wants that. Lets look at each cache policy LSI raid card use.

WriteBack
uses the card’s cache to collect enough data to make a series of long sequential writes out to disk. This is the fastest write method.

WriteThrough
tells the card to write all data directly to disk without cache. This method is quite slow by about 1/10 the speed of WriteBack, but is safer as no data can be lost that was in cache when the machine’s power fails.

ReadAdaptive
uses an algorithm to see if when the OS asks for a bunch of data blocks sequentially, if we should read a few more sequential blocks because the OS _might_ ask for those too. This method can lead to good speed increases.

ReadAheadNone
tells the raid card to only read the data off the raid disk if it was actually asked for. No more, no less.

Cached
allows the general use of the cards cache for any data which is read or written. Very efficient if the same data is accessed over and over again.

Direct
is straight access to the disk without ever storing data in the cache. This can be slow as any I/O has to touch the disk platters.

Write Cache OK if Bad BBU
tells the card to use write caching even if the Battery Backup Unit (BBU) is bad, disabled or missing. This is a good setting if your raid card’s BBU charger is bad, if you do not want or can’t to replace the BBU or if you do not want WriteThrough enabled during a BBU relearn test.

No Write Cache if Bad BBU
if the BBU is not available for any reason then disable WriteBack and turn on WriteThrough. This option is safer for your data, but the raid card will switch to WriteThrough during a battery relearn cycle.

Disk Cache Policy: Enabled
Use the hard drive’s own cache. For example if data is written out the drives this option lets the drives themselves cache data internally before writing data to its platters.

Disk Cache Policy: Disabled
does not allow the drive to use any of its own internal cache.

megacli -CfgCacheCadeDsply -a0

Output

==============================================================================
Adapter: 0
Product Name: LSI MegaRAID SAS 9264-8i
Memory: 256MB
BBU: Present
Serial No: SV02604043
==============================================================================

 

megacli -LDInfo -LAll -a0

Output

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 893.75 GB
Sector Size         : 512
Is VD emulated      : Yes
Mirror Data         : 893.75 GB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 2
Span Depth          : 1
Default Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disabled
Encryption Type     : None
Bad Blocks Exist: No
Is VD Cached: No


Virtual Drive: 1 (Target Id: 1)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 893.75 GB
Sector Size         : 512
Is VD emulated      : Yes
Mirror Data         : 893.75 GB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 2
Span Depth          : 1
Default Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disabled
Encryption Type     : None
Bad Blocks Exist: No
Is VD Cached: No


Virtual Drive: 2 (Target Id: 2)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 893.75 GB
Sector Size         : 512
Is VD emulated      : Yes
Mirror Data         : 893.75 GB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 2
Span Depth          : 1
Default Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disabled
Encryption Type     : None
Bad Blocks Exist: No
Is VD Cached: No

 

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.