Dell PowerEdge: manage RAID with PERCCLI
Dell PowerEdge servers frequently utilize PowerEdge RAID Controllers (PERC) to manage storage arrays, providing data redundancy and performance benefits.…
Dell PowerEdge servers frequently utilize PowerEdge RAID Controllers (PERC) to manage storage arrays, providing data redundancy and performance benefits. While the server's BIOS/UEFI offers a graphical interface for basic RAID configuration, advanced tasks, automation, and detailed status monitoring are best handled via the command-line interface. This article delves into using perccli, Dell's unified command-line utility for PERC cards, to manage various aspects of RAID configurations.
perccli supersedes older utilities like MegaCli (for LSI-based PERC controllers) and provides a more consistent syntax across different PERC generations. This guide focuses on PERC H7xx and H8xx series controllers, which are commonly found in PowerEdge servers from 12th generation onwards, though the commands are broadly applicable to H3xx, H7xx, and H8xx series (e.g., PERC H730, H740, H750).
Installation and Basic Usage
The perccli utility is typically distributed as part of the Dell OpenManage Server Administrator (OMSA) package or as a standalone utility available for download from Dell's support website. For Linux systems, you'll usually find an RPM or DEB package.
On a Red Hat-based system (e.g., RHEL, CentOS, Rocky Linux):
# Download the perccli RPM from Dell Support (e.g., PERCCLI-007.2404.0000.0000-1.noarch.rpm)
sudo dnf install perccli-007.2404.0000.0000-1.noarch.rpm
Once installed, the executable is usually located in /opt/dell/perccli/ or /opt/MegaCli/MegaCli64 (for older versions, MegaCli might be symlinked to perccli or remain separate). It's good practice to add this path to your system's PATH environment variable for easier access.
export PATH=$PATH:/opt/dell/perccli/
All perccli commands follow a similar structure: perccli /<controller_id> /<adapter_component> <action> [parameters]. The <controller_id> typically starts from c0 for the first controller.
Listing Controllers and Physical Drives
Before any operations, identify your RAID controllers and the physical drives attached to them. This helps in correctly targeting commands.
List all controllers
To see all detected PERC controllers and their basic status:
perccli show all
This command provides a summary including controller ID, model, firmware version, and BBU status.
List physical drives
To view physical drives attached to a specific controller (e.g., controller 0):
perccli /c0 show all J
The J flag outputs the data in JSON format, which is useful for scripting. Without J, it outputs human-readable text. Key information includes Slot Number (sX), Enclosure ID (eY), Drive Type (HDD/SSD), Capacity, and State (Online, Unconfigured Good, Unconfigured Bad, JBOD).
Physical drives are typically referenced as eX:sY, where eX is the enclosure ID and sY is the slot number. For internal drives in a direct-attached backplane, the enclosure ID is often 32, but it can vary. Always verify with perccli /c0 show all.
Virtual Drive Management
Virtual drives (VDs) are the logical units presented to the operating system, formed from one or more physical drives in a specific RAID level.
Create a new Virtual Drive
Creating a new VD requires specifying the RAID level, the physical drives to include, and optionally, cache policies.
# Create a RAID 10 virtual drive from four drives on controller 0
# Drives are 32:0, 32:1, 32:2, 32:3 (Enclosure 32, Slots 0, 1, 2, 3)
# Write Back (wb), Read Ahead (ra), Direct cache policy (direct)
perccli /c0 add vd type=raid10 drives=32:0,32:1,32:2,32:3 wb ra direct
# Create a RAID 5 virtual drive with 3 drives and a dedicated hot spare
# Drives are 32:4, 32:5, 32:6 for the array, 32:7 as hot spare
perccli /c0 add vd type=raid5 drives=32:4,32:5,32:6 hotspares=32:7 wb ra direct
type: Specifies the RAID level (e.g.,raid0,raid1,raid5,raid6,raid10,raid50,raid60).drives: Comma-separated list ofeX:sYidentifiers for physical drives.wb/wt: Write Back / Write Through cache policy. Write Back is generally faster but risks data loss on power failure without BBU.ra/nora: Read Ahead / No Read Ahead cache policy. Read Ahead improves performance for sequential reads.direct/cached: Direct I/O / Cached I/O. Direct I/O bypasses the controller's cache for some operations.hotspares: (Optional) Specifies drives to be configured as dedicated hot spares for this VD.ss: (Optional) To configure as a self-encrypting drive (SED) virtual drive.
Delete a Virtual Drive
# Delete virtual drive 0 on controller 0
perccli /c0 /v0 del
Warning: Deleting a virtual drive will destroy all data on it. Confirm the VD ID before execution.
Show Virtual Drive details
# Show details for virtual drive 0 on controller 0
perccli /c0 /v0 show
# Show summary of all virtual drives on controller 0
perccli /c0 /v show
Physical Drive Management
Setting a drive to JBOD mode
Some PERC controllers (e.g., H730P, H740P) support JBOD (Just a Bunch Of Disks) mode, allowing the OS to directly access raw physical drives without RAID configuration.
# Set physical drive 32:0 to JBOD mode
perccli /c0 /e32 /s0 set jbod
To revert from JBOD, you typically need to clear the foreign configuration and then mark it as Unconfigured Good before adding it to a RAID array.
Marking a drive as a Global Hot Spare
Global hot spares can be used by any degraded RAID array on the controller, provided it has compatible drive characteristics.
# Mark physical drive 32:10 as a global hot spare
perccli /c0 /e32 /s10 add HSP
Rebuilding a degraded array
If an array is degraded and you have replaced a failed drive with a new Unconfigured Good drive, the rebuild should start automatically if a hot spare is present, or you can manually initiate it.
# Manually rebuild virtual drive 0 using physical drive 32:11
perccli /c0 /v0 start rebuild /e32 /s11
Monitor the rebuild progress with perccli /c0 /v0 show rebuild.
Foreign Configuration Management
When drives from an existing RAID array are moved to a new controller or the controller loses its configuration, they are detected as having "Foreign Configuration". This configuration must be imported or cleared.
View foreign configurations
perccli /c0 show foreign
This command lists all foreign configurations detected on the controller.
Import foreign configuration
If you've moved an array of drives from one PERC controller to another and want to retain the data:
# Import a single foreign configuration
perccli /c0 /fall import
# Import all foreign configurations (if multiple are detected)
perccli /c0 /fall import all
Important: Ensure you are importing the correct configuration. Importing an incorrect or partial configuration can lead to data loss.
Clear foreign configuration
If you intend to reuse drives that were part of a previous RAID array, or if a foreign configuration is problematic, you might need to clear it. This action makes the drives "Unconfigured Good" so they can be used for new arrays.
# Clear all foreign configurations on controller 0
perccli /c0 /fall delete
Warning: Clearing a foreign configuration effectively orphans the data on those drives. Data will be inaccessible and likely overwritten when the drives are used in a new array.
Controller and BBU Management
Monitoring the PERC controller itself and its battery backup unit (BBU) is crucial for data integrity.
Show Controller properties
perccli /c0 show all J | grep -E "Product Name|Firmware Version|Current Time|Rebuild Rate|Patrol Read Rate"
This provides details like controller model, firmware, and current operational parameters.
Show BBU status
perccli /c0 /bbu show all
Check the BBU status (Pack Missing, Charge Complete, Charging, Learn Cycle Required) and its health. A healthy BBU is vital for Write Back caching to prevent data loss during power outages.
For PERC H740P and newer, SuperCapacitors often replace traditional BBUs, offering similar write cache protection without the aging concerns of batteries. The command output will reflect the supercapacitor status.
Common Pitfalls
- Incorrect Drive Identification: Always double-check drive IDs (
eX:sY) before adding to an array, deleting, or marking as hot spare. A mistake can lead to data loss. - Forgetting to Clear Foreign Configuration: New drives that were previously part of another RAID array might show as "Foreign" and cannot be used until their foreign configuration is cleared.
- Ignoring BBU Status: A failing or missing BBU can disable write-back cache, significantly impacting performance and risking data integrity. Regularly check BBU status.
- Insufficient Hot Spares: Without sufficient hot spares, a degraded array requires manual intervention and downtime to replace failed drives and initiate rebuilds.
- Mixing Drive Types/Sizes: While some RAID levels tolerate mixed drive sizes (using the smallest drive's capacity for all), mixing HDDs and SSDs in the same array is generally not recommended for optimal performance or reliability. Ensure drives are "Unconfigured Good" and not "Unconfigured Bad" before use.
- Firmware Mismatches: Ensure your PERC controller firmware is up-to-date and compatible with your server's other components. Outdated firmware can lead to instability or unrecognised drives.