Migration of LXC fails for shared storage but KVM works fine.

gsptcloud

New Member
May 17, 2020
2
0
1
28
Hello everyone, I'm running into an issue with container migration that I just wanted to get some clarification on. I currently have a two node cluster that I will be adding a third node to for HA. Both nodes have the following drive config:

OS: 120GB RAID 1
VM/LXC Image Storage: 500GB RAID 1
Controller: Perc H700

On node one I have an LVM directory named "node1_vm_store" and on node two "node2_vm_store". I can migrate a KVM machine between the two storage's no problem, but when I try to migrate a container between the two I get an error because the directories have different names. Both have the "shared" option checked.

I'm assuming to get local shared storage to work between both the nodes I simply need to rename the logical volumes to have the same names? Also, would having a third node with the same setup satisfy the storage requirements for an HA cluster?

Thanks in advance and sorry if this is a trivial/FA question.
 
there is no such thing as 'local shared' storage. a storage is either local (== has different contents on each node) or shared (== has identical content on each node, e.g. because it's an external storage like CIFS/NFS, or a distributed one like Ceph). if your storage is shared, you don't need to copy guest volumes during migration. if your storage is local, you need to copy it. for VMs moving from one local storage to another is implemented for live-migration, even if the storage has a different name or even type. for CTs, this is not the case.

if both of your LVM storages are structured in the same way (e.g., both have the same VG name), you can use a single storage definition/name and CT migration should work. but please don't set the 'shared' flag if your storage is not actually shared - it will not magically work, but cause problems all over ;)
 

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!