Linux文件系统与LVM实际操作
1.将三个主分区转换为物理卷(pvcreate),扫描系统中的物理卷
[root@localhost ~]# pvcreate /dev/sdd[123]
[root@localhost ~]# pvscan
2.使用两个物理卷创建卷组名字为myvg,查看卷组大小
[root@localhost ~]# vgcreate myvg /dev/sdd[12]
[root@localhost ~]# vgdisplay
3.创建逻辑卷mylv,大小为30G
[root@localhost ~]# lvcreate -L 30G -n mylv myvg
Logical volume "mylv" created.
4.将逻辑卷格式化成xfs文件系统,并挂载到/data目录上,创建文件测试
[root@localhost ~]# mkfs -t xfs /dev/myvg/mylv
[root@localhost ~]# mkdir -pv /data
[root@localhost ~]# mount /dev/myvg/mylv /data
5.增大逻辑卷到35G
[root@localhost data]# lvextend -L +5G /dev/myvg/mylv
Size of logical volume myvg/mylv changed from 30.00 GiB (7680 extents) to 35.00 GiB (8960 extents).
Logical volume mylv successfully resized