Clone - LVM VM

leonardo.kiyota

Active Member
Dec 18, 2019
3
0
41
Hello,

I have a Windows VM type LVM, I moved that one to a new storage.

After the process the Proxmox system puts the original LVM disk as a "Unused Disk 0".

I want to clone this "Unused Disk 0", is it possible to do that?

I tried to clone using dd command but the command show up a message error saying that the "vm-185-disk-0': No such file or directory"

I'm using this syntax.

dd if=/dev/Vol7k/vm-185-disk-0 of=/dev/Vol7k/vm-185-disk-2 bs=4M status=progress
 
Is your LVM volume group called Vol7k? Does the path exist, i.e., can you "ls -al" the disk?
Is the disk 2 an existing LVM slice? If not, your command is going to create a regular file in the special folder /dev

I recommend consulting the output of the following commands:
cat /etc/pve/storage.cfg
vgs
lvs
pvesm status


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
As you can see that LV is NOT available - as shown in the lvdsiplay output, also confirmed by the lack of the 'a' attribute (5th bit) in the lvs output. I imagine this is because PVE has unattached this disk as unused in the VM.

You probably could try activating it with the lvchange -a y Vol7k/vm-185-disk-0 command & then it should become available.

HOWEVER, I have ZERO experience with this & its implications! You are on your own!
 
  • Like
Reactions: bbgeek17 and UdoB
Yes, this is a shared LVM environment.
In shared LVM environment the LV is not activated when the VM is not running. When the VM is running the LV is activated only on the node where the VM is running.
You can manually activate the VM via native LVM commands. This will bypass PVE and may create a conflict. You could structure your VM such that it will start but won't boot, so LV is activated but is not used. It's a hack but may help.
Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
In shared LVM environment the LV is not activated when the VM is not running. When the VM is running the LV is activated only on the node where the VM is running.
Are my missing something here? AFAICT The specific LV vm-185-disk-0 is an unused disk that is not being actively used/attached to ANY VM on ANY node. So I don't see the shared LVM-environment relevancy.