LVM-Thin error create vm and backup restore

Discussion in 'Proxmox VE: Installation and configuration' started by rafafell, Jul 11, 2019.

Tags:
  1. rafafell

    rafafell Member

    Joined:
    Sep 24, 2016
    Messages:
    37
    Likes Received:
    0
    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
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice