LVM weirdness

Tim-AtSharp

New Member
Apr 14, 2011
2
0
1
Hi All,

I just experienced a weird problem today that I was able to fix, but I'm making this post for
a) anybody's else's reference
b) looking for an explanation

This is my layout:
Proxmox 1.9, with a couple of VM's on it.
The volume that stores my KVM disks, is on a raid controller, managed with LVM. The VG name is 'data'
I have a KVM, which has a volume, also managed with LVM, and which was also names 'data'.
I noticed this problem: the storage of the ProxMox host (shown in the webinterface) was wrong. It said 500 GB, and not the 1700GB it should be. That made me dig into the LVM configuration and I started to see warnings about 'duplicate volume group name'... 'data'. It took me a while to figure out that volume names were the same, and that the 500 GB shown in the webinterface was actually the volume of the KVM machine.

I resolved the warning like this:
- unmount the volume in the VM
- I found these instructions (http://www.linuxquestions.org/questions/linux-general-1/how-to-rename-a-vol-group-433993/): `lvchange -an` (disable to vg) the logical volumes first, then `vgrename`, then `lvchange -ay` again (to activate it).
- problem solved!

note that, when a VG is mounted automatically (/etc/fstab) that the location of the VG must be changed as well.

I hope that this might help anyone...

But My question: Why does proxmox recognise the vg of a vm in it's own LVM system?

proxmox02:~# lvscan
ACTIVE '/dev/data/vm-101-disk-1' [1.00 GB] inherit
ACTIVE '/dev/data/vm-107-disk-1' [32.00 GB] inherit
ACTIVE '/dev/data/vm-107-disk-3' [500.00 GB] inherit
ACTIVE '/dev/data/vm-106-disk-1' [320.00 GB] inherit
ACTIVE '/dev/data/vm-103-disk-1' [200.00 GB] inherit
ACTIVE '/dev/data/vm-104-disk-1' [320.00 GB] inherit
inactive '/dev/databits/store' [480.00 GB] inherit
ACTIVE '/dev/pve/swap' [7.00 GB] inherit
ACTIVE '/dev/pve/root' [25.00 GB] inherit
ACTIVE '/dev/pve/data' [63.50 GB] inherit

this is the new situation. To be clear: /dev/databits is the one that belongs to the VM! (which is actually onto '/dev/data/vm-107-disk-3' [500.00 GB])

anything to worry about...?
 

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!