1.使用fdisk对/dev/nvmeOn1剩余空间进行分区
[root@rhcsa ~]# lsblk //查看磁盘信息(块设备)
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 792M 0 rom
nvme0n1 259:0 0 20G 0 disk
├─nvme0n1p1 259:1 0 1G 0 part /boot
└─nvme0n1p2 259:2 0 19G 0 part
├─centos-root 253:0 0 17G 0 lvm /
└─centos-swap 253:1 0 2G 0 lvm [SWAP]
[root@rhcsa ~]# fdisk /dev/nvme0n1 //使用fdisk进行MBR格式分区
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p //查看当前磁盘的分区信息
Disk /dev/nvme0n1: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000aa03a
Device Boot Start End Blocks Id System
/dev/nvme0n1p1 * 2048 2099199 1048576 83 Linux
/dev/nvme0n1p2 2099200 33556479 15728640 83 Linux
Command (m for help): n //添加新的分区
Partition type:
p primary (2 primary, 0 extended, 2 free)
e extended
Select (default p): p //选择默认
Partition number (3,4, default 3): 3 //选择分区编号
First sector (33556480-41943039, default 33556480): //选择分区的起始位置
Using