Skip to content

Hosteroid/storalyzer-alma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

38 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Storalyzer-Alma

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.

Features

πŸ” Comprehensive Storage Analysis

  • 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

πŸ§ͺ SMART Testing & Analysis (New in v3.0)

  • 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

πŸ›  Hardware RAID Analysis

  • 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

πŸ–₯ System Information

  • Network interface inventory with hardware details
  • Hardware controller detection and configuration
  • Root privilege and OS validation

⚑ Smart Installation

  • 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

πŸ“Š Comprehensive Reporting

  • 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

Recent Improvements

πŸš€ Version 3.0 - SMART Testing & Advanced Health Analysis

  • 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

βœ… Version 2.0 - Bug Fixes & Enhancements

  • 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

πŸ”§ Technical Improvements

  • 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

Usage

Prerequisites

  • AlmaLinux system
  • Root privileges
  • Hardware RAID controllers (optional, auto-detected)
  • NVMe devices (optional, auto-detected)

Running the Script

sudo bash Storalyzer-Alma.sh

Example Output

β”Œβ”€ 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

Dependencies

The script automatically installs required dependencies:

  • smartmontools - For SMART testing and analysis of all drive types
  • nvme-cli - For NVMe device analysis and health monitoring
  • dmidecode - For hardware information extraction
  • storcli - Automatically downloaded and installed when hardware RAID controllers are detected
  • pciutils - For PCI device detection
  • mdadm - For software RAID management (if software RAID is present)

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests to improve the storage health checking capabilities.

About

Comprehensive storage and RAID health analyzer for AlmaLinux. Performs SMART and NVMe checks, full hardware/software RAID analysis, and detailed system inventory.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages