LVS_VG扩容及缩减

实验环境
                虚拟机软件:VMware Workstation
                操作系统:Read Hat Enteprise 6.3




1.查看pvs信息 
[ root@template ~]# pvs 
PV VG Fmt Attr PSize PFree 
/dev/sda2 vg_template lvm2 a-- 199.51g 141.57g 
/dev/sdb1 vg_template lvm2 a-- 100.00g 100.00g 
2.移动sdb1上的数据
[ root@template ~]# pvmove /dev/sdb1 
No data to move for vg_template
3.从vg移除sdb1
[ root@template ~]# vgreduce vg_template /dev/sdb1 
Removed "/dev/sdb1" from volume group "vg_template" 
4.移除sdb1的pv
[ root@template ~]# pvremove /dev/sdb1 
Labels on physical volume "/dev/sdb1" successfully wiped 
[ root@template ~]# pvs 
PV VG Fmt Attr PSize PFree 
/dev/sda2 vg_template lvm2 a-- 199.51g 141.57g 


1.创建sdb1为pv
[ root@template ~]# pvcreate /dev/sdb1 
Writing physical volume data to disk "/dev/sdb1" 
Physical volume "/dev/sdb1" successfully created 
2.将sdb1加入vg
[ root@template ~]# vgextend vg_template /dev/sdb1 
Volume group "vg_template" successfully extended 
3.查看vg大小
[ root@template ~]# vgs 
VG #PV #LV #SN Attr VSize VFree 
vg_template 2 3 0 wz--n- 299.50g 241.57g 
[ root@template ~]# pvs 
PV VG Fmt Attr PSize PFree 
/dev/sda2 vg_template lvm2 a-- 199.51g 141.57g 
/dev/sdb1 vg_template lvm2 a-- 100.00g 100.00g



来自为知笔记(Wiz)


你可能感兴趣的:(LVS_VG扩容及缩减)