Tools & Add-onsPVE Tools
PVE Disk Health Tool
Print a SMART health summary for every physical disk of the host and optionally start a short self-test.
disk-health.sh reads the SMART data of each disk and prints the values that matter for spotting a failing drive.
Website entry: disk-health. Source: tools/pve/disk-health.sh.
Run
In the Proxmox VE host shell, as root:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/disk-health.sh)"The script exits with 1 if it is not run as root or if pveversion is missing.
What it installs
| Package | When | If the installation fails |
|---|---|---|
smartmontools | smartctl is missing | The script exits with 1. |
nvme-cli | nvme is missing | It continues with a notice. |
Report
Disks are taken from lsblk (type disk, without loop, zram and dm- devices). For each one the script prints path, size, model and:
| Disk type | Values |
|---|---|
| All | Overall result of smartctl -H: green for PASSED or OK, red otherwise, or "SMART not available for this device". |
| NVMe | These lines from smartctl -A: Temperature, Available Spare, Percentage Used, Data Units Written, Power On Hours, Unsafe Shutdowns, Media and Data Integrity Errors. |
| SATA/SAS | Temperature_Celsius, Power_On_Hours, Wear_Leveling_Count (or Media_Wearout_Indicator), and Reallocated_Sector_Ct, Current_Pending_Sector, Offline_Uncorrectable, UDMA_CRC_Error_Count. The last four are printed red when greater than 0. |
Prompts
| Dialog | Choices | Effect |
|---|---|---|
| "SMART Self-Test" | Yes / No | No ends the script. |
| "Select Disk for Short Self-Test" (radio list) | One disk | Runs smartctl -t short /dev/<disk>. The test runs in the background on the drive. |
Read the result later with:
smartctl -a /dev/sdaEnvironment variables
| Variable | Default | Purpose |
|---|---|---|
COMMUNITY_SCRIPTS_CORE_URL | https://raw.githubusercontent.com/community-scripts/core/main | Base URL for core/core.func and api/api.func. |
Limits
- The report is a snapshot on screen. Nothing is logged and no monitoring or alerting is set up.
- A disk for which
smartctl -Hreturns no health line is shown as "SMART not available for this device". - The printed number is the raw value of each attribute. Vendors encode some raw values differently, so compare with
smartctl -awhen a figure looks implausible. - The installed packages stay on the host.