注意:部分文章发布时间较长,可能存在未知因素,购买时建议在本站搜索商家名称,先充分了解商家动态。
交流:唯一投稿邮箱:hostvps@88.com。
-
使用df -h可以查看到/home已经独立出来了,而且使用的lv 还是/dev/mapper/centos-home
-
扫描出新增加的磁盘
echo "- – -" > /sys/class/scsi_host/host0/scan
然后使用fdisk -l命令查看
-
新建pv
[root@localhost ~]# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created.
[root@localhost ~]#
-
查询出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 ~]#
-
lvdisplay 获取到有用的信息 LV Path
/dev/centos/home
-
[root@localhost ~]# lvextend -l +262144 /dev/centos/home
Size of logical volume centos/home changed from 46.99 GiB (12030 extents) to <1.05 TiB (274174 extents).
Logical volume centos/home successfully resized.
-
刷新前面都执行df -h看下/home 分区磁盘空间的变化
xfs_growfs /dev/centos/home
END