[SOLVED] Can I migrate between 2 lvms?

Ivan Gersi

Renowned Member
May 29, 2016
83
7
73
54
I have 2 nodes cluster.
/etc/pve/storage.cfg 387/387 100%
dir: local
path /var/lib/vz
content vztmpl,backup,snippets,iso,images,rootdir
maxfiles 3
shared 1

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


lvmthin: del-hdd
thinpool del_hdd
vgname vmdata
content images,rootdir

You can see 2 lvms in pve3, pve2 has only local (lvm-thick). Can I migrate machine from pve3 to pve2?
I tried it but:
2019-10-21 19:29:07 starting migration of VM 110 to node 'pve2' (10.0.0.71)
2019-10-21 19:29:07 found local disk 'del-hdd:vm-110-disk-0' (in current VM config)
2019-10-21 19:29:07 copying disk images
Volume group "vmdata" not found
Ok I Tried rename lvm in pve2 to vmdata and then...
2019-10-21 19:36:41 starting migration of VM 110 to node 'pve2' (10.0.0.71)
2019-10-21 19:36:41 found local disk 'del-hdd:vm-110-disk-0' (in current VM config)
2019-10-21 19:36:41 copying disk images
lvcreate 'vmdata/vm-110-disk-0' error: Pool del_hdd not found in Volume group vmdata.

Is there any chance to migrate vm between nodes and lvm thin vs lvm?
root@pve2:/etc/pve# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 256M 0 part
└─sda3 8:3 0 1.8T 0 part
├─pve-swap 253:0 0 8G 0 lvm [SWAP]
├─pve-root 253:1 0 96G 0 lvm /
└─pve-data 253:2 0 1.7T 0 lvm /var/lib/vz
sr0 11:0 1 1024M 0 rom
and
root@pve3:/etc/pve# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 446.6G 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part
└─sda3 8:3 0 446.1G 0 part
├─pve-swap 253:8 0 8G 0 lvm [SWAP]
├─pve-root 253:9 0 96G 0 lvm /
├─pve-data_tmeta 253:10 0 3.3G 0 lvm
│ └─pve-data-tpool 253:12 0 319.6G 0 lvm
│ ├─pve-data 253:13 0 319.6G 0 lvm
│ ├─pve-vm--100--disk--0 253:16 0 100G 0 lvm
│ └─pve-vm--100--disk--1 253:17 0 70G 0 lvm
└─pve-data_tdata 253:11 0 319.6G 0 lvm
└─pve-data-tpool 253:12 0 319.6G 0 lvm
├─pve-data 253:13 0 319.6G 0 lvm
├─pve-vm--100--disk--0 253:16 0 100G 0 lvm
└─pve-vm--100--disk--1 253:17 0 70G 0 lvm
sdb 8:16 0 3.7T 0 disk
└─sdb1 8:17 0 3.7T 0 part
├─vmdata-lvol0 253:0 0 120M 0 lvm
├─vmdata-del_hdd_tmeta 253:1 0 116M 0 lvm
│ └─vmdata-del_hdd-tpool 253:3 0 3.6T 0 lvm
│ ├─vmdata-del_hdd 253:4 0 3.6T 0 lvm
│ ├─vmdata-vm--110--disk--0 253:5 0 200G 0 lvm
│ ├─vmdata-vm--106--disk--0 253:6 0 200G 0 lvm
│ ├─vmdata-vm--105--disk--0 253:7 0 200G 0 lvm
│ ├─vmdata-vm--101--disk--0 253:14 0 100G 0 lvm
│ ├─vmdata-vm--101--disk--1 253:15 0 70G 0 lvm
│ └─vmdata-vm--104--disk--0 253:18 0 133G 0 lvm
└─vmdata-del_hdd_tdata 253:2 0 3.6T 0 lvm
└─vmdata-del_hdd-tpool 253:3 0 3.6T 0 lvm
├─vmdata-del_hdd 253:4 0 3.6T 0 lvm
├─vmdata-vm--110--disk--0 253:5 0 200G 0 lvm
├─vmdata-vm--106--disk--0 253:6 0 200G 0 lvm
├─vmdata-vm--105--disk--0 253:7 0 200G 0 lvm
├─vmdata-vm--101--disk--0 253:14 0 100G 0 lvm
├─vmdata-vm--101--disk--1 253:15 0 70G 0 lvm
└─vmdata-vm--104--disk--0 253:18 0 133G 0 lvm
 
I was succesfull again;o).
VM must running and then I can be able migrate.
qm migrate 110 pve2 --force 1 --online 1 --with-local-disks 1 --targetstorage local
Force is not neccesary
 

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!