Finding and deleting zombie disks in a Proxmox cluster
Find a file
2023-03-31 15:42:31 +03:00
LICENSE Initial commit 2022-04-16 17:42:32 +03:00
README.md Update README.md 2023-03-31 15:42:31 +03:00

Proxmox-zombie-disk-detector (CEPH storage only)

These commands will help you find disks that are not connected to any VM. You need to run it on the Proxmox node. Replace POOL_NAME with the name of your pool

for i in $(rbd ls POOL_NAME); do if ! grep -r "$i" /etc/pve/nodes/ > /dev/null; then echo POOL_NAME/$i; fi; done;

Be careful. Don't trust the script output 100%. Check every disk!!!

Example:
zombie-disk

There are no such VMs:
vm-list

Then run the command:
rbd rm YOUR_POOL_NAME/DISK_NAME

If the disk is protected from deletion, check the snapshots: rbd snap ls YOUR_POOL_NAME/DISK_NAME

We need to remove the protection. In my case, the command looks like this:
rbd snap unprotect HDD/vm-102-disk-2@barcdaily191217100934