activating or deactivating volume groups?

m.ardito

Active Member
Feb 17, 2010
1,473
16
38
Torino, Italy
hi,

i've read here
http://docs.redhat.com/docs/en-US/R...uster_Logical_Volume_Manager/VG_activate.html

about activating or deactivating volume groups, and it says <<When you create a volume group it is, by default, activated. This means that the logical volumes in that group are accessible and subject to change. There are various circumstances for which you you need to make a volume group inactive and thus unknown to the kernel.>>

i thought that activated or deactivated had something to do with the vm being on or off, but i was digging in my lvs with lvdisplay and found, for two "off" vm, 206 and 209:

how should they be and why?

lvdisplay /dev/pve_vm_disks/vm-206-disk-1
--- Logical volume ---
LV Path /dev/pve_vm_disks/vm-206-disk-1
LV Name vm-206-disk-1
VG Name pve_vm_disks
LV UUID H7Klcj-AoM3-dAEB-xImj-AP1x-Ijp1-P2HTXy
LV Write Access read/write
LV Creation host, time ,
LV Status available
# open 0
LV Size 5.01 GiB
Current LE 1283
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:34

root@pve2:~# lvdisplay /dev/pve_vm_disks/vm-209-disk-1
--- Logical volume ---
LV Path /dev/pve_vm_disks/vm-209-disk-1
LV Name vm-209-disk-1
VG Name pve_vm_disks
LV UUID ugnIe3-MqL9-Xgdb-JP4o-9JSU-c0T0-zEwFfS
LV Write Access read/write
LV Creation host, time ,
LV Status NOT available
LV Size 42.01 GiB
Current LE 10754
Segments 2
Allocation inherit
Read ahead sectors auto

Thanks, Marco
 
Last edited:
Hi Marco,
VGs are normaly active on all hosts which belongs to this storage.
LVs are active for the running VMs - eg. the LVs of VM100 is active on the node which VM 100 is running and not active on the other nodes (in a cluster with shared storage).

Udo
 
thanks, udo
i still don't understand why i have thos two lv one "available" and the other "not available", and both are disks of (two different) stopped vm...

i'm asking this because yesterday i tested on a vm copy 209, one of those stopped, the lv resizing (expanded), then looked at the lv and it said "not available", i googled a bit and found something (probably this http://serverfault.com/questions/170578/lv-status-not-available-how-to-make-it-available) and executed the suggested
vgchange -a y

now i'm not sure my lv and vg are "safe" or what is their expected status, so to check. and learn.

Marco
 
thanks, udo
i still don't understand why i have thos two lv one "available" and the other "not available", and both are disks of (two different) stopped vm...

i'm asking this because yesterday i tested on a vm copy 209, one of those stopped, the lv resizing (expanded), then looked at the lv and it said "not available", i googled a bit and found something (probably this http://serverfault.com/questions/170578/lv-status-not-available-how-to-make-it-available) and executed the suggested
vgchange -a y

now i'm not sure my lv and vg are "safe" or what is their expected status, so to check. and learn.

Marco
Hi,
you can also activate or deactivate single LVs with "lvchange -a y LVNAME" or "-a n".
About one available and one not: do you have an cluster and the not available vm runs before on the other node - and is available there?

Udo
 
Hi, you can also activate or deactivate single LVs with "lvchange -a y LVNAME" or "-a n".
About one available and one not: do you have an cluster and the not available vm runs before on the other node - and is available there?
Udo

these two vm are on a single pve node (i'm waiting to backup restore more vm from the old 1.x pve, and then it will become th esecond 2.1 node, and then i will build the cluster, which i had in 1.x before)

i don't know if it is that important, but it seems "unknown matter" to me (as still many other pve tech stuff), and wish to know if i have something wrong here.

Marco
btw, udo, your help is always good, and appreciated. thanks :)
 

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!