explore physical vs LVM

Moxxorp

Member
Feb 1, 2019
18
2
8
55
I want to create a VM in a VG using existing disk images which are currently stored on a physical drive.
The qcow2 images on the physical drive are not in use by any VM, never attached to anything but they show in proxmox.

I can create a VM in a physical directory and move an image to it's folder and attach it.
But when I create a VM in LVM, don't know how to move an image to it's folder and attach it.

I mounted the physical drive via fstab, how do I mount the VG?
Is it possible to view the VG contents in the same way? As folders and image files?

The web gui has no provision to move images that I could find. I could boot the server with another OS to get the job done... but can Proxmox do this somehow already?

I have a feeling I'm overlooking something obvious....
 
Is it possible to view the VG contents in the same way? As folders and image files?

A volume group does not have folders and image files, it only has volumes, which are block based and can be used as disks for VMs. They are 'raw' so, there is nothing to see besides the raw contents of the virtual disk.

I mounted the physical drive via fstab, how do I mount the VG?

If you can mount a physical drive, there is no VG involves, because a VG cannot be mounted via /etc/fstab, you can only mount filesystems that are stored inside of volumes, that are itself part of a volume group.

Maybe post the output (in CODE tags) of lsblk, so we can have more information about the physical layout of the disks.
 
A volume group does not have folders and image files, it only has volumes, which are block based and can be used as disks for VMs. They are 'raw' so, there is nothing to see besides the raw contents of the virtual disk.



If you can mount a physical drive, there is no VG involves, because a VG cannot be mounted via /etc/fstab, you can only mount filesystems that are stored inside of volumes, that are itself part of a volume group.

Maybe post the output (in CODE tags) of lsblk, so we can have more information about the physical layout of the disks.

I was using flexible terminology, referring to my non-LVM drive as physical. It is sdbx mounted via fstab and as directory in Proxmox.
Another (physical drive) stores the LVM.

I think LVM just doesn't do it.
lvmfauxmv /VG0/LV0 /dev/VG1/
lvmfauxcp /dev/VG0/ /dev/VG1/

ls -l /dev/VG0/LV0/etc/notgonnahappen
It doesn't work this way but from what I read in posts all over the nets it's been a frustration for many.

The limitation is in LVM, not Proxmox/
Proxmox allows getting around this issue with backup/restore.

In PM backup VG0/LV0/VM-001, then restore to VG1/VM-001.
 
I think LVM just doesn't do it.
lvmfauxmv /VG0/LV0 /dev/VG1/
lvmfauxcp /dev/VG0/ /dev/VG1/

ls -l /dev/VG0/LV0/etc/notgonnahappen
It doesn't work this way but from what I read in posts all over the nets it's been a frustration for many.

Sorry, I really don't get what you want to do with the pseudo commands and where the problems with LVM lie.

As I already wanted to explain:
LVM is a block level technology that deals with blocks, so that you cannot copy block devices to files. If you want to "extract" a VM from LVM, you have to use dd.

For beginners, I suggest to just run with a file based virtual machines and convert the default LVM to a file like it is described here:

https://pve.proxmox.com/wiki/Logica...r_tt_span_class_monospaced_var_lib_vz_span_tt
 

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!