Dell perccli: Manage PERC RAID, Virtual Disks and Hot Spares - 夜莺博客

Dell perccli: Manage PERC RAID, Virtual Disks and Hot Spares

PERCCLI is Dell's in-band command line tool for PowerEdge RAID Controllers, and it is the fastest way to work with PERC hardware from the operating system without booting into the RAID BIOS. This guide covers the command structure, how to read controller and drive inventory before you change anything, how to create a virtual disk and a hot spare, and which verification commands prove the array came up healthy. All commands use real perccli syntax with the /cX/eY/sZ enclosure-slot addressing model.

Understanding the perccli address model

Every perccli command starts from the controller and drills down. /cX is the controller, /eY is the enclosure, /sZ is the slot in that enclosure, and /vY is a virtual disk. all works as a wildcard at any level, which is why /c0/eall/sall show is the single most useful inventory command in the tool.

# Controller summary
perccli /c0 show
perccli /c0 show all

# All virtual disks on controller 0
perccli /c0/vall show

# All physical drives, including the ones behind an expander
perccli /c0/eall/sall show
perccli /c0/eall/sall show all

Run the inventory first, every time. A drive that is already foreign, offline or in JBOD mode changes what the create command should look like, and perccli will refuse combinations that contradict the current state.

Creating a virtual disk

The create syntax is positional and long, so build it deliberately: RAID level, size, name, drives, physical drives per array, cache policy and stripe size.

perccli /c0 add vd r5 size=500GB name=VD1 drives=1:0-3 pdperarray=4 \
        pdcache=on wt wb strip=128
  • r5 selects RAID 5; r0, r1, r6, r10, r50 and r60 are also valid.
  • size=500GB creates a partial array so the remaining space can host a second VD; remaining consumes everything left.
  • drives=1:0-3 means enclosure 1, slots 0 through 3.
  • wt sets write-through, wb write-back. Start with wt on a new array if the server has no battery or cache-vault unit, then move to wb once the cache is protected.
  • strip=128 is a sane default for mixed workloads; 64 KB suits databases, 256 KB to 1 MB suits sequential streaming.

Hot spares and drive states

A dedicated hot spare is assigned to a specific drive group; a global hot spare serves any redundant array on the controller. Adding one before you need it is the difference between a rebuild and an outage.

# Dedicated hot spare for drive group 0
perccli /c0/e1/s4 add hotsparedrive dgs=0

# Global hot spare
perccli /c0/e1/s4 add hotsparedrive

# Put a drive back into service
perccli /c0/e1/s5 set good

# Blink the slot LED so a technician can find the right bay
perccli /c0/e1/s5 start locate
perccli /c0/e1/s5 stop locate

Use start locate before any physical intervention. Replacing the wrong drive in a degraded array is the most common way a maintenance window becomes a data-loss event.

Consistency checks, cache and verification

perccli /c0/v0 start cc
perccli /c0/v0 show cc
perccli /c0/v0 stop cc

perccli /c0 show preservedCache
perccli /c0/v0 delete preservedCache

A preserved cache exists when the controller lost power with dirty write-back data on board. Until that cache is flushed or deliberately deleted, the VD stays write-protected — if the data is not needed, delete it explicitly rather than troubleshooting a mysteriously read-only volume.

Reading the output like an operator

Two columns carry most of the diagnostic weight. State should read Optl for drives and VDs; Dgrd means a member is missing and a rebuild is running or pending, Offln means the drive is unusable, and UGood means an unconfigured good drive is available. Media Error Count and Other Error Count that grow between checks are the early warning sign — replace before the predictive failure counter trips.

If you are comparing platforms, the equivalent workflow on HPE hardware is covered in our HPE Smart Array ssacli guide, and the trade-offs between redundancy levels are explained in RAID levels and the parity write hole.

原文链接:https://www.dell.com/support/kbdoc/en-hr/000394815/poweredge-managing-the-poweredge-raid-controller-with-perccli