LVM Thin Migration Issues

LK LAW

New Member
Nov 25, 2019
10
0
1
28
When I try to migrate a VM between Nodes I get the follow error: "ERROR: found stale volume copy 'local-lvm:vm-102-disk-0' on node 'maxiserver'"

I think that most likely the issue is that node 1 has a VG with name "pve" and node 2 has a VG with name "maxiserver-vg"

What is the easiest way to go about fixing this?
 
You should be able to select your target node's storage in the migrate dialog. It seems like your 'maxiserver-vg' already contains a volume called 'local-lvm:vm-102-disk-0', can you check that via 'maxserver-ng -> Content' in the GUI?
 
I don't get that option, just the target node (maxiserver).
There is an option under maxiserver "local-lvm", but right know the status is unknown. I can fix this by changing vgname in /etc/pve/storage.cfg from "pve" to "maxiserver-vg" but then the "local-lvm" in my other node, miniserver, gets the status unknown.

Furthermore if I try to create a VM on maxiserver I get the following issue: "TASK ERROR: unable to create VM 103 - no such volume group 'pve'"

Hope this clarifies things further.
 
Can you post vgs -a, lvs -a and the content of '/etc/pve/storage.cfg' from both nodes?
 
Miniserver:
Code:
root@miniserver:~# vgs -a
  VG  #PV #LV #SN Attr   VSize    VFree
  pve   1   6   0 wz--n- <465.26g 15.99g
root@miniserver:~# lvs -a
  LV              VG  Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data            pve twi-aotz-- 342.27g             5.83   0.76                           
  [data_tdata]    pve Twi-ao---- 342.27g                                                   
  [data_tmeta]    pve ewi-ao----  <3.50g                                                   
  [lvol0_pmspare] pve ewi-------  <3.50g                                                   
  root            pve -wi-ao----  96.00g                                                   
  swap            pve -wi-ao----   4.00g                                                   
  vm-100-disk-0   pve Vwi-aotz--   8.00g data        25.56                                 
  vm-101-disk-0   pve Vwi-aotz--  50.00g data        30.84                                 
  vm-102-disk-0   pve Vwi-a-tz--  50.00g data        4.98

Maxiserver:
Code:
root@maxiserver:~# vgs -a
  VG            #PV #LV #SN Attr   VSize    VFree 
  maxiserver-vg   1   3   0 wz--n- <465.02g <28.96g
root@maxiserver:~# lvs -a
  LV              VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data            maxiserver-vg twi-aotz-- 380.00g             0.00   10.42                           
  [data_tdata]    maxiserver-vg Twi-ao---- 380.00g                                                   
  [data_tmeta]    maxiserver-vg ewi-ao----  96.00m                                                   
  [lvol0_pmspare] maxiserver-vg ewi-------  96.00m                                                   
  root            maxiserver-vg -wi-ao----  48.13g                                                   
  swap_1          maxiserver-vg -wi-ao----   7.74g

/etc/pve/storage.cfg
Code:
dir: local
        path /var/lib/vz
        content iso,vztmpl,backup

lvmthin: local-lvm
        thinpool data
        vgname pve
        content rootdir,images
 
The issue is that your lvm volumes have different names on both servers. If you know your way around LVM (and are not afraid to fix bootloaders), the easiest way to fix your problem would be to rename 'maxiserver-vg' to 'pve' on maxiserver.

Alternatively, you can just treat them as different storages. Try changing your storage config to the following:

Code:
dir: local
        path /var/lib/vz
        content iso,vztmpl,backup

lvmthin: local-lvm
        thinpool data
        vgname pve
        content rootdir,images
        nodes miniserver

lvmthin: maxiserver-vg
        thinpool data
        vgname maxiserver-vg
        content rootdir,images
        nodes maxiserver

(Just FYI, you could also do all this via the GUI without editing config files, but since you've already posted all the info...)
 
  • Like
Reactions: LK LAW
I've learned a lot more about LVM in the past couple of days than I used to know :)
Do I lose any functionality by treating them as different storages?
 

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!