Device Boot Start End Blocks Id System
/dev/vda1 * 3 1018 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/vda2 1018 41611 20458496 8e Linux LVM
Partition 2 does not end on cylinder boundary.
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help):
请安步骤输入下面操作;
p 查看已分区数量(我看到有两个 /dev/vda1 /dev/vda2)
n 新增加一个分区
p 分区类型我们选择为主分区
3 分区号选3(因为1,2已经用过了,见上)
回车 填写/dev/vda2的数值41611(起始扇区)
回车 默认(结束扇区)
t 修改分区类型
3 选分区3
8e 修改为LVM(8e就是LVM)
w 写分区表(因为是系统硬盘,所以直接退出了,没有关系的)
可以看到扩充完成的容量Free PE数值已经完全分配完毕
--- Volume group ---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 24.50 GiB
PE Size 4.00 MiB
Total PE 6273
Alloc PE / Size 6273 / 24.50 GiB
Free PE / Size 0 / 0
VG UUID KVPwfe-CykZ-8ub5-7mct-W23P-pvno-jXYVZ