Submitted by mcordas on Mon, 12/05/2011 - 05:31 Pro Licensee
Today, I shut down a KVM instance. After confirmation it was down, i wanted to resize it's volume. So :
- I went in "Ressources" / "Manage disks".
- Choose the instance's Volume.
- Entered the new size (4Gb, was 2Gb).
- Slicked "save".
Then I got this message : "Updating virtual disk on /dev/VolGroup00/xxxx_yyyyyyyyy_net_img .." .. update failed : parted -s \/dev\/VolGroup00\/xxxx_yyyyyyyyy_net_img rm 1 failed : Error: Partition /dev/mapper/VolGroup00-txxxx_yyyyyyyyy_net_imgp1 is being used. You must unmount it before you modify it with Parted."
Checked on the host : - The volume is NOT mounted. - There is NO qemu-kvm process still running.
Problem : Cloudmin now shows "4 GB" as the Volume's size, even thoug it was NOT resized.
Questions : - How can I fix that quickly ? - Can I safely boot the KVM instance ?
Thanks a lot.
Status:
Closed (fixed)
Comments
Submitted by JamieCameron on Mon, 12/05/2011 - 14:54 Comment #1
Sounds like something was accessing the partition on the host system - to find out what, you could use a command like :
fuser /dev/VolGroup00/xxxx_yyyyyyyyy_net_img
or :
fuser /dev/mapper/VolGroup00-txxxx_yyyyyyyyy_net_imgp1
and then kill that process. Or reboot the host system.
Once this is fixed, you can fix the inconsistency in the partition size by expanding it again to something like 4.1 GB.
Submitted by mcordas on Mon, 12/05/2011 - 15:12 Pro Licensee Comment #2
Unfortunately, the fuser command gives no output. Already tried it.
I sure could reboot the system, but i'd like to avoid that...
Any other idea ?
Submitted by JamieCameron on Mon, 12/05/2011 - 15:26 Comment #3
fuser is the only way I know of to find the user of a partition, sorry..
The only other option I can suggest (other than rebooting) is looking for any unusual kvm, qemu, fdisk or parted processes on the host system that might be using the partition, and killing them.
Submitted by mcordas on Mon, 12/05/2011 - 15:53 Pro Licensee Comment #4
ps aux give nothing about kvm, qemu, fdisk or parted... Strange...
Strange also that from the host (a cloudmin replica), I can open the volume with parted or fdisk...
Couldn't Cloudmin be "wrong" about the Volume being used by another process ?
Submitted by JamieCameron on Mon, 12/05/2011 - 15:59 Comment #5
That error is actually coming from the
parted
command, when it attempts to delete the partition ... not Cloudmin. The disk expansion is done by deleting the partition, and then re-creating it with the same start position but a larger end position.Submitted by mcordas on Mon, 12/05/2011 - 16:09 Pro Licensee Comment #6
OK. I guess there's no other choice than rebooting the host. I'll do that tomorrow and keep you in touch.
Thanks.
Submitted by mcordas on Tue, 12/06/2011 - 15:35 Pro Licensee Comment #7
Rebooting the host indeed did the trick.
But I remain puzzled by that problem. It's not always possible to "just" reboot a KVM host.
If it happens again, I'll keep you in touch.
Thanks anyway.
Submitted by JamieCameron on Tue, 12/06/2011 - 15:46 Comment #8
Yeah. a reboot certainly isn't ideal.
I'm pretty sure fuser can be used to find the process using the partition, but working out which device corresponds to it is tricky.
Submitted by Issues on Tue, 12/20/2011 - 15:51 Comment #9
Automatically closed -- issue fixed for 2 weeks with no activity.