Impossible to resize a KVM LVM based filesystem

Hello,

We're playing around with some KVM Virtual Machines to test cloning, moving, etc.. before trying on production VMs.

We created an image to rapidily generate test VM's.

When trying to resize one of those test VM's filesystem from 2GB to 4 GB, we've got this message :

".. update failed : lvextend -L4194304k \/dev\/VolGroup00\/test555_company_net_img failed : Snapshot origin volumes can be resized only while inactive: try lvchange -an"

So we did lvchange -an /dev/VolGroup00/test555_company_net_img, but then, we've got this other message, not reassuring att all :

"Warning - this disk cannot be safely resized. Cloudmin does not know what type of filesystem this disk contains, and so cannot properly resize it. This is most likely because the disk is not mounted on the virtual system."

So we did lvchange -ay and rebooted to check the VM. It was alright...

Another VM wich was created from the same image, and moved on another KVM host was able to be resized without any error.

Any clue ?

Status: 
Closed (fixed)

Comments

This could be an issue with the LV being a snapshot source or dest.

Was this VM a clone, or has a clone been created from it?

Yes, a clone was created from this VM. The clone was then moved on another KVM host and resized successfully.

It seems like the LV for the clone might still exist. If you login to the host system and run :

lvdisplay

can you still see the clone's logical volume?

Yes, it's still there.

Removed the snapshot and it solved the problem.

So, for the future, of we clone a VM, it will always be imposible to resize the original VM while the clone is still there ?

Normally Cloudmin will remove that snapshot for you when an VM is moved to a new host, assuming that they don't share a common storage pool.

If you create a new test clone and then move it, does the same thing happen?

I'll try and keep you in touch.

Cheers.

Ok, let me know what happens ..

Hello, Yes the same happens.

In fact, when we clone a Live VM, the clone has a snapshot as Filesystem. When we move it to another host, then it gets a "real" LVM volume. The original snapshot on the first host is never deleted. We have to remove it manually.

It's not a really big issue, but so you know.

Ok, I see the cause of this now .. Cloudmin isn't cleaning up the /dev/mapper entries for the disk image after it is moved and before it is deleted, which causes the LV deletion to fail. I will fix this in the next Cloudmin release (5.2).

Automatically closed -- issue fixed for 2 weeks with no activity.