Hello,
I am running a 5-node HA ceph cluster. I like to occasionally look for old snapshots that are no longer needed so I can remove them. I have been trying to figure out a good way to scan the entire cluster for snapshots but have not had good results so far. Currently I run this command on each node:
It's not pretty, but it works in showing the VM ID, name, and all snapshots that each VM may have.
Does anyone have a suggestion on how I can get all the snapshots from the cluster without having to run this on each node?
Thank you!
I am running a 5-node HA ceph cluster. I like to occasionally look for old snapshots that are no longer needed so I can remove them. I have been trying to figure out a good way to scan the entire cluster for snapshots but have not had good results so far. Currently I run this command on each node:
Code:
for x in $(qm list | tail +2 | awk '{print $1}'); do echo -n $x; qm status $x -verbose| grep name | cut -d':' -f2; qm listsnapshot $x | grep -v current; done
It's not pretty, but it works in showing the VM ID, name, and all snapshots that each VM may have.
Does anyone have a suggestion on how I can get all the snapshots from the cluster without having to run this on each node?
Thank you!