LVM-Thin on 2 HDD

VlcaCZ

New Member
Jan 20, 2023
5
0
1
Hello community.
First of all, I am a complete beginner and I need advice.
I need to create an LVM-Thin from two disks. I have a clean 2x6TB drives and need at least 10TB.

I found the instructions, but unfortunately it doesn't work for me:
https://www.diytechguru.com/2020/12/12/create-lvm-thin-pool-in-proxmox/
Everything is OK until the step when I have to add LVM-Thin in the "Datacenter" in the GUI.
I see LVM created. I see Thin-pool created. But I don't see Thin-pool in the window where it is added in the Datacenter.
Can someone help me with this problem?
Thank you and no-hate me please.
 
Can you post the output of the following commands?

Code:
lsblk --ascii -M -o +HOTPLUG,ROTA,PHY-SEC,FSTYPE,MODEL,TRAN

pvs
lvs
vgs

cat /etc/pve/storage.cfg
 
This is my current setup. No attempt at LVM-Thin at the moment.

root@pve:~# lsblk --ascii -M -o +HOTPLUG,ROTA,PHY-SEC,FSTYPE,MODEL,TRAN
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT HOTPLUG ROTA PHY-SEC FSTYPE MODEL TRAN
sda 8:0 0 119.2G 0 disk 0 0 512 Patriot_P210_128GB sata
|-sda1 8:1 0 1007K 0 part 0 0 512
|-sda2 8:2 0 512M 0 part /boot/efi 0 0 512 vfat
`-sda3 8:3 0 118.7G 0 part 0 0 512 LVM2_member
|-pve-swap 253:2 0 8G 0 lvm [SWAP] 0 0 512 swap
|-pve-root 253:3 0 39.7G 0 lvm / 0 0 512 ext4
,-> |-pve-data_tmeta 253:4 0 1G 0 lvm 0 0 512
'-> `-pve-data_tdata 253:5 0 54.3G 0 lvm 0 0 512
`--pve-data 253:6 0 54.3G 0 lvm 0 0 512
sdb 8:16 0 5.5T 0 disk 0 1 4096 ST6000NE0023-2EX110 sata
`-sdb1 8:17 0 5.5T 0 part 0 1 4096
sdc 8:32 0 5.5T 0 disk 0 1 4096 ST6000NE0023-2EX110 sata
`-sdc1 8:33 0 5.5T 0 part 0 1 4096
sdd 8:48 0 5.5T 0 disk 0 1 4096 ST6000NE0023-2EX110 sata
|-sdd1 8:49 0 5.5T 0 part 0 1 4096 zfs_member
`-sdd9 8:57 0 8M 0 part 0 1 4096
sde 8:64 0 5.5T 0 disk 0 1 4096 ST6000NE0023-2EX110 sata
|-sde1 8:65 0 5.5T 0 part 0 1 4096 zfs_member
`-sde9 8:73 0 8M 0 part 0 1 4096
zd0 230:0 0 10T 0 disk 0 0 8192
|-zd0p1 230:1 0 1M 0 part 0 0 8192
`-zd0p2 230:2 0 10T 0 part 0 0 8192 ext4
nvme0n1 259:0 0 931.5G 0 disk 0 0 512 WD Blue SN570 1TB nvme
|-nvme0n1p1 259:1 0 303.2G 0 part 0 0 512 LVM2_member nvme
| `-cum1-vm--100--disk--0 253:0 0 303G 0 lvm 0 0 512
|-nvme0n1p2 259:2 0 303.2G 0 part 0 0 512 LVM2_member nvme
| `-cum2-vm--101--disk--0 253:1 0 303G 0 lvm 0 0 512
`-nvme0n1p3 259:3 0 303.2G 0 part 0 0 512 nvme
--------------------------------------------------------------------------------------------------------------------------------------------------------------
root@pve:~# pvs
PV VG Fmt Attr PSize PFree
/dev/nvme0n1p1 cum1 lvm2 a-- <303.22g 224.00m
/dev/nvme0n1p2 cum2 lvm2 a-- <303.22g 224.00m
/dev/sda3 pve lvm2 a-- <118.74g 14.75g
----------------------------------------------------------------------------------------------------------------------------------------------------------------
root@pve:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
vm-100-disk-0 cum1 -wi-ao---- 303.00g
vm-101-disk-0 cum2 -wi-ao---- 303.00g
data pve twi-a-tz-- 54.30g 0.00 1.59
root pve -wi-ao---- <39.69g
swap pve -wi-ao---- 8.00g
------------------------------------------------------------------------------------------------------------------------------------------------------------------
root@pve:~# vgs
VG #PV #LV #SN Attr VSize VFree
cum1 1 1 0 wz--n- <303.22g 224.00m
cum2 1 1 0 wz--n- <303.22g 224.00m
pve 1 3 0 wz--n- <118.74g 14.75g
------------------------------------------------------------------------------------------------------------------------------------------------------------------
root@pve:~# cat /etc/pve/storage.cfg
dir: local
path /var/lib/vz
content vztmpl,iso,backup

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

lvm: Cumulus1
vgname cum1
content rootdir,images
shared 0

lvm: Cumulus2
vgname cum2
content images,rootdir
shared 0

zfspool: ZFS
pool zfs
content images,rootdir
mountpoint /zfs
sparse 0
 
Last edited:
It doesn't seem like there are any Physical Volumes, Volume Groups or Logical Volumes created according to the output of your commands. Which disks do you want to create the thin pool on? sdb & sdc ?


PS: For the future, since I forgot to mention it: Please post the output of commands in code tags, which makes them infinitely easier to read. You can do this by clicking the </> icon when creating the post.
 
So it seems like there has not been anything created on these disks related to LVM, can you post the output of the following commands just to be sure?

Code:
fdisk -l /dev/sdb /dev/sdc
 
No, they are completely clean.
Code:
root@pve:~# fdisk -l /dev/sdb /dev/sdc
Disk /dev/sdb: 5.46 TiB, 6001175126016 bytes, 11721045168 sectors
Disk model: ST6000NE0023-2EX
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/sdc: 5.46 TiB, 6001175126016 bytes, 11721045168 sectors
Disk model: ST6000NE0023-2EX
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 
Okay, then I think you should just try again creating the thin-pool. It seems like something already went wrong when creating the physical volumes, since they are already not showing up in the pvs output.

The procedure from the homepage seems to be missing the creation of a metadatapool for the thin volume, which is recommended when creating a thin pool.

Additionally, you could check after each step whether the command actually did what it was supposed to do? Did you maybe miss some error output that showed possible issues when creating the PV/VG/LV ?

In my opinion the following should work (please replace the parts in <brackets> with the actual name you want to use):

Code:
wipefs -a /dev/sdb /dev/sdc

# create pvs
pvcreate /dev/sdb /dev/sdc
# check if the physical volumes are successfully created
pvs

# create vg
vgcreate <name_of_volume_group> /dev/sdb /dev/sdc
# check if the volume group got created successfully
vgs

# create a thin pool LV (this might show a warning regarding the maximum size, which is fine)
lvcreate -T -l 100%FREE --poolmetadatasize 16G <name_of_volume_group>/<name_of_thin_pool>

# verify whether everything worked correctly
lvs -a

Afterwards you should be able to add it as an LVM-thin storage to Proxmox via the Web UI.
 
Thank you very much. Now everything went smoothly and everything works as it should.

Code:
root@pve:~# wipefs -a /dev/sdb /dev/sdc
root@pve:~# pvcreate /dev/sdb /dev/sdc
  Physical volume "/dev/sdb" successfully created.
  Physical volume "/dev/sdc" successfully created.
root@pve:~# vgcreate fractus2 /dev/sdb /dev/sdc
  Volume group "fractus2" successfully created
root@pve:~# lvcreate -T -l 100%FREE --poolmetadatasize 16G fractus2/thp2
  Thin pool volume with chunk size 64.00 KiB can address at most 15.81 TiB of data.
  WARNING: Maximum supported pool metadata size is 15.81 GiB.
  Logical volume "thp2" created.
root@pve:~#
 
Okay, then I think you should just try again creating the thin-pool. It seems like something already went wrong when creating the physical volumes, since they are already not showing up in the pvs output.

The procedure from the homepage seems to be missing the creation of a metadatapool for the thin volume, which is recommended when creating a thin pool.

Additionally, you could check after each step whether the command actually did what it was supposed to do? Did you maybe miss some error output that showed possible issues when creating the PV/VG/LV ?

In my opinion the following should work (please replace the parts in <brackets> with the actual name you want to use):

Code:
wipefs -a /dev/sdb /dev/sdc

# create pvs
pvcreate /dev/sdb /dev/sdc
# check if the physical volumes are successfully created
pvs

# create vg
vgcreate <name_of_volume_group> /dev/sdb /dev/sdc
# check if the volume group got created successfully
vgs

# create a thin pool LV (this might show a warning regarding the maximum size, which is fine)
lvcreate -T -l 100%FREE --poolmetadatasize 16G <name_of_volume_group>/<name_of_thin_pool>

# verify whether everything worked correctly
lvs -a

Afterwards you should be able to add it as an LVM-thin storage to Proxmox via the Web UI.
Thank you for this. Went with this setup since I only have two SSD drives of varying sizes.
 

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!