[SOLVED] new VG not showing in storage.cfg

revmarkp

New Member
Jan 5, 2020
8
0
1
56
Chelsmford, Essex, UK
I have two nodes in a datacentre: pve-pb1 and pve-pb2. The gui shows both nodes viewed from either IP, but I can't figure why the VGs and ThinPools of pve-pb2 don't show in storage.cfg:

view from my node pve-pb2:

Code:
root@pve-pb2:/dev/pve# cat /etc/pve/storage.cfg
dir: local
    path /var/lib/vz
    content iso,vztmpl,backup

lvmthin: local-lvm
    thinpool data
    vgname pve
    content rootdir,images

lvmthin: storage
    thinpool storage
    vgname storage
    content rootdir,images
    nodes pve-pb1

nfs: nfs-ext
    export /mnt/nfs_shared_folder
    path /mnt/pve/nfs-ext
    server 10.10.1.33
    content backup,images,vztmpl,rootdir,iso
    maxfiles 2

root@pve-pb2:/dev/pve# lvs -a
  LV                    VG         Attr       LSize    Pool          Origin Data%  Meta%  Move Log Cpy%Sync Convert
  [lvol0_pmspare]       pb2-raid10 ewi-------  100.00m                                                             
  raid10-thin-1         pb2-raid10 twi-aotz--  100.00g                      0.00   10.43                           
  [raid10-thin-1_tdata] pb2-raid10 Twi-ao----  100.00g                                                             
  [raid10-thin-1_tmeta] pb2-raid10 ewi-ao----  100.00m                                                             
  vm-raid10-pb2-1       pb2-raid10 Vwi-a-tz--   10.00g raid10-thin-1        0.00                                   
  data                  pve        twi-aotz-- <181.18g                      49.26  3.22                           
  [data_tdata]          pve        Twi-ao---- <181.18g                                                             
  [data_tmeta]          pve        ewi-ao----    1.85g                                                             
  [lvol0_pmspare]       pve        ewi-------    1.85g                                                             
  root                  pve        -wi-ao----   69.50g                                                             
  swap                  pve        -wi-ao----    8.00g                                                             
  vm-211-disk-0         pve        Vwi-aotz--    3.00g data                 96.24                                 
  vm-601-disk-0         pve        Vwi-aotz--    8.00g data                 96.29                                 
  vm-803-disk-0         pve        Vwi-a-tz--   32.00g data                 73.21                                 
  vm-804-disk-0         pve        Vwi-aotz--  320.00g data                 11.98                                 
  vm-805-disk-0         pve        Vwi-a-tz--    8.00g data                 19.24                                 
  vm-806-disk-0         pve        Vwi-a-tz--  320.00g data                 4.79                                   
root@pve-pb2:/dev/pve# vgs
  VG         #PV #LV #SN Attr   VSize   VFree   
  pb2-raid10   1   2   0 wz--n-   1.09t 1016.55g
  pve          1   9   0 wz--n- 278.37g   15.99g

view from pve-pb1:

Code:
root@pve-pb1:/var/lib# cat /etc/pve/storage.cfg
dir: local
    path /var/lib/vz
    content iso,vztmpl,backup

lvmthin: local-lvm
    thinpool data
    vgname pve
    content rootdir,images

lvmthin: storage
    thinpool storage
    vgname storage
    content rootdir,images
    nodes pve-pb1

nfs: nfs-ext
    export /mnt/nfs_shared_folder
    path /mnt/pve/nfs-ext
    server 10.10.1.33
    content backup,images,vztmpl,rootdir,iso
    maxfiles 2

root@pve-pb1:/var/lib# lvs -a
  LV              VG      Attr       LSize    Pool    Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data            pve     twi-aotz-- <181.18g                32.59  2.44                           
  [data_tdata]    pve     Twi-ao---- <181.18g                                                       
  [data_tmeta]    pve     ewi-ao----    1.85g                                                       
  [lvol0_pmspare] pve     ewi-------    1.85g                                                       
  root            pve     -wi-ao----   69.50g                                                       
  swap            pve     -wi-ao----    8.00g                                                       
  vm-101-disk-0   pve     Vwi-a-tz--   32.00g data           3.27                                   
  vm-102-disk-0   pve     Vwi-aotz--  320.00g data           6.99                                   
  vm-102-disk-1   pve     Vwi-aotz--  600.00g data           0.00                                   
  vm-112-disk-0   pve     Vwi-aotz--    3.00g data           97.79                                 
  vm-131-disk-0   pve     Vwi-aotz--    8.00g data           18.75                                 
  vm-132-disk-0   pve     Vwi-a-tz--    8.00g data           31.34                                 
  vm-502-disk-0   pve     Vwi-a-tz--  320.00g data           4.14                                   
  vm-502-disk-1   pve     Vwi-a-tz--  600.00g data           0.00                                   
  vm-502-disk-2   pve     Vwi-a-tz--  600.00g data           0.00                                   
  vm-901-disk-0   pve     Vwi-aotz--   32.00g data           3.27                                   
  vm-902-disk-0   pve     Vwi-a-tz--   32.00g data           44.99                                 
  [lvol0_pmspare] storage ewi-------   72.00m                                                       
  storage         storage twi-aotz--    1.09t                0.52   10.68                           
  [storage_tdata] storage Twi-ao----    1.09t                                                       
  [storage_tmeta] storage ewi-ao----   72.00m                                                       
  vm-102-disk-0   storage Vwi-aotz--  600.00g storage        0.00                                   
  vm-131-disk-0   storage Vwi-aotz--   11.00g storage        52.23                                 
  vm-132-disk-0   storage Vwi-a-tz--    8.00g storage        1.00                                   
root@pve-pb1:/var/lib# vgs
  VG      #PV #LV #SN Attr   VSize   VFree
  pve       1  14   0 wz--n- 278.37g 15.99g
  storage   1   4   0 wz--n-   1.09t     0

In particular I'm trying to figure out why my thinvolume vm-raid10-pb2-1 (on VG pb2-raid10 and LV raid10-thin-1) isn't available in the dropdown lists to add to VMs or Containers as mountpoint - which is what IU'm trying to achieve. Desparate to figure out where I've gone wrong...
 
Did you create the pb2-raid10 manually on the CLI or via the PVE GUI?

If you create it via the GUI, there is a checkbox to add it to the storage config automatically.

If that is unchecked or if you created it manually, you will have to add the storage config for that LVM. It is only available on node 2 right?

To add a storage config connect to the GUI on node 2, go to Datacenter -> Storage and add a new storage of the correct type. Make sure to limit the storage to the node where it is available.
 
THANKS for help! REALLY appreciated.

I created the PV manually, (because I couldn't figure out how to in the gui - my lack of understanding I'm afraid). I created it like this:
Code:
# pvcreate /dev/sdb1
# pvcreate -ff /dev/sdb1
# pvcreate /dev/sdb1
# vgcreate pb2-raid10 /dev/sdb1

then I made the LV like this:
Code:
# lvcreate -L 100G -n raid10-thin-1 pb2-raid101
# lvconvert --type thin-pool pb2-raid10/raid10-thin-1

finally I made the vm with this:
Code:
# lvcreate -n vm-raid10-pb2-1 -V 10G pb2-raid10/raid10-thin-1

as lvm-thin I do only intend it to be available for node pve-pb2, so would I be correct in adding the following to the storage.cfg :
Code:
lvmthin: vm-raid10-pb2-1
    thinpool raid10-thin-1
    vgname pb2-raid10
    content rootdir,images
    nodes pve-pb2
 
Looks good. To be on the safer side, you can try to create the storage configuration via th GUI. It will scan available VGs and thinpools and show them in the drop down menu.
 
Thanks again. I definitely wanted to use the gui, but I think I incorrectly assumed the gui would spot the additional drive and do everything. But I got that wrong. I'm now wondering if I've missed the step of not formatting this drive??
 
Thin pools are used to store the disks of guests. For each disk a new volume will be created. For containers, it will be formatted and mounted by PVE. For VMs, the volume will be used as disk so the VM can do its partitioning and formatting.
 
Good to hear :) I marked the thread as solved. You can also do that yourself by editing the first post and selecting the prefix from the drop down menu next to the title.
 

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!