查看磁盘
fdisk -l
初始化磁盘
mkfs.ext4 /dev/sdb
挂载磁盘到分区
mount /dev/sdb /home
开机自动挂载
echo '/dev/sdb /home ext4 defaults 0 0' >> /etc/fstab
cat /etc/fstab
df -h
fdisk -l
fdisk /dev/sda
n
p
3
print
t
3
8e
print
w
partprobe
fdisk -l
pvcreate /dev/sda3
pvdisplay
vgextend centos /dev/sda3
pvdisplay
lvresize -L +70G /dev/mapper/centos-root
xfs_growfs /dev/mapper/centos-root
创建物理卷
pvcreate /dev/sdb
查看卷组
vgdisplay
扩展卷分组
vgextend centos /dev/sdb
查看逻辑卷
lvdisplay
扩展逻辑卷
pvdisplay查看得到的Free PE
lvextend -L +6G /dev/centos/home
xfs_growfs /dev/mapper/centos-root