From 458402ea41a621bdaa29cdf6f3e8de5dad7daa84 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Sat, 18 Apr 2026 22:54:24 +0200 Subject: [PATCH] fix(clean-orphaned-lvm): check all cluster nodes for VM/CT configs (#13837) --- tools/pve/clean-orphaned-lvm.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/pve/clean-orphaned-lvm.sh b/tools/pve/clean-orphaned-lvm.sh index 319497cd7..8d1df7a12 100644 --- a/tools/pve/clean-orphaned-lvm.sh +++ b/tools/pve/clean-orphaned-lvm.sh @@ -37,8 +37,9 @@ function find_orphaned_lvm { fi container_id=$(echo "$lv" | grep -oE "[0-9]+" | head -1) - # Check if the ID exists as a VM or LXC container - if [ -f "/etc/pve/lxc/${container_id}.conf" ] || [ -f "/etc/pve/qemu-server/${container_id}.conf" ]; then + # Check if the ID exists as a VM or LXC container on any cluster node + if compgen -G "/etc/pve/nodes/*/lxc/${container_id}.conf" >/dev/null 2>&1 || + compgen -G "/etc/pve/nodes/*/qemu-server/${container_id}.conf" >/dev/null 2>&1; then continue fi