random tips on coding, ops, ...

RAID 卡维护备忘

各种 RAID 卡的日常维护命令备忘。

LSI 系列

megacli -LDInfo -Lall -aALL 显示所有逻辑磁盘组信息。搜索 State, 正常情况为:”State : Optimal”,否则为异常,例如 “State : Degraded”。

megacli -PDList -aAll -NoLog 查看所有物理磁盘信息。如果 “Firmware state” 显示为非 Online,则表示该磁盘有问题。

megacli -cfgdsply -aALL -NoLog 显示 RAID 卡型号,RAID 设置及物理磁盘的相关信息。

megacli -AdpAllInfo -aALL -NoLog 显示 RAID 卡信息。

megacli -FwTermLog -Dsply -aALL -NoLog 查看 RAID 卡日志。

megacli -AdpBbuCmd -aAll -NoLog 查看电池信息

megacli -adpCount -NoLog 显示适配器个数

megacli -AdpGetTime –aALL -NoLog 显示适配器时间

HP SmartArray

HPACUCLI stands for HP Array Configuration Utility CLI。 软件下载地址在 这里

在使用该命令之前需要确认加载了 sg 内核模块。

# modprobe sg
# hpacucli
HP Array Configuration Utility CLI 9.40.12.0
Detecting Controllers...Done.
Type "help" for a list of supported commands.
Type "exit" to close the console.

=> rescan
=> ctrl all show config # Display Controller and Disk Status

Smart Array P420i in Slot 0 (Embedded)    (sn: 001438028159200)

   array A (SAS, Unused Space: 0  MB)


      logicaldrive 1 (838.1 GB, RAID 1+0, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 300 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 300 GB, OK)
      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 300 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 300 GB, OK)
      physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 300 GB, OK)
      physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 300 GB, OK)

   SEP (Vendor ID PMCSIERA, Model SRCv8x6G) 380 (WWID: 500143802815920F)

=> ctrl all show status # View Controller Status

Smart Array P420i in Slot 0 (Embedded)
   Controller Status: OK
   Cache Status: OK
   Battery/Capacitor Status: OK


=> ctrl slot=0 pd all show status # View Drive Status

   physicaldrive 1I:1:1 (port 1I:box 1:bay 1, 300 GB): OK
   physicaldrive 1I:1:2 (port 1I:box 1:bay 2, 300 GB): OK
   physicaldrive 1I:1:3 (port 1I:box 1:bay 3, 300 GB): OK
   physicaldrive 1I:1:4 (port 1I:box 1:bay 4, 300 GB): OK
   physicaldrive 2I:1:5 (port 2I:box 1:bay 5, 300 GB): OK
   physicaldrive 2I:1:6 (port 2I:box 1:bay 6, 300 GB): OK

=> ctrl slot=0 pd 1I:1:1 show detail # View Individual Drive Status

Smart Array P420i in Slot 0 (Embedded)

   array A

      physicaldrive 1I:1:1
         Port: 1I
         Box: 1
         Bay: 1
         Status: OK
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 300 GB
         Rotational Speed: 10500
         Firmware Revision: HPD3
         Serial Number: S0K12Z250000B411CB2H
         Model: HP      EG0300FCVBF
         Current Temperature (C): 30
         Maximum Temperature (C): 37
         PHY Count: 2
         PHY Transfer Rate: 6.0Gbps, Unknown
         Drive Authentication Status: OK
         Carrier Application Version: 11
         Carrier Bootloader Version: 6


=> ctrl slot=0 ld all show # View All Logical Drives

Smart Array P420i in Slot 0 (Embedded)

   array A

      logicaldrive 1 (838.1 GB, RAID 1+0, OK)

=> ctrl slot=0 ld 1 show # View Detailed Logical Drive Status

Smart Array P420i in Slot 0 (Embedded)

   array A

      Logical Drive: 1
         Size: 838.1 GB
         Fault Tolerance: 1+0
         Heads: 255
         Sectors Per Track: 32
         Cylinders: 65535
         Strip Size: 256 KB
         Full Stripe Size: 768 KB
         Status: OK
         Caching:  Enabled
         Unique Identifier: 600508B1001C77F824A96079D74D01AD
         Disk Name: /dev/sda
         Mount Points: / 16.0 GB
         OS Status: LOCKED
         Logical Drive Label: A3251B080014380281592008F9E
         Mirror Group 0:
            physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 300 GB, OK)
            physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 300 GB, OK)
            physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 300 GB, OK)
         Mirror Group 1:
            physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 300 GB, OK)
            physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 300 GB, OK)
            physicaldrive 2I:1:6 (port 2I:box 1:bay 6, SAS, 300 GB, OK)
         Drive Type: Data


=> ctrl slot=0 modify dwc=enable # Enable or Disable Cache

Warning: Without the proper safety precautions, use of write cache on physical
         drives could cause data loss in the event of power failure.  To ensure
         data is properly protected, use redundant power supplies and
         Uninterruptible Power Supplies. Also, if you have multiple storage
         enclosures, all data should be mirrored across them. Use of this
         feature is not recommended unless these precautions are followed.
         Continue? (y/n) n

=> ctrl slot=0 ld 1 modify led=on # Blink Physical Disk LED

=> quit

comments powered by Disqus