LVM:逻辑卷管理,可以动态的管理分区,任意扩容
准备磁盘分区
1、[root@test76 ~]# fdisk /dev/sdb
2、命令n 创建3个分区为1G
Device Boot Start End Blocks Id System
/dev/sdb1 1 132 1060258+ 83 Linux
/dev/sdb2 133 264 1060290 83 Linux
/dev/sdb3 265 396 1060290 83 Linux
3、命令t 更改分区类型为8e
Command (m for help): t
Partition number (1-4): 3
Hex code (type L to list codes): 8e
Changed system type of partition 3 to 8e (Linux LVM)
Command (m for help): p
Disk /dev/sdb: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x3cdb107b
Device Boot Start End Blocks Id System
/dev/sdb1 1 132 1060258+ 8e Linux LVM
/dev/sdb2 133 264 1060290 8e Linux LVM
/dev/sdb3 265 396 1060290 8e Linux LVM
4、准备物理卷
[root@test76 ~]# pvcreate /dev/sdb1
Physical volume "/dev/sdb1" successfully created
[root@test76 ~]# pvcreate /dev/sdb2
Physical volume "/dev/sdb2" successfully created
[root@test76 ~]# pvcreate /dev/sdb3