export vm problem, disk not available when vm offline

Dale.Sykora

Member
May 13, 2020
19
2
23
55
I have a vm on a proxmox 7.4 cluster with disks under LVM, and I want to export as a qcow2.
I found the disk path with

root@n2:~# pvesm path vd2v1:vm-118-disk-0
/dev/msa2040-vd2v1/vm-118-disk-0

However, the path in unavailable when the VM is turned off (details below).

How do I make the disk paths "available" so I can use qemu-img to export with command below?

qemu-img convert -O qcow2 -f raw /dev/msa2040-vd2v1/vm-118-disk-0 /mnt/pve/backup2/images/clone-vm118-disk0.qcow2

I could try lvchange -a to activate the LV, but not sure if that will break anything on a production cluster... Please advise?

here is what lvs shows when vm is off

root@n2:~# lvs | grep 118
vm-118-disk-0 msa2040-vd2v1 -wi------- 100.00g
vm-118-disk-1 msa2040-vd2v1 -wi------- 300.00g

lvdisplay show status NOT available

--- Logical volume ---
LV Path /dev/msa2040-vd2v1/vm-118-disk-0
LV Name vm-118-disk-0
VG Name msa2040-vd2v1
LV UUID BetbQZ-Em5g-eZKy-OdUR-bT9Z-XKC3-3MjCj6
LV Write Access read/write
LV Creation host, time p1, 2020-09-22 09:38:13 -0500
LV Status NOT available
LV Size 100.00 GiB
Current LE 25600
Segments 1
Allocation inherit
Read ahead sectors auto

--- Logical volume ---
LV Path /dev/msa2040-vd2v1/vm-118-disk-1
LV Name vm-118-disk-1
VG Name msa2040-vd2v1
LV UUID 7h4ZyT-jvrq-SBEN-rEhF-a9LW-jHsk-gjuwMP
LV Write Access read/write
LV Creation host, time p1, 2020-09-22 09:41:47 -0500
LV Status NOT available
LV Size 300.00 GiB
Current LE 76800
Segments 1
Allocation inherit
Read ahead sectors auto
 
I could try lvchange -a to activate the LV, but not sure if that will break anything on a production cluster... Please advise?
You should be ok activating the LV manually, as long as you are sure that no one is using it.
You can also use "qm disk move" command. With appropriate arguments it should convert your raw disk to qcow on target storage.

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

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!