Mount LVM on CentOS 8

查看磁盘信息

fdisk -l

硬盘分区

fdisk /dev/sdb

m 帮助,n 新建分区,p 主分区,w 保存并退出

创建PV

pvcreate /dev/sdb1
pvdisplay

扩展VG

vgextend centos /dev/sdb1
vgdisplay

创建 /dev/mapper/centos-home

lvcreate -L 100GB -n home centos
lvdisplay
mkfs.xfs /dev/centos/home

挂载

vim /etc/fstab
mount /dev/mapper/centos-home

查看磁盘信息

blkid
df -h

Leave a comment

Your email address will not be published. Required fields are marked *