Skip to content

tool: add disk-health tool (SMART + NVMe)#15417

Merged
michelroegl-brunner merged 2 commits into
mainfrom
feature/disk-health-smart
Jun 27, 2026
Merged

tool: add disk-health tool (SMART + NVMe)#15417
michelroegl-brunner merged 2 commits into
mainfrom
feature/disk-health-smart

Conversation

@MickLesk

Copy link
Copy Markdown
Member

✍️ Description

New PVE host tool that reports drive health for all physical disks:

  • Installs smartmontools and nvme-cli on demand.
  • Enumerates physical disks (skipping loop/zram/dm devices) and prints an overall SMART verdict plus key indicators (temperature, power-on hours, wear, reallocated/pending/offline sectors, CRC errors; NVMe spare, percentage used and media errors), highlighting non-zero error counters.
  • Optionally starts a non-destructive short SMART self-test on a selected disk.

PS: Entry in DB will be created after merge, i dont have it in VED, so i dont have a json, i create it manually

image

🔗 Related Issue

Fixes #

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to script metadata (PocketBase/website data).
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

New PVE host tool that reports drive health for all physical disks:

- Installs smartmontools and nvme-cli on demand.
- Enumerates physical disks (skipping loop/zram/dm devices) and prints an
  overall SMART verdict plus key indicators (temperature, power-on hours,
  wear, reallocated/pending/offline sectors, CRC errors; NVMe spare,
  percentage used and media errors), highlighting non-zero error counters.
- Optionally starts a non-destructive short SMART self-test on a selected
  disk.
@MickLesk
MickLesk requested a review from a team as a code owner June 26, 2026 19:46
@github-actions github-actions Bot added new script A change that adds a new script pve-tool tools labels Jun 26, 2026
Comment thread tools/pve/disk-health.sh Outdated
Replace locally duplicated color variables and msg_* helpers with
core.func + load_functions, matching the pattern used by update-apps
and pve-privilege-converter. Telemetry remains via api.func only.
@michelroegl-brunner
michelroegl-brunner merged commit b5361e5 into main Jun 27, 2026
2 checks passed
@github-actions
github-actions Bot deleted the feature/disk-health-smart branch June 28, 2026 03:03
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

new script A change that adds a new script pve-tool tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants