标签:管理器 ice art windows existing body img ldap cow
一,宿主机扩容虚拟机系统盘环境 | 文件系统 |
---|---|
CentOS 7 | XFS |
1.1查看虚拟机(以下操作在宿主机上)
[root@office-prd-kvm-01 ~]# virsh list
4 office-com-ldap-01 running
1.2查看虚拟机系统盘
[root@office-prd-kvm-01 ~]# virsh domblklist office-com-ldap-01
目标 源
------------------------------------------------
vda /home/office-com-ldap-01/office-com-ldap-01.system.qcow2
hda -
1.3原始系统盘大小
[root@office-prd-kvm-01 ~]# qemu-img info /home/office-com-ldap-01/office-com-ldap-01.system.qcow2
virtual size: 15G (16106127360 bytes)
[root@office-prd-kvm-01 ~]# virsh shutdown office-com-ldap-01 很重要要先关闭虚拟机
1.4扩容后
[root@office-prd-kvm-01 ~]# qemu-img resize /home/office-com-ldap-01/office-com-ldap-01.system.qcow2 +5G
[root@office-prd-kvm-01 ~]# qemu-img info /home/office-com-ldap-01/office-com-ldap-01.system.qcow2
virtual size: 20G (21474836480 bytes)
[root@office-prd-kvm-01 ~]# virsh start office-com-ldap-01
二,虚拟机内查看(以下操作在kvm虚拟机中)
2.1查看是否增加
2.2给未分配的空间分区
2.3刷新分区表
[root@office-com-ldap-01 ~]# partprobe
2.4添加到卷组(dev/centos/root)
[root@office-com-ldap-01 ~]# pvcreate /dev/vda3
Physical volume "/dev/vda3" successfully created.
[root@office-com-ldap-01 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/vda2 centos lvm2 a-- <9.00g 0
/dev/vda3 lvm2 --- 5.00g 5.00g
[root@office-com-ldap-01 ~]# vgextend centos /dev/vda3
Volume group "centos" successfully extended
[root@office-com-ldap-01 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
centos 2 2 0 wz--n- 13.99g <5.00g
[root@office-com-ldap-01 ~]# lvextend -l +100%FREE /dev/mapper/centos-root
New size given (1279 extents) not larger than existing size (2047 extents)
[root@office-com-ldap-01 ~]# xfs_growfs /dev/mapper/centos-root
[root@office-com-ldap-01 ~]# df -Th
三,windows打开磁盘管理器点击合并卷就可以了比linux简单
标签:管理器 ice art windows existing body img ldap cow
原文地址:https://blog.51cto.com/zhangchengjie/2404253