orphan disk search

This commit is contained in:
David Schroeder
2026-09-22 21:49:51 -05:00
parent 467c2f7300
commit 6c45cee540
4 changed files with 376 additions and 1 deletions
+23 -1
View File
@@ -2443,9 +2443,25 @@ MONITORING_MENU() {
done
}
TAPM_ORPHAN_DISK_REPORT() {
local result
if ! command -v python3 >/dev/null || ! command -v pvesh >/dev/null; then
printf 'Disk reporting requires python3 and pvesh on a Proxmox host.\n'
FINISH_FAILED_ACTION
return 1
fi
python3 /opt/idssys/ta-proxmenu/inc/orphan-disks.py "$@"
result=$?
if (( ACTION_REQUESTED == 1 )); then
exit "$result"
fi
ENTER2CONTINUE
return "$result"
}
CLUSTER_MENU() {
local -a labels
local -a values=("maintenance" "services" "keepalived" "iso_nfs")
local -a values=("maintenance" "services" "keepalived" "iso_nfs" "orphan_disks")
local maintenance_status
local node
@@ -2470,12 +2486,14 @@ CLUSTER_MENU() {
labels+=("Deploy/reconfigure Keepalived (installed locally)") ||
labels+=("Deploy Keepalived on all cluster hosts")
labels+=("Create shared ISO storage using an LXC NFS server")
labels+=("Find orphaned / unused disks (read-only)")
SELECT_MENU "Cluster & Maintenance" labels values
case "$MENU_SELECTION" in
maintenance) MAINTENANCE_MODE;;
services) SERVICE_RECOVERY_MENU;;
keepalived) INSTALL_KEEPALIVE;;
orphan_disks) TAPM_ORPHAN_DISK_REPORT --interactive;;
iso_nfs)
TAPM_DEPLOY_ISO_NFS_LXC
FINISH_ACTION
@@ -2763,6 +2781,10 @@ if (( ACTION_REQUESTED == 1 )); then
maintenance|mm) MAINTENANCE_MODE;;
keepalived) INSTALL_KEEPALIVE;;
iso-nfs|iso_nfs) TAPM_DEPLOY_ISO_NFS_LXC;;
orphan-disks|orphan_disks)
shift
TAPM_ORPHAN_DISK_REPORT "${@}"
;;
*) MAIN_MENU;;
esac
else