我正在运行 Proxmox 8.2.2。最近我的 lvg 损坏了(“卷组 pve 可用空间不足!”)
首先,我尝试修复 vg:
$ sudo lvconvert --repair pve/data
Volume group "pve" has insufficient free space (2017 extents): 2077 required.
因此我插入了一个额外的磁盘并将其添加到组中:
$ sudo pvcreate /dev/sdj
$ sudo vgextend pve /dev/sdj
并重新运行修复:
$ sudo lvconvert --repair pve/data
WARNING: You have not turned on protection against thin pools running out of space.
WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
WARNING: Sum of all thin volume sizes (<884.02 GiB) exceeds the size of thin pools (<794.79 GiB).
WARNING: You have not turned on protection against thin pools running out of space.
WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
WARNING: LV pve/data_meta2 holds a backup of the unrepaired metadata. Use lvremove when no longer required.
WARNING: New metadata LV pve/data_tmeta might use different PVs. Move it with pvmove if required.
现在,我的数据可以访问了。我删除了一些我不需要的数据。以下是我想要做的:
理解上述有关精简池的警告并设置限制,以防止这种情况再次发生。
减少逻辑卷跨度,这样我就不需要刚刚插入的额外物理磁盘。
移除物理磁盘,而不会损坏或危及 lv 中的任何东西。
我对此感到力不从心——我真的很感激任何见解或文档链接,这样我就能理解我是如何陷入这种困境的,我如何强制限制以免再次陷入这种困境,以及如何让自己回到 lvg 不包含新驱动器的状态。
编辑:
$ sudo pvdisplay
--- Physical volume ---
PV Name /dev/sdk3
VG Name pve
PV Size 931.01 GiB / not usable 4.69 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 238338
Free PE 2017
Allocated PE 236321
PV UUID Msq2HF-K0f1-5spf-hWis-irni-vrLM-fiyq1N
--- Physical volume ---
PV Name /dev/sdj
VG Name pve
PV Size <1.82 TiB / not usable <1.09 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 476932
Free PE 474855
Allocated PE 2077
PV UUID Jl1Jkd-4PJs-uAu9-bOUb-2yEQ-dnFb-YS5RVf
$ sudo vgdisplay
--- Volume group ---
VG Name pve
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 746
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 12
Open LV 5
Max PV 0
Cur PV 2
Act PV 2
VG Size <2.73 TiB
PE Size 4.00 MiB
Total PE 715270
Alloc PE / Size 238398 / 931.24 GiB
Free PE / Size 476872 / <1.82 TiB
VG UUID cmDgdu-22V6-Tx4j-pwNG-42ZZ-vRiG-SA850C
$ sudo lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-aotz-- <794.79g 61.00 3.20
data_meta0 pve -wi-a----- 8.11g
data_meta1 pve -wi-a----- 8.11g
root pve -wi-ao---- 96.00g
swap pve -wi-ao---- 8.00g
vm-100-disk-0 pve Vwi-aotz-- 32.00g data 20.35
vm-100-disk-1 pve Vwi-aotz-- 4.00m data 14.06
vm-102-disk-0 pve Vwi-aotz-- 10.00g data 35.51
vm-104-disk-0 pve Vwi-a-tz-- 8.00g data 57.03
vm-110-disk-0 pve Vwi-a-tz-- 4.00m data 14.06
vm-110-disk-1 pve Vwi-a-tz-- 650.00g data 72.34
vm-110-disk-2 pve Vwi-a-tz-- 4.00m data 1.56
$ sudo pvdisplay -m
--- Physical volume ---
PV Name /dev/sdk3
VG Name pve
PV Size 931.01 GiB / not usable 4.69 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 238338
Free PE 2017
Allocated PE 236321
PV UUID Msq2HF-K0f1-5spf-hWis-irni-vrLM-fiyq1N
--- Physical Segments ---
Physical extent 0 to 2047:
Logical volume /dev/pve/swap
Logical extents 0 to 2047
Physical extent 2048 to 26623:
Logical volume /dev/pve/root
Logical extents 0 to 24575
Physical extent 26624 to 230089:
Logical volume /dev/pve/data_tdata
Logical extents 0 to 203465
Physical extent 230090 to 232166:
Logical volume /dev/pve/data_meta0
Logical extents 0 to 2076
Physical extent 232167 to 234243:
Logical volume /dev/pve/data_meta1
Logical extents 0 to 2076
Physical extent 234244 to 236320:
Logical volume /dev/pve/data_tmeta
Logical extents 0 to 2076
Physical extent 236321 to 238337:
FREE
--- Physical volume ---
PV Name /dev/sdj
VG Name pve
PV Size <1.82 TiB / not usable <1.09 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 476932
Free PE 474855
Allocated PE 2077
PV UUID Jl1Jkd-4PJs-uAu9-bOUb-2yEQ-dnFb-YS5RVf
--- Physical Segments ---
Physical extent 0 to 2076:
FREE
Physical extent 2077 to 4153:
Logical volume /dev/pve/lvol1_pmspare
Logical extents 0 to 2076
Physical extent 4154 to 476931:
FREE