LED control for storage enclosures and drive identification
NPEM (Native PCIe Enclosure Management) provides a standard mechanism for controlling LEDs on storage drive enclosures. It enables software to control locate, fault, and status indicators for NVMe drives.
Before NPEM, NVMe drives lacked standardized LED control (unlike SAS with SGPIO/SES). NPEM provides a native PCIe solution for drive identification and status reporting.
| Offset | Register | Description |
|---|---|---|
| 00h | Extended Cap Header | ID = 0029h |
| 04h | NPEM Capability | Supported indicators |
| 08h | NPEM Control | Indicator control bits |
| 0Ch | NPEM Status | Current indicator state |
| Bit | Indicator | Meaning |
|---|---|---|
| 0 | OK | Drive operating normally |
| 1 | Locate | Identify this drive (blink) |
| 2 | Fail | Drive has failed |
| 3 | Rebuild | RAID rebuild in progress |
| 4 | PFA | Predicted failure alert |
| 5 | Hot Spare | Drive is hot spare |
| 6 | In Critical Array | Part of degraded array |
| 7 | In Failed Array | Part of failed array |
┌─────────────────────────────────────────────────────────────┐
│ System Software │
│ (mdadm, storage management, BMC, Redfish) │
└──────────────────────────┬──────────────────────────────────┘
│
NPEM Control/Status
│
┌──────────────────────────▼──────────────────────────────────┐
│ Root Port / Switch │
│ (with NPEM capability) │
└──────────────────────────┬──────────────────────────────────┘
│
┌────────────────┼────────────────┐
│ │ │
┌─────────▼─────┐ ┌───────▼───────┐ ┌─────▼─────────┐
│ NVMe SSD │ │ NVMe SSD │ │ NVMe SSD │
│ + LED │ │ + LED │ │ + LED │
└───────────────┘ └───────────────┘ └───────────────┘
# Check NPEM support
lspci -vvv -s 00:1c.0 | grep -A10 "Native PCIe Enclosure"
# Control via sysfs (if supported)
cat /sys/class/enclosure/
# ledmon for enclosure LED management
ledctl locate=/dev/nvme0n1
ledctl failure=/dev/nvme0n1
ledctl off=/dev/nvme0n1