StorCLI adalah command-line utility untuk mengelola storage controllers LSI/Broadcom MegaRAID, memungkinkan kontrol penuh atas drive fisik dan virtual, konfigurasi RAID, dan diagnostik sistem. Tool ini menggunakan sintaks hierarkis dengan pengidentifikasi seperti /c0 untuk controller 0, /e0 untuk enclosure, and /s0 untuk slot. Sebagian besar perintah mendukung operasi show, set, dan delete, dan menambahkan J di akhir akan menghasilkan output dalam format JSON.
🔹 Quick Health & Error Check #
storcli /c0 /eall /sall show
storcli /c0 /e252 /sall show all
storcli /c0 /eall /sall show all | egrep "Slot Number|State|Media Error Count|Other Error Count|Predictive Failure Count"Controller & System Overview #
- List all controllers:
storcli /call show- Show detailed controller information:
storcli /c0 show all- Display system overview (controllers, drives, health):
storcli show- Show firmware, model, and serial number:
storcli /c0 showPhysical Drives #
- Show all physical drives:
storcli /call/dall show- Show detailed info for all physical drives:
storcli /call/dall show all- Show drives in specific enclosure (example: enclosure 252):
storcli /c0/e252/sall show- Show specific drive (enclosure 252, slot 0):
storcli /c0/e252/s0 showVirtual Drives #
- List all virtual drives:
storcli /call/vall show- Show detailed info for virtual drive 0:
storcli /c0/v0 show- Show virtual drive properties in JSON format:
storcli /c0/v0 show J- Show initialization status:
storcli /c0/v0 show initRAID Management #
Create RAID Arrays #
- Create RAID 1 (mirror) with 2 drives:
storcli /c0 add vd r1 drives=252:0,252:1- Create RAID 5 with drives slot 0–7:
storcli /c0 add vd r5 drives=252:0-7- Create RAID 10 with 8 drives (2 drives per array):
storcli /c0 add vd r10 drives=252:0-7 pdperarray=2Delete Virtual Drives #
- Delete all virtual drives on controller 0:
storcli /c0/vall delete force⚠️ WARNING: This will destroy all data.
RAID Migration / Expansion #
- Expand RAID 5 by adding a new drive:
storcli /c0/v0 start migrate type=raid5 option=add drives=252:8Tips & Best Practices:
- Always check Media Error Count and Predictive Failure Count before replacing disks.
- Use
show allfor full SMART-like detail. - RAID migration can take hours to days depending on disk size and load.
- Backup before RAID operations.
Disk & Enclosure Operations #
Locate / Identify Disk #
- Blink LED untuk identifikasi disk:
storcli /c0/e252/s0 start locate- Matikan LED locate:
storcli /c0/e252/s0 stop locateMark Disk as Failed / Missing (Untuk Replacement) #
StorCLI tidak memakai
insert untuk mark missing.
Command yang benar adalah set state atau offline.
- Mark disk sebagai failed (manual fail):
storcli /c0/e252/s0 set failed- Mark disk sebagai offline:
storcli /c0/e252/s0 set offlineReplace Failed Drive & Rebuild #
- Replace disk secara fisik
- Start rebuild (biasanya otomatis jika hot spare atau RAID policy mendukung)
Manual rebuild:
storcli /c0/e252/s0 start rebuildCorrect replacement workflow:
storcli /c0/e252/s0 set failed
# Replace disk physically
storcli /c0/e252/s0 start rebuildClear Foreign Configuration #
storcli /call/fall deleteController Settings #
- Enable JBOD mode:
storcli /c0 set jbod=on- Disable JBOD mode:
storcli /c0 set jbod=off- Set rebuild rate (30%):
storcli /c0 set rebuildrate=30- Enable alarm:
storcli /c0 set alarm=enbl- Silence alarm:
storcli /c0 set alarm=silenceDiagnostics & Maintenance #
- Show BBU status:
storcli /c0/bbu show- Show CacheVault info:
storcli /c0/cv show- Show enclosure info:
storcli /c0/eall show- Show event logs:
storcli /c0 show events- Clear event logs:
storcli /c0 delete events- Start patrol read:
storcli /c0 start patrolreadAdvanced Operations #
Initialize Virtual Drive #
- Full initialization:
storcli /c0/v0 start init full- Force init (⚠️ DESTROYS DATA):
storcli /c0/v0 start init full force- Show init progress:
storcli /c0/v0 show initCache Policy #
- Set cache policy (WriteBack + ReadAhead):
storcli /c0/v0 set wrcache=WB rdcache=RACommon options:
- WB / WT → Write Back / Write Through
- RA / NR → Read Ahead / No Read Ahead
Global Hot Spare #
- Set drive as global hot spare:
storcli /c0/e252/s1 add hotsparedrive