Device does not contain a recognized partitiontable 使用磁盘标识符 0x1b8f4ec4 创建新的 DOS 磁盘标签。
命令(输入 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)
命令(输入 m 获取帮助):n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): p 分区号 (1-4,默认 1):1 起始 扇区 (2048-1048575999,默认为 2048): 将使用默认值 2048 Last 扇区, +扇区 or +size{K,M,G} (2048-1048575999,默认为 1048575999): 将使用默认值 1048575999 分区 1 已设置为 Linux 类型,大小设为 500 GiB
[root@gitlab ~]# pvdisplay --- Physical volume --- PV Name /dev/sda2 VG Name centos_gitlab PV Size <19.00 GiB / not usable 3.00 MiB Allocatable yes (but full) PE Size4.00 MiB Total PE 4863 Free PE 0 Allocated PE 4863 PV UUID Uxxs2H-fqny-3gjD-eZpq-opJZ-ygIf-fFkhCu
--- Physical volume --- PV Name /dev/sdb1 VG Name centos_gitlab PV Size <500.00 GiB / not usable 3.00 MiB Allocatable yes PE Size4.00 MiB Total PE 127999 Free PE 127999 Allocated PE 0 PV UUID OCWyXg-0HQZ-UydA-DxqB-hUfk-Kk7N-6T6JEq
扩容卷组
注意:扩充的容量要小于物理卷容量。例如500G的卷添加499.9G
1 2 3 4
[root@gitlab ~]# lvextend -L +499.9G /dev/mapper/centos_gitlab-root Rounding size to boundary between physical extents: 499.90 GiB. Size of logical volume centos_gitlab/root changed from <17.00 GiB (4351 extents) to <516.90 GiB (132326 extents). Logical volume centos_gitlab/root successfully resized.