Print
Contents[Show]

1. Intro

Dell uses raid controllers from LSI.

The megactl utility should therefore work with all PERC raid controllers.

The Dell-provided CLI-raid-utility is for Ubuntu 16.04 and rather old, so I decided to try out this third-party utility instead.

 

 

2. Assumptions

Using Debian Buster with a Dell R710 and PERC 6/i.

root@dragonborn:~# lspci -nn
...
03:00.0 RAID bus controller [0104]: LSI Logic / Symbios Logic MegaRAID SAS 1078 [1000:0060] (rev 04)
...

root@dragonborn:~# lsb_release -a          
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
root@dragonborn:~#

 

 

 

3. Howto

  1. Add repo to OS.
    # echo "deb http://hwraid.le-vert.net/debian buster main" > /etc/apt/sources.list.d/hwraid.list
  2. Add repo key.
    # mkdir /root/Downloads
    # wget https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key
    # apt-key add hwraid.le-vert.net.gpg.key
  3. Install megaraid-status and megacli.
    # apt-get install megaraid-status megacli
  4. Done. Test it out with the command in the tips and tricks part.

 

4. Command tricks and tips

In no particular order. These three command should get you going fairly quick.

 

4.1. Print the current controller status

root@dragonborn:~# megasasctl 
a0       PERC 6/i Integrated      encl:1 ldrv:1  batt:FAULT, charging
a0d0      9312GiB RAID 5   1x6  optimal
a0e32s0    1863GiB  a0d0  online   
a0e32s1    1863GiB  a0d0  online   
a0e32s2    1863GiB  a0d0  online   
a0e32s3    1863GiB  a0d0  online   errs: media:0  other:22
a0e32s4    1863GiB  a0d0  online   
a0e32s5    1863GiB  a0d0  online   

root@dragonborn:~#

 

 

4.2. General raid status

root@dragonborn:~# megaraidsas-status 
-- Arrays informations --
-- ID | Type | Size | Status
a0d0 | RAID 5 | 9312GiB | optimal

-- Disks informations
-- ID | Model | Status | Warnings
a0e32s0 | SEAGATE ST32000444SS 1863GiB | online
a0e32s1 | SEAGATE ST2000NM0001 1863GiB | online
a0e32s2 | SEAGATE ST32000444SS 1863GiB | online
a0e32s3 | SEAGATE ST32000444SS 1863GiB | online | errs: media:0 other:19
a0e32s4 | SEAGATE ST32000444SS 1863GiB | online
a0e32s5 | SEAGATE ST32000444SS 1863GiB | online
root@dragonborn:~#

 

 

4.3. Show logical drive 0 on adapter 0 status and type

Of particular interest is the Ongoing Progresses line, This raid array is initializing, and has been doing so for a while.

root@dragonborn:~# megacli -LDInfo -L0 -a0

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :raid5-data
RAID Level          : Primary-5, Secondary-0, RAID Level Qualifier-3
Size                : 9.093 TB
Sector Size         : 512
Parity Size         : 1.818 TB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 6
Span Depth          : 1
Default Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Ongoing Progresses:
 Background Initialization: Completed 53%, Taken 379 min.
Encryption Type     : None
Is VD Cached: No



Exit Code: 0x00
root@dragonborn:~#

 

4.4. Display and adjust automatic rebuild status on adapter 0

root@dragonborn:~# megacli -AdpAutoRbld -Dsply -a0 
                                     
Adapter 0: AutoRebuild is Enabled.

Exit Code: 0x00

 

Info on rebuild rate on https://jackal777.wordpress.com/2015/05/29/adjust-raid-rebuild-rate/.

root@dragonborn:~# megacli -AdpGetProp RebuildRate -a0 
                                     
Adapter 0: Rebuild Rate = 30%

Exit Code: 0x00
root@dragonborn:~# megacli -AdpSetProp RebuildRate 60 -a0
                                     
Adapter 0: Set rebuild rate to 60% success.

Exit Code: 0x00
root@dragonborn:~# megacli -AdpGetProp RebuildRate -a0    
                                     
Adapter 0: Rebuild Rate = 60%

Exit Code: 0x00
root@dragonborn:~#

The rebuild rate can be set for software raids as well. The keywords to note here are speed_limit_max and speed_limit_min.
Preferably set the max and min values to the same high number.

See eg this site for more information; https://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html.

 

4.5. Show the physical disks on  adapter 0

The line Firmware state is of interest, this line states what the drive is doing, if anything.

 

# megacli -PDList -a0

Adapter #0

Enclosure Device ID: 32
Slot Number: 0
Drive's position: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: N/A
Device Id: 0
WWN:
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.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Sector Size: 0
Firmware state: Online, Spun Up
Device Firmware Level: 0006
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c50021457ca9
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: SEAGATE ST32000444SS 00069WM1TD7F
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :32C (89.60 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: Unknown
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No


Enclosure Device ID: 32
Slot Number: 1
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: N/A
Device Id: 1
WWN:
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.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Sector Size: 0
Firmware state: Online, Spun Up
Device Firmware Level: XQB6
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c500415c7c75
SAS Address(1): 0x0
Connected Port Number: 1(path0)
Inquiry Data: SEAGATE ST2000NM0001 XQB6Z1P20GQ7
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :33C (91.40 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: Unknown
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No


Enclosure Device ID: 32
Slot Number: 2
Drive's position: DiskGroup: 0, Span: 0, Arm: 2
Enclosure position: N/A
Device Id: 2
WWN:
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.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Sector Size: 0
Firmware state: Online, Spun Up
Device Firmware Level: 0005
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c50020ec234d
SAS Address(1): 0x0
Connected Port Number: 2(path0)
Inquiry Data: SEAGATE ST32000444SS 00059WM0FQ40
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :32C (89.60 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: Unknown
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No


Enclosure Device ID: 32
Slot Number: 3
Drive's position: DiskGroup: 0, Span: 0, Arm: 3
Enclosure position: N/A
Device Id: 3
WWN:
Sequence Number: 2
Media Error Count: 0
Other Error Count: 23
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS

Raw Size: 1.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Sector Size: 0
Firmware state: Online, Spun Up
Device Firmware Level: 0005
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c50020e33c5d
SAS Address(1): 0x0
Connected Port Number: 3(path0)
Inquiry Data: SEAGATE ST32000444SS 00059WM0DWNJ
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :32C (89.60 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: Unknown
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No


Enclosure Device ID: 32
Slot Number: 4
Drive's position: DiskGroup: 0, Span: 0, Arm: 4
Enclosure position: N/A
Device Id: 4
WWN:
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.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Sector Size: 0
Firmware state: Online, Spun Up
Device Firmware Level: 0006
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c500214572bd
SAS Address(1): 0x0
Connected Port Number: 4(path0)
Inquiry Data: SEAGATE ST32000444SS 00069WM1TCNP
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :33C (91.40 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: Unknown
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No


Enclosure Device ID: 32
Slot Number: 5
Drive's position: DiskGroup: 0, Span: 0, Arm: 5
Enclosure position: N/A
Device Id: 5
WWN:
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.819 TB [0xe8e088b0 Sectors]
Non Coerced Size: 1.818 TB [0xe8d088b0 Sectors]
Coerced Size: 1.818 TB [0xe8d00000 Sectors]
Sector Size: 0
Firmware state: Online, Spun Up
Device Firmware Level: 0005
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000c50020d36d4d
SAS Address(1): 0x0
Connected Port Number: 5(path0)
Inquiry Data: SEAGATE ST32000444SS 00059WM0GBJN
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :32C (89.60 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: Unknown
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No


Exit Code: 0x00

 

If a drive is rebuilding, show the progress as below.

In this case the rebuilding drive is 32,1; ie enclosure id 32 and slot/drive 1.

# megacli -PDRbld -ShowProg -PhysDrv [32:1] -aALL

Rebuild Progress on Device at Enclosure 32, Slot 1 Completed 51% in 10 Minutes.

 

4.6. Battery status

More info about the battery. Keeping an eye on it may be a good idea.

See eg https://crtech.tips/understanding-your-perc-battery/ for more pertinent info.

root@dragonborn:~# megacli -AdpBbuCmd -GetBbuStatus  -aALL

BBU status for Adapter: 0

BatteryType: BBU
Voltage: 4059 mV
Current: 79 mA
Temperature: 23 C
Battery State: Optimal
BBU Firmware Status:

 Charging Status              : Charging
 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


GasGuageStatus:
 Fully Discharged        : No
 Fully Charged           : No
 Discharging             : No
 Initialized             : Yes
 Remaining Time Alarm    : No
 Discharge Terminated    : No
 Over Temperature        : No
 Charging Terminated     : No
 Over Charged            : No
Relative State of Charge: 96 %
Charger Status: In Progress
Remaining Capacity: 1198 mAh
Full Charge Capacity: 1252 mAh
isSOHGood: Yes

Exit Code: 0x00


root@dragonborn:~# megacli -AdpBbuCmd -a0

BBU status for Adapter: 0

BatteryType: BBU
Voltage: 4065 mV
Current: 0 mA
Temperature: 24 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


GasGuageStatus:
 Fully Discharged        : No
 Fully Charged           : Yes
 Discharging             : Yes
 Initialized             : Yes
 Remaining Time Alarm    : No
 Discharge Terminated    : No
 Over Temperature        : No
 Charging Terminated     : Yes
 Over Charged            : No
Relative State of Charge: 100 %
Charger Status: Complete
Remaining Capacity: 1252 mAh
Full Charge Capacity: 1252 mAh
isSOHGood: Yes
 Battery backup charge time : 0 hours

BBU Capacity Info for Adapter: 0

 Relative State of Charge: 100 %
 Absolute State of charge: 70 %
 Remaining Capacity: 1252 mAh
 Full Charge Capacity: 1252 mAh
 Run time to empty: Battery is not being charged.   
 Average time to empty: Battery is not being charged.   
 Estimated Time to full recharge: Battery is not being charged.   
 Cycle Count: 38
Max Error = 2 %
Remaining Capacity Alarm = 180 mAh
Remining Time Alarm = 10 Min

BBU Design Info for Adapter: 0

 Date of Manufacture: 08/09, 2009
 Design Capacity: 1800 mAh
 Design Voltage: 3700 mV
 Specification Info: 49
 Serial Number: 3149
 Pack Stat Configuration: 0x0014
 Manufacture Name: SMP-PA1.9
 Firmware Version   :  
 Device Name: DLFR463
 Device Chemistry: LION
 Battery FRU: N/A
 Transparent Learn = 0
 App Data = 0

BBU Properties for Adapter: 0

 Auto Learn Period: 90 Days
 Next Learn time: Fri May 29 15:34:32 2020
 Learn Delay Interval:0 Hours
 Auto-Learn Mode: Enabled

Exit Code: 0x00
root@dragonborn:~#

 

 

 

 

 

5. Sources

https://www.dell.com/support/home/us/en/04/drivers/driversdetails?driverid=52r3d (Ubuntu 16.04)

https://cetre.co.uk/blog/monitoring-perc-raid-controllers-and-storage-arrays-on-dell-poweredge-servers-with-debian-and-ubuntu/

http://hwraid.le-vert.net/wiki/LSIMegaRAIDSAS

https://jackal777.wordpress.com/2015/05/29/adjust-raid-rebuild-rate/

https://crtech.tips/understanding-your-perc-battery/

https://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html

 

 

 

 

 

 

 

 

 

Hits: 54