root@ubuntu03:~# vgdisplay
--- Volume group ---
VG Name ubuntu-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
...
5.把創(chuàng)建的物理卷加入卷組
root@ubuntu:~# vgextend ubuntu-vg /dev/sda4 加入卷組
Volume group "ubuntu-vg" successfully extended
root@ubuntu03:~# lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
Size of logical volume ubuntu-vg/ubuntu-lv changed from <11.50 GiB (2943 extents) to 37.99 GiB (9726 extents).
Logical volume ubuntu-vg/ubuntu-lv successfully resized.
8.刷新邏輯卷
root@ubuntu03:~# resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs 1.46.5 (30-Dec-2021)
Filesystem at /dev/mapper/ubuntu--vg-ubuntu--lv is mounted on /; on-line resizing required
old_desc_blocks = 2, new_desc_blocks = 5
The filesystem on /dev/mapper/ubuntu--vg-ubuntu--lv is now 9959424 (4k) blocks long.