mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-29 21:45:59 +00:00
fix(clean-orphaned-lvm): check all cluster nodes for VM/CT configs (#13837)
This commit is contained in:
committed by
GitHub
parent
18cd4d401c
commit
458402ea41
@@ -37,8 +37,9 @@ function find_orphaned_lvm {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
container_id=$(echo "$lv" | grep -oE "[0-9]+" | head -1)
|
container_id=$(echo "$lv" | grep -oE "[0-9]+" | head -1)
|
||||||
# Check if the ID exists as a VM or LXC container
|
# Check if the ID exists as a VM or LXC container on any cluster node
|
||||||
if [ -f "/etc/pve/lxc/${container_id}.conf" ] || [ -f "/etc/pve/qemu-server/${container_id}.conf" ]; then
|
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
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user