I accidentally deleted pve/data thin volume in proxmox. Very next second i realised this and i tried to recovering it as below
lvremove /dev/pve/data
ls -lrt /etc/lvm/archive
head /etc/lvm/archive/pve_00059-189435924.vg
vgcfgrestore pve --test -f /etc/lvm/archive/pve_00059-189435924.vg
TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
Consider using option --force to restore Volume Group pve with thin volumes.
Restore failed.
vgcfgrestore pve -f /etc/lvm/archive/pve_00059-189435924.vg --force
i thought it restored correctly, here is output
lvdisplay
--- Logical volume ---
LV Name data
VG Name pve
LV UUID xBjmdE-1l8m-LGM2-EC6g-MNrO-15O1-v6eaxb
LV Write Access read/write
LV Creation host, time proxmox, 2018-09-12 21:21:59 +0530
LV Pool metadata data_tmeta
LV Pool data data_tdata
LV Status NOT available
LV Size 758.52 GiB
Current LE 194181
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/pve/data_meta0
LV Name data_meta0
VG Name pve
LV UUID TFIfYP-W54R-dPgd-8c1c-GQsv-uCRE-TmwfRl
LV Write Access read/write
LV Creation host, time proxmox, 2018-09-12 21:21:59 +0530
LV Status NOT available
LV Size 7.74 GiB
Current LE 1982
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/pve/data_meta1
LV Name data_meta1
VG Name pve
LV UUID UUe3oN-HBjQ-bcua-TW2O-vEpL-k2Vc-MUdWeP
LV Write Access read/write
LV Creation host, time proxmox, 2018-09-12 21:21:59 +0530
LV Status NOT available
LV Size 7.74 GiB
Current LE 1982
Segments 1
Allocation inherit
Read ahead sectors auto
But it is inactive and not usable at all. I can't create any VM in this space. It shows error
Using default stripesize 64.00 KiB. Thin pool pve-data-tpool (253:4) transaction_id is 0, while expected 54. TASK ERROR: create failed - lvcreate 'pve/vm-107-disk-1' error: Aborting. Failed to locally activate thin pool pve/data.
lvscan
ACTIVE '/dev/pve/swap' [8.00 GiB] inherit
ACTIVE '/dev/pve/root' [96.00 GiB] inherit
inactive '/dev/pve/data' [758.52 GiB] inherit
inactive '/dev/pve/data_meta0' [7.74 GiB] inherit
inactive '/dev/pve/data_meta1' [7.74 GiB] inherit
I am trying to activate it but no success.
lvchange -a y pve/data
Thin pool pve-data-tpool (253:4) transaction_id is 0, while expected 54.
Can somebody help me to resolve this error.