拓展卷组
查看下卷组信息
[root@evan-01 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
centos 1 2 0 wz--n- <19.00g 0
vg1 2 1 0 wz--n- 1.99g <1.70g
[root@evan-01 ~]#
当逻辑卷持续增大,增大到超过卷组大小的时候,我们就得想办法来拓展卷组
[root@evan-01 ~]# fdisk -l /dev/sdb
Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x6f975573
Device Boot Start End Blocks Id System
/dev/sdb1 2048 2099199 1048576 8e Linux LVM
/dev/sdb2 2099200 4196351 1048576 8e Linux LVM
/dev/sdb3 4196352 6293503 1048576 8e Linux LVM
[root@evan-01 ~]#
我们给 sdb1 和 sbd2 组成了卷组,现在还剩一个 sdb3 ,我们把 sdb3 添加进去
添加到vg1
[root@evan-01 ~]# vgextend vg1 /dev/sdb3
Volume group "vg1" successfully extended
[root@evan-01 ~]#
查看下vg1
[root@evan-01 ~]# vgdisplay
--- Volume group ---
VG Name centos
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size <19.00 GiB
PE Size 4.00 MiB
Total PE 4863
Alloc PE / Size 4863 / <19.00 GiB
Free PE / Size 0 / 0
VG UUID WR4onu-xheI-7NwR-5vW1-y0Ek-eilK-Yil3A2
--- Volume group ---
VG Name vg1
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 3
Act PV 3
VG Size <2.99 GiB
PE Size 4.00 MiB
Total PE 765
Alloc PE / Size 75 / 300.00 MiB
Free PE / Size 690 / <2.70 GiB
VG UUID NqGfri-SPW4-rw52-bQCE-YcxO-i0sH-cJkPfX
[root@evan-01 ~]#
用vgs查看
[root@evan-01 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
centos 1 2 0 wz--n- <19.00g 0
vg1 3 1 0 wz--n- <2.99g <2.70g
[root@evan-01 ~]#