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:
@@ -4188,13 +4188,16 @@ def get_system_disks():
|
||||
pass
|
||||
|
||||
try:
|
||||
# 4. Check LVM physical volumes. `--devices` (added when a disk
|
||||
# is parked) keeps pvs from scanning — and waking — standby HDDs.
|
||||
# 4. Check LVM physical volumes. `--devices` keeps pvs off the disks
|
||||
# that are excluded, idle or asleep.
|
||||
dev_args = _lvm_device_args()
|
||||
result = subprocess.run(
|
||||
['pvs', *dev_args, '--noheadings', '-o', 'pv_name,vg_name'],
|
||||
capture_output=True, text=True, timeout=5
|
||||
) if dev_args is not None else None
|
||||
if result is not None:
|
||||
from lvm_device_scope import settle_scan_reads
|
||||
settle_scan_reads()
|
||||
if result is not None and result.returncode == 0:
|
||||
for line in result.stdout.strip().split('\n'):
|
||||
if line.strip():
|
||||
|
||||
Reference in New Issue
Block a user