I'm enabling lvm-thin, but I had trouble following the proxmox documentation (https://pve.proxmox.com/pve-docs/pve-admin-guide.html#chapter_lvm and https: //pve.proxmox. com / wiki / Storage: _LVM_Thin)
I did the following (first try):
# fdisk / dev / sdb >> to format in LVM and have two partitions (/ dev / sdb1 and / dev / sdb2)
# pvcreate --metadatasize 250k -y -ff / dev / sdb1 / dev / sdb2
# vgcreate vg01 / dev / sdb1 / dev / sdb2
# lvcreate -L 2,72T -n lv01 vg01
# mkfs.ext4 / dev / vg01 / lv01
# mkdir / var / lib / vz / lv01
# echo '/ dev / vg01 / lv01 / var / lib / vz / lv01 ext4 defaults 0 2' >> / etc / fstab
# lvconvert --type thin-pool vg01 / lv01
# mount / var / lib / vz / lv01
Then I added it in "Datacenter> Storage> Add type> LVM-Thin"
error when creating a vm:
Logical volume vg01 / lv01 contains a filesystem in use.
TASK ERROR: unable to create VM 101 - lvcreate 'pve05-vg01 / vm-101-disk-0' error: Aborting. Could not deactivate thin pool vg01 / lv01.
error while restoring a bkp
Logical volume pve05-vg01 / pve05-lv01 contains a filesystem in use.
no lock found trying to remove 'create' lock
TASK ERROR: command 'set -o pipefail && lzop -d -c /mnt/pve/fn01/dump/vzdump-qemu-102-2019_07_10-02_50_50.vma.lzo | vma extract -v -r /var/tmp/vzdumptmp11606.fifo - / var / tmp / vzdumptmp11606 'failed: lvcreate' pve05-vg01 / vm-100-disk-0 'error: Aborting. Could not deactivate thin pool pve05-vg01 / pve05-lv01.
###################################
The way it worked was as follows (second try):
# pvcreate --metadatasize 250k /dev/sdb1 /dev/sdb2
# vgcreate vg01 /dev/sdb1 /dev/sdb2
# lvcreate -T -l 100% FREE -n lv01 vg01
Then I added it in "Datacenter> Storage> Add type> LVM-Thin"
###############################
What did I miss while following the documentation to make these errors?
why on the second try lv does not appear in "df -h" and I do not need to format for ext4 and mount?
Best
I did the following (first try):
# fdisk / dev / sdb >> to format in LVM and have two partitions (/ dev / sdb1 and / dev / sdb2)
# pvcreate --metadatasize 250k -y -ff / dev / sdb1 / dev / sdb2
# vgcreate vg01 / dev / sdb1 / dev / sdb2
# lvcreate -L 2,72T -n lv01 vg01
# mkfs.ext4 / dev / vg01 / lv01
# mkdir / var / lib / vz / lv01
# echo '/ dev / vg01 / lv01 / var / lib / vz / lv01 ext4 defaults 0 2' >> / etc / fstab
# lvconvert --type thin-pool vg01 / lv01
# mount / var / lib / vz / lv01
Then I added it in "Datacenter> Storage> Add type> LVM-Thin"
error when creating a vm:
Logical volume vg01 / lv01 contains a filesystem in use.
TASK ERROR: unable to create VM 101 - lvcreate 'pve05-vg01 / vm-101-disk-0' error: Aborting. Could not deactivate thin pool vg01 / lv01.
error while restoring a bkp
Logical volume pve05-vg01 / pve05-lv01 contains a filesystem in use.
no lock found trying to remove 'create' lock
TASK ERROR: command 'set -o pipefail && lzop -d -c /mnt/pve/fn01/dump/vzdump-qemu-102-2019_07_10-02_50_50.vma.lzo | vma extract -v -r /var/tmp/vzdumptmp11606.fifo - / var / tmp / vzdumptmp11606 'failed: lvcreate' pve05-vg01 / vm-100-disk-0 'error: Aborting. Could not deactivate thin pool pve05-vg01 / pve05-lv01.
###################################
The way it worked was as follows (second try):
# pvcreate --metadatasize 250k /dev/sdb1 /dev/sdb2
# vgcreate vg01 /dev/sdb1 /dev/sdb2
# lvcreate -T -l 100% FREE -n lv01 vg01
Then I added it in "Datacenter> Storage> Add type> LVM-Thin"
###############################
What did I miss while following the documentation to make these errors?
why on the second try lv does not appear in "df -h" and I do not need to format for ext4 and mount?
Best