ProxMox 5 - LVM-Thin with shapshot

Herjy

New Member
Nov 5, 2017
2
0
1
51
Hi,

I have been using Proxmox 4 for a while now. An environment consisting of a Proxmox cluster with additional local disks in LVM (I know it's not Ceph). I reinstalled my machines with Proxmox 5.1.36 in the same way and the snapshot does not work anymore. According to the documentation and several posts, it is necessary to use LVM-Thin. I saw that many people had the same question as me and none had a complete answer. Would anyone be nice enough to indicate how to proceed (I do not want to extend the existing partition). I did several searches on Google and nothing works.

For Proxmox 4, I used this method:

1. Create an LVM partition on the hard disk.

cfdisk /dev/sda

Type: Linux LVM (8e)

2. Create the virtual partition in LVM.

pvcreate /dev/sda1

3. Creating the Volume Group.

vgcreate ssd250 /dev/sda1

4. Add the new disk in ProxMox.

Datacenter / Storage / Add / LVM

ID: ssd250
Base storage: Existing volume groups
Volume group: ssd250
Content: Disk image, Container

Nodes: px<00>
Enable: X


On Proxmox 5.1.36, I try (also) this method but ProxMox 5 do not see the Thin Pool.

pvcreate /dev/sda1

vgcreate ssd250 /dev/sda1

lvcreate --thin -L200G --chunksize 1M --poolmetadatasize 10G /dev/ssd250/ssd250_thinpool

lvcreate --thinpool /dev/ssd250/ssd250_thinpool -n test_lv -V100G

mkfs.ext4 /dev/ssd250/test_lv (I try with and without this line)

Datacenter / Storage / Add / LVM

No Thin Pool available...


How can I do with Proxmox 5 and have access to the snapshot with additional disk in LVM?


Thank for helping me...and the other one who have the same problem!

Herjy
 
Datacenter / Storage / Add / LVM
It must be "Datacenter / Storage / Add / LVM-Thin" not LVM.

Try simply this:
Code:
cfdisk /dev/XXX  #do some gpt
vgcreate pve1 /dev/xxx
lvcreate -L 100G -n data1 pve1
lvconvert --type thin-pool pve1/data1
Thats all. Work in PVE4 and 5.
And do not format the lv. This is not needed.
 
Thank Fireon for the answer,

The "Datacenter / Storage / Add / LVM" is a typo, sorry.


Ok, I tried the commands and Proxmox did not see the volume group (pve1). But if I add manually these line in the storage.cfg, it's work, but the method is not good.
lvmthin: test
thinpool data1
vgname pve1
content rootdir,images
nodes px03


Here are the results for each of my steps before adding manually the config.

fdisk -l
Device Start End Sectors Size Type
/dev/sda1 2048 488397134 488395087 232.9G Linux LVM

vgdisplay pve1
--- Volume group ---
VG Name pve1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 232.88 GiB
PE Size 4.00 MiB
Total PE 59618
Alloc PE / Size 0 / 0
Free PE / Size 59618 / 232.88 GiB
VG UUID mrn6uX-gYTv-kg0G-3Zwk-GmVE-luqT-USqBl0


lvdisplay /dev/pve1/data1
--- Logical volume ---
LV Path /dev/pve1/data1
LV Name data1
VG Name pve1
LV UUID aLroy9-aPz9-cxlG-E78D-neY3-LXZ9-4chW1R
LV Write Access read/write
LV Creation host, time px03, 2017-11-05 17:18:21 -0500
LV Status available
# open 0
LV Size 100.00 GiB
Current LE 25600
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:6


lvdisplay pve1/data1
--- Logical volume ---
LV Name data1
VG Name pve1
LV UUID S4XgCK-Ol5K-3d1K-N6WB-2W6e-QzmS-R6wuZo
LV Write Access read/write
LV Creation host, time px03, 2017-11-05 17:19:38 -0500
LV Pool metadata data1_tmeta
LV Pool data data1_tdata
LV Status available
# open 0
LV Size 100.00 GiB
Allocated pool data 0.00%
Allocated metadata 0.43%
Current LE 25600
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:8


Any idea?