Hello,
I'm still coping with my qemu image corruption, and I'm following some
Redhat guidelines that explains the way to go :
- Start the VM
- Identify the host
- On this host, run the ps command to identify the disk image location :
# ps ax|grep qemu-kvm|grep vm_name
- Look for "-drive
file=/rhev/data-center/00000001-0001-0001-0001-00000000033e/b72773dc-c99c-472a-9548-503c122baa0b/images/91bfb2b4-5194-4ab3-90c8-3c172959f712/e7174214-3c2b-4353-98fd-2e504de72c75"
(YMMV)
- Resolve this symbolic link
# ls -la
/rhev/data-center/00000001-0001-0001-0001-00000000033e/b72773dc-c99c-472a-9548-503c122baa0b/images/91bfb2b4-5194-4ab3-90c8-3c172959f712/e7174214-3c2b-4353-98fd-2e504de72c75
lrwxrwxrwx 1 vdsm kvm 78 3 oct. 2016
/rhev/data-center/00000001-0001-0001-0001-00000000033e/b72773dc-c99c-472a-9548-503c122baa0b/images/91bfb2b4-5194-4ab3-90c8-3c172959f712/e7174214-3c2b-4353-98fd-2e504de72c75
->
/dev/b72773dc-c99c-472a-9548-503c122baa0b/e7174214-3c2b-4353-98fd-2e504de72c75
- Shutdown the VM
- On the SPM, activate the logical volume :
# lvchange -ay
/dev/b72773dc-c99c-472a-9548-503c122baa0b/e7174214-3c2b-4353-98fd-2e504de72c75
- Verify the state of the qemu image :
# qemu-img check
/dev/b72773dc-c99c-472a-9548-503c122baa0b/e7174214-3c2b-4353-98fd-2e504de72c75
- If needed, attempt a repair :
# qemu-img check -r all /dev/...
- In any case, deactivate the LV :
# lvchange -an /dev/...
I followed this steps tens of times, and finding the LV and activating
it was obvious and successful.
Since yesterday, I'm finding some VMs one which these steps are not
working : I can identify the symbolic link, but the SPM neither the host
are able to find the LV device, thus can not LV-activate it :
# lvchange -ay
/dev/de2fdaa0-6e09-4dd2-beeb-1812318eb893/ce13d349-151e-4631-b600-c42b82106a8d
Failed to find logical volume
"de2fdaa0-6e09-4dd2-beeb-1812318eb893/ce13d349-151e-4631-b600-c42b82106a8d"
Either I need two more coffees, either I may be missing a step or
something to check.
Looking at the SPM /dev/disk/* structure, it looks like very sound (I
can see my three storage domains dm-name-* series of links).
As the VM can nicely be ran and stopped, does the host activates
something more before being launched?
--
Nicolas ECARNOT