更改将停留在内存中,直到您决定将更改写入磁盘。 使用写入命令前请三思。 命令(输入 m 获取帮助):m 命令操作 a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition g create a newempty GPT partitiontable G create an IRIX (SGI) partitiontable l list known partition types m print this menu n add a newpartition o create a newempty DOS partitiontable p print the partitiontable q quit without saving changes s create a newempty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only)
1 2 3 4 5 6 7 8 9 10 11
命令(输入 m 获取帮助): n #new 新分区 Partition type: p primary (2 primary, 1 extended, 1 free) l logical (numbered from 5) Select (default p): p #选择主分区 Selected partition 3 #分区序号 起始 扇区 (251658240-13631448799,默认为 251658240): #分区开始回车默认 将使用默认值 251658240 Last 扇区, +扇区 or +size{K,M,G} (251658240-13631448799,默认为 13631448799): 将使用默认值 13631448799
Last login: Sat Nov 2001:59:18 on ttys000 [root@localhost ~]# vgdisplay --- Volume group --- VG Name nlas System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 5 VG Access read/write VG Status resizable MAX LV 0 Cur LV 3 Open LV 3 Max PV 0 Cur PV 2 Act PV 2 VG Size648.99 GiB PE Size4.00 MiB Total PE 166142 Alloc PE / Size30462 / 118.99 GiB Free PE / Size135680 / 530.00 GiB VG UUID Ac7YMK-JWY0-2q9Y-9pun-iU9i-Wsdv-KLEkMR
### 测试大小,超出会显示错误 [root@localhost ~]# lvresize -L +600G /dev/mapper/nlas-root Insufficient free space: 153600 extents needed, but only135680 available
### 正式的 [root@localhost ~]# lvresize -L +530G /dev/mapper/nlas-root Size of logical volume nlas/root changed from 50.00 GiB (12800 extents) to 580.00 GiB (148480 extents). Logical volume nlas/root successfully resized.