px axf | grep coalesce
If nothing, rescan SR and repeat the ps
If still said lock active, remove the lock:
rm /var/lock/sm/<SR_UUID>/gc_active
Rescan and wait up to 10 min, while tailing SMlog
Scan all VDI on SR:
vhd-util scan -f -c -p -m /var/run/sr-mount/<SR_UUID>/*.vhd
If no error, check error from SMlog on coalesce, like these (coalesce EXCEPTIONS).
Jan 28 15:56:11 xen01 SMGC: [23350] ***********************
Jan 28 15:56:11 xen01 SMGC: [23350] * E X C E P T I O N *
Jan 28 15:56:11 xen01 SMGC: [23350] ***********************
Jan 28 15:56:11 xen01 SMGC: [23350] coalesce: EXCEPTION <class 'util.SMException'>, VHD *811e7004(80.000G/2.155G) corrupted
Jan 28 15:56:11 xen01 SMGC: [23350] File "/opt/xensource/sm/cleanup.py", line 1542, in coalesce
Jan 28 15:56:11 xen01 SMGC: [23350] self._coalesce(vdi)
Find the UUID incriminated (here 811e7004…), and test it:
vhd-util check --debug -n /var/run/sr-mount/<SR_UUID>/<VDI_UUID>.vhd
Eg:
primary footer invalid: invalid cookie
Repair it:
vhd-util repair -n /var/run/sr-mount/<SR_UUID>/<VDI_UUID>.vhd
Recheck it, should be OK now.
Remove the lock, and wait a bit, coalesce should start