A comprehensive storage health monitoring tool specifically designed for AlmaLinux systems. This script provides detailed analysis of both NVMe devices and hardware RAID controllers with intelligent detection, SMART testing, and reporting capabilities.
- NVMe Devices: Complete device information including accurate model names, firmware versions, capacity, and health status
- Hardware RAID Controllers: Detailed virtual drive and physical drive analysis using StorCLI
- Software RAID Arrays: Full mdadm array analysis with member device details and health status
- Intelligent Detection: Automatically detects and configures appropriate tools for your hardware
- Automated SMART Tests: Runs short SMART tests on all discovered drives
- NVMe Health Monitoring: Critical warnings, temperature, available spare, and wear percentage
- RAID Drive Testing: SMART testing via MegaRAID passthrough for drives behind RAID controllers
- SSD Life Remaining: Displays wear level and estimated life remaining for SSDs
- Comprehensive Attributes: Power-on hours, reallocated sectors, pending sectors, temperature
- Health Assessment: Color-coded health status with actionable recommendations
- Virtual Drive status, RAID levels, and usable capacity
- Physical drive health with accurate state reporting (
Online
,Failed
, etc.) - Complete drive inventory with model numbers, serial numbers, and firmware versions
- Distinguishes between raw disk capacity and RAID-usable capacity
- Multi-controller support with detailed per-controller analysis
- Network interface inventory with hardware details
- Hardware controller detection and configuration
- Root privilege and OS validation
- Installs required packages only when missing (
nvme-cli
,dmidecode
,smartmontools
) - Automatic StorCLI detection and installation for hardware RAID controllers
- Non-intrusive operation - no unnecessary package installations
- Health Summary: Overall system storage health with color-coded status indicators
- Issue Categorization: Critical errors, warnings, and informational notices
- Actionable Recommendations: Specific guidance for addressing detected issues
- Predictive Analysis: Early warning for potential drive failures based on SMART attributes
- Comprehensive SMART Testing: Automated short SMART tests on all drives with progress monitoring
- NVMe Health Metrics: Detailed analysis including wear percentage, available spare, and critical warnings
- RAID Drive SMART Access: Full SMART testing via MegaRAID passthrough for drives behind RAID controllers
- SSD Life Monitoring: Wear level indicators and remaining life percentage for all SSDs
- Enhanced Health Assessment: Color-coded health status based on multiple SMART attributes
- Test Result Analysis: Automatic analysis of SMART test results with actionable recommendations
- Fixed NVMe Model Names: Resolved truncated model names (was showing "INTEL" instead of full "INTEL SSDPE2KX040T8")
- Corrected RAID Parsing: Fixed StorCLI output parsing for accurate drive states, sizes, and model information
- Enhanced Size Reporting: Proper distinction between physical disk capacity and RAID virtual drive capacity
- Improved Data Consistency: Ensures identical information display for drives in the same RAID array
- Robust Error Handling: Multiple fallback methods for parsing different StorCLI output formats
- Enhanced NVMe device detection using
nvme id-ctrl
with intelligent fallbacks - Corrected StorCLI field parsing based on actual command output analysis
- Improved data extraction for serial numbers, firmware versions, and capacity information
- Better formatting and presentation of storage analysis results
- SMART attribute parsing for predictive failure analysis
- AlmaLinux system
- Root privileges
- Hardware RAID controllers (optional, auto-detected)
- NVMe devices (optional, auto-detected)
sudo bash Storalyzer-Alma.sh
┌─ SMART Testing ──────────────────────────────────────────────────────────────┐
✓ INFO | Starting SMART tests | on discovered drives
=== Direct Drive SMART Tests ===
✓ INFO | Testing NVMe drives | via native nvme commands
NVMe Drive: /dev/nvme0n1
✓ PASS | SMART support | enabled
✓ PASS | Overall health | PASSED
✓ INFO | Starting short test | estimated completion: 2 minutes
=== RAID Drive SMART Tests (via MegaRAID Passthrough) ===
Drive 0 (/dev/sda -d megaraid,0):
✓ PASS | SMART support | enabled
✓ PASS | Overall health | PASSED
✓ INFO | Model: | INTEL SSDSC2KB480G8
✓ INFO | Serial: | BTYF905509TY480BGN
✓ INFO | Starting short test | estimated completion: 2 minutes
┌─ RAID Drive SMART Analysis ──────────────────────────────────────────────────┐
=== Drive 0 Analysis (INTEL SSDSC2KB480G8) ===
✓ PASS | Device Model: | INTEL SSDSC2KB480G8
✓ INFO | Serial Number: | BTYF905509TY480BGN
✓ INFO | Capacity: | 480,103,981,056 bytes [480 GB]
✓ PASS | SMART Health: | PASSED
✓ INFO | Power On Hours: | 15,432 hours (643 days)
✓ PASS | Reallocated Sectors: | 0
✓ PASS | Pending Sectors: | 0
✓ INFO | Temperature: | 32°C
✓ INFO | SSD Life Remaining: | 97%
✓ PASS | Short Test Result: | PASSED
✓ PASS | Drive 0 Overall Health: | HEALTHY
┌─ NVMe Drive Analysis ────────────────────────────────────────────────────────┐
┌─ Analyzing /dev/nvme0n1 ─────────────────────────────────────────────────────┐
✓ INFO | Model: | INTEL SSDPE2KX040T8
✓ INFO | Serial: | BTLJ905509TY4P0FGN
✓ INFO | Firmware: | VDV10152
✓ PASS | Critical Warning: | 0 (No warnings)
✓ INFO | Temperature: | 35°C
✓ PASS | Available Spare: | 100%
✓ INFO | Available Spare Threshold: | 10%
✓ INFO | Percentage Used: | 2%
✓ INFO | Life Remaining: | 98%
✓ INFO | Power On Hours: | 8,742 hours
✓ PASS | NVMe Health: | HEALTHY
✓ PASS | nvme0n1 Overall Health: | HEALTHY
The script automatically installs required dependencies:
smartmontools
- For SMART testing and analysis of all drive typesnvme-cli
- For NVMe device analysis and health monitoringdmidecode
- For hardware information extractionstorcli
- Automatically downloaded and installed when hardware RAID controllers are detectedpciutils
- For PCI device detectionmdadm
- For software RAID management (if software RAID is present)
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests to improve the storage health checking capabilities.