Labels on physical volume "/dev/sdb2" successfully wiped
----------------------------------------------------------------------
三、卷组(VG)创建及管理具体操作步骤:
1)使用vgcreate将物理卷转化为卷组
[root@RHEL5 /]# vgcreate vg01 /dev/sdb{1,2} #将已经是物理卷的/dev/sdb{1,2}转化为卷组名为vg01的卷组
Volume group "vg01" successfully created
备注:以上未加参数,扩展块(PE)大小默认4M,若通过 vgcreate -s 8M vg01 /dev/sdb{1,2},则指定了扩展块大小为8M
2)使用vgdisplay 查看所有卷组详细信息
[root@RHEL5 /]# vgdisplay #看所有卷组详细信息
--- Volume group ---
VG Name vg01
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 7.66 GB
PE Size 4.00 MB
Total PE 1960
Alloc PE / Size 0 / 0
Free PE / Size 1960 / 7.66 GB
VG UUID 1g8QL0-0cGM-TJji-Q98P-LJ3f-PhDN-2ouSM3
--- Volume group ---
VG Name VolGroup00
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 39.88 GB
PE Size 32.00 MB
Total PE 1276
Alloc PE / Size 1276 / 39.88 GB
Free PE / Size 0 / 0
VG UUID AhhisY-vDrc-s4jx-XIsn-QmCp-wMiT-2v01YZ
备注:也可以通过 [root@RHEL5 /]# vgdisplay -v /dev/vg01 查看具体某一卷组详细信息
3)查看卷组信息
[root@RHEL5 /]# vgscan #查看卷组信息
Reading all physical volumes. This may take a while...
Found volume group "vg01" using metadata type lvm2
Found volume group "VolGroup00" using metadata type lvm2
4)扩展卷组vgextend,将某个物理卷添加到已存在的卷组中
[root@RHEL5 /]# pvcreate /dev/sdb3 #创建一个新的物理卷
Physical volume "/dev/sdb3" successfully created
[root@RHEL5 /]# vgextend vg01 /dev/sdb3 #将新增的物理卷添加到vg01卷组中
Volume group "vg01" successfully extended
-----------------------------------------------------------------------
使用vgremove删除卷组
[root@RHEL5 /]# vgremove /dev/vg01
Volume group "vg01" successfully removed
-----------------------------------------------------------------------
四、逻辑卷(LV)创建及管理具体操作步骤:
1)创建逻辑卷大小为6G卷名为data,从vg01生成
[root@RHEL5 /]# lvcreate -L 6G -n data vg01 #从卷组vg01上划分6G的空间为逻辑卷data
Logical volume "data" created
2)对划分的逻辑卷进行格式化
|