一.LVM创建过程
1.首先在分区上创建物理卷
[root@wenqing ~]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d7ee8
Device Boot Start End Blocks Id System
/dev/sda1 1 523 4194304 8e Linux LVM
Partition 1 does not end on cylinder boundary.
/dev/sda2 * 523 5222 37747712 83 Linux
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_wenqing-LogVol00: 4290 MB, 4290772992 bytes
255 heads, 63 sectors/track, 521 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
#这里使用/dev/sdb分区
https://www.cndba.cn/Expect-le/article/109
2.建立物理卷
[root@wenqing ~]# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created
3.使用物理卷建立卷组
[root@wenqing ~]# vgcreate oslvm /dev/sdb
Volume group "oslvm" successfully created
[root@wenqing ~]# vgs
VG #PV #LV #SN Attr VSize VFree
oslvm 1 0 0 wz--n- 10.00g 10.00g
vg_wenqing 1 1 0 wz--n- 4.00g 0
4.在卷组中建立逻辑卷
[root@wenqing ~]# lvcreate -L 500M -n ruyan oslvm
Logical volume "ruyan" created.
[root@wenqing ~]# lvs
LV VG Attr LSize Pool Orig