![我怎样才能正确恢复已删除的 pve/数据](https://linux22.com/image/727805/%E6%88%91%E6%80%8E%E6%A0%B7%E6%89%8D%E8%83%BD%E6%AD%A3%E7%A1%AE%E6%81%A2%E5%A4%8D%E5%B7%B2%E5%88%A0%E9%99%A4%E7%9A%84%20pve%2F%E6%95%B0%E6%8D%AE.png)
我意外删除了 proxmox 中的 pve/data 精简卷。下一秒我就意识到了这一点,并尝试按如下方法恢复它
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
我认为它恢复正确,这是输出
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
但它处于非活动状态,根本无法使用。我无法在此空间中创建任何虚拟机。它显示错误
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
我正在尝试激活它但没有成功。
lvchange -a y pve/data
Thin pool pve-data-tpool (253:4) transaction_id is 0, while expected 54.
有人能帮我解决这个错误吗?