我在添加新的存储机柜后尝试增加 pv/vg/lv 的大小,并且创建了 2 个新卷并将其连接到主机。虽然增加 PV 和 VG 效果很好,但 LV 似乎看不到任何可用空间。也许有人可以告诉我为什么这不起作用?
到目前为止所做的工作:
rescan-scsi-bus.sh -r
pvcreate /dev/mapper/mpathe
Physical volume "/dev/mapper/mpathe" successfully created.
pvcreate /dev/mapper/mpathf
Physical volume "/dev/mapper/mpathf" successfully created.
vgextend vgall /dev/mapper/mpathe
Volume group "vgall" successfully extended
vgextend vgall /dev/mapper/mpathf
Volume group "vgall" successfully extended
但现在 lvextend 显示以下内容:
lvextend -l +100%FREE /dev/vgall/lvol0
Using stripesize of last segment 4.00 KiB
Rounding size (152285551 extents) down to stripe boundary size for segment (152285548 extents)
Size of logical volume vgall/lvol0 changed from 478.39 TiB (125408168 extents) to 478.51 TiB (125439052 extents).
Logical volume vgall/lvol0 successfully resized.
这基本上没什么,并且后续运行确实显示:
lvextend -l +100%FREE /dev/vgall/lvol0
Using stripesize of last segment 4.00 KiB
Rounding size (152285551 extents) down to stripe boundary size for segment (152285548 extents)
Size of logical volume vgall/lvol0 unchanged from 478.51 TiB (125439052 extents).
Command failed with status code 5.
PV/LV/VG输出显示如下:
--- Physical volume ---
PV Name /dev/mapper/mpatha
VG Name vgall
PV Size <119.60 TiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 31352042
Free PE 0
Allocated PE 31352042
--- Physical volume ---
PV Name /dev/mapper/mpathb
VG Name vgall
PV Size <119.63 TiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 31359763
Free PE 0
Allocated PE 31359763
--- Physical volume ---
PV Name /dev/mapper/mpathc
VG Name vgall
PV Size <119.60 TiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 31352042
Free PE 0
Allocated PE 31352042
--- Physical volume ---
PV Name /dev/mapper/mpathd
VG Name vgall
PV Size <119.63 TiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 31359763
Free PE 0
Allocated PE 31359763
--- Physical volume ---
PV Name /dev/mapper/mpathe
VG Name vgall
PV Size <51.27 TiB / not usable 4.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 13438976
Free PE 13431255
Allocated PE 7721
--- Physical volume ---
PV Name /dev/mapper/mpathf
VG Name vgall
PV Size 51.20 TiB / not usable 4.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 13422965
Free PE 13415244
Allocated PE 7721
--- Volume group ---
VG Name vgall
System ID
Format lvm2
Metadata Areas 6
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 6
Act PV 6
VG Size 580.92 TiB
PE Size 4.00 MiB
Total PE 152285551
Alloc PE / Size 125439052 / 478.51 TiB
Free PE / Size 26846499 / 102.41 TiB
--- Logical volume ---
LV Path /dev/vgall/lvol0
LV Name lvol0
VG Name vgall
LV Write Access read/write
LV Status available
# open 1
LV Size 478.51 TiB
Current LE 125439052
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:6
lvdisplay -m /dev/vgall/lvol0
--- Logical volume ---
LV Path /dev/vgall/lvol0
LV Name lvol0
VG Name vgall
LV UUID MKcUYB-dAoJ-qJq1-hQEy-ArGl-c0bi-WKY0bU
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2023-10-04 20:00:04 +0200
LV Status available
# open 1
LV Size 478.51 TiB
Current LE 125439052
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:6
--- Segments ---
Logical extents 0 to 125408167:
Type striped
Stripes 4
Stripe size 4.00 KiB
Stripe 0:
Physical volume /dev/mapper/mpathb
Physical extents 0 to 31352041
Stripe 1:
Physical volume /dev/mapper/mpathd
Physical extents 0 to 31352041
Stripe 2:
Physical volume /dev/mapper/mpatha
Physical extents 0 to 31352041
Stripe 3:
Physical volume /dev/mapper/mpathc
Physical extents 0 to 31352041
Logical extents 125408168 to 125439051:
Type striped
Stripes 4
Stripe size 4.00 KiB
Stripe 0:
Physical volume /dev/mapper/mpathe
Physical extents 0 to 7720
Stripe 1:
Physical volume /dev/mapper/mpathf
Physical extents 0 to 7720
Stripe 2:
Physical volume /dev/mapper/mpathb
Physical extents 31352042 to 31359762
Stripe 3:
Physical volume /dev/mapper/mpathd
Physical extents 31352042 to 31359762