1、使用df -h可以查看到/home已经独立出来了,而且使用的lv 还是/dev/mapper/centos-home
2、扫描出新增加的磁盘echo "- - -" > /sys/class/scsi_host/host0/scan然后使用fdisk -l命令查看
3、新建pv[root@localhost ~]# pvcreate /dev/sdb Physical volume "/dev/sdb" successfully created.[root@localhost ~]#
4、查询出vg 艘绒庳焰name 是centos然后进行“附加”[root@localhost ~]# vgdisplay --- Volume group --- VG Name centos System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 3 Open LV 3 Max PV 0 Cur PV 1 Act PV 1 VG Size <99.00 GiB PE Size 4.00 MiB Total PE 25343 Alloc PE / Size 25342 / 98.99 GiB Free PE / Size 1 / 4.00 MiB VG UUID BtBpfs-41RI-aOOZ-LWix-20mW-R81z-bjPZqB [root@localhost ~]# vgextend centos /dev/sdb Volume group "centos" successfully extended[root@localhost ~]#
5、lvdisplay 获取到有用的信息 LV Path/dev/centos/home
6、[root@localhost ~]# lvextend -l +262144 /dev/centos/home Size of logical volume centos/home chan爿讥旌护ged from 46.99 GiB (12030 extents) to <1.05 TiB (274174 extents). Logical volume centos/home successfully resized.
7、刷新前面都执行df -h看下/home 分区磁盘空间的变化xfs_growfs /dev/centos/home