Hi, everyone,
I create a qcow2 image on a logical volume several mouths ago and attach this image to my Qemu vm. It looks well at the beginning, but recently there are some leaked clusters reported by `qemu-img check`. The easiest way to repair these leaked clusters is run `qemu-img check -r leaks /dev/vg/lv`.
In fact, I am curious about how `qemu-img check -r leaks` works, so I read the code about this. And according to the docs, it's better shutdown the vm before running this cmd. Nevertheless, It seems only an extra update_refcount function is enough to fix all leaked clusters, which is also involved during clusters alloc and free. Hence, I am wondering if it is possible to run `qemu-img check -r leaks` when the Qemu vm is running? Is there any risk?