create failed - lvcreate 'tmpmvms/pve-vm-101' error: Failed to activate new LV.

telemagic

New Member
Jan 20, 2013
18
2
1
Hi Guys

Ok I seem to be having a weird one here.

I have created, deleted and recreated VM's with no issues using ide and sata discs ovr last few days trying to get some adsl bonding software working optimally. This was all fine.

A couple of days ago I installed one using virtio as the hard drive type, however I found that the system didnt like the Virtio network card I had set so I deleted and went to re-install.

For some reason now I cannot re-use the vmid I used as i it fails to create the vm with the follofing error.
create failed - lvcreate 'tmpmvms/pve-vm-101' error: Failed to activate new LV.

I can use a new vmid and creates and works fine but usign the same vmid as one that has had a virtio harddrive give the error.

Anyone got any ideas why this would be.

I have done a lvscan and the lv for the old vm is not showing as existing so im stuck to what the issue is.

Regards
 
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
data pve -wi-a--- 33.84g
root pve -wi-ao-- 17.00g
swap pve -wi-ao-- 8.50g
vm-100-disk-1 tmpmvms -wi-ao-- 160.00g
vm-103-disk-1 tmpmvms -wi-a--- 100.00g
vm-106-disk-1 tmpmvms -wi-ao-- 20.00g
vm-108-disk-1 tmpmvms -wi-a--- 100.00g
vm-109-disk-1 tmpmvms -wi-a--- 20.00g
vm-111-disk-1 tmpmvms -wi-ao-- 5.00g

The vm-101 and 102 which is the vmid's im having issues do not show.

Regards
 
For some reason now I cannot re-use the vmid I used as i it fails to create the vm with the follofing error.
create failed - lvcreate 'tmpmvms/pve-vm-101' error: Failed to activate new LV.

AFAIK our code dos not use such naming: "tmpmvms/pve-vm-101"
(we use tmpmvms/vm-101-disk-XXX)
So how do you create the VM?
 
I am creating the VM in the usual way using the Create VM button.

Ok this is really strange.

If I create the vm on node1 which is where I had the vm with same id originally that had the virtio disk I get the error
device-mapper: create ioctl on tmpmvms-vm--101--disk--1 failed: Device or resource busy
TASK ERROR: create failed - lvcreate 'tmpmvms/pve-vm-101' error: Failed to activate new LV.

If I create a vm on same node with a different vmid it creates fine
Logical volume "vm-112-disk-1" created
TASK OK

If I create the VM with the original ID 101 on any of the other nodes in the cluster they create fine.
Logical volume "vm-101-disk-1" created
TASK OK

So there is obviously some bug on the original node which is trying to create the vm wrong.

Regards
 
Ok still a little weird. I just tried to remove another vm which had used virtio disk and recreate as ide and had same issue.
Reboot worked.

I now have 3 vm's now when I first reboot each node in tern and do a lvscan on each it shows all volumes as being active.

Now when I migrate a vm from one machine to another the one it has left shows the lv of the vm as inactive. but I can still migrate back without issues.

One question. In normal operation with a shared FC san with 4 nodes and lvm2 should all lv be active on all nodes or only the lv that are in use by a vm on that node be active?

Regards
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!