mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-01 10:22:08 +00:00
Name only physical volumes in a restricted LVM scan and keep its own reads from counting as activity
- An explicit --devices list makes LVM open every device in it, while a plain scan opens only known volumes; the list now names only LVM physical volumes, read from udev by lsblk, so no other disk is touched - RAID, multipath and encrypted volumes follow the disks they are built on, instead of turning the whole check off - After each pvs, lvs or vgs run, the disks it read take their counters as the new baseline, so an unused disk can become idle
This commit is contained in:
@@ -2286,6 +2286,8 @@ class HealthMonitor:
|
||||
text=True,
|
||||
timeout=3
|
||||
)
|
||||
from lvm_device_scope import settle_scan_reads
|
||||
settle_scan_reads()
|
||||
|
||||
if result.returncode != 0:
|
||||
return {'status': 'WARNING', 'reason': 'lvs command failed'}
|
||||
@@ -2310,6 +2312,7 @@ class HealthMonitor:
|
||||
text=True,
|
||||
timeout=3
|
||||
)
|
||||
settle_scan_reads()
|
||||
if vg_result.returncode == 0 and vg_result.stdout.strip():
|
||||
return {'status': 'WARNING', 'reason': 'No active LVM volumes detected'}
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user