LVM is an abstract software layer on physical hard drives. LVM thin-pooling allows you to create volumes bigger than the available physical space. Proxmox VE supports LVM thin Backend for VM and container storage. This tutorial will help you to create an LVM thin pool with multiple drives, and add it in Proxmox VE for VM and Container storage.
If you would like to start by installing Proxmox VE instead go to my post here. You can continue back here to create an LVM thin pool in Proxmox after that.
1. Install the hard disks and check if they are visible under Disks. I have two drives which are going to be used for creating the LVM thin-pool.
2. To prepare the disks for LVM group creation, first wipe them. You can use the wipefs utility to be quick.
wipefs -a /dev/sdb /dev/sdc
3. Create physical volumes on the disks using pvcreate. Physical volumes are the basic blocks of LVM storage.
pvcreate /dev/sdb /dev/sdc
4. Next create a volume group with all the disks. Volume group will combine all physical volumes to give a single central storage structure.
vgcreate vgrp /dev/sdb /dev/sdc #vgrp is the name of the vol group
5. Go to PVE web interface. Navigate to Disks -> LVM, and you should see the new volume group ‘vgrp’.
6. Next, we will create a thin-pool on the volume group we just created.
lvcreate -L 18.0T --thinpool thpl vgrp #thpl is the name of the thinpool
The new LVM thin-pool ‘thpl’ should be visible in the web interface under Disks -> LVM-Thin.
7. Under Datacenter -> Storage, Add an LVM-Thin with a unique ID and the thin-pool we created, as below.
This will allow PVE to use the new storage for contents placement.
You can now use the thin-pool for Disk Image, Containers, meanwhile managing it easily via Linux LVM manager.