创建lvm分区一例 1、添加三块硬盘到服务器
2、用fdisk -l 查看一下分区情况
复制代码代码如下:
Disk /dev/sdc: 1073 MB, 1073741824 bytes Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sdd: 1073 MB, 1073741824 bytes Disk /dev/sdd doesn't contain a valid partition table
Disk /dev/sde: 1073 MB, 1073741824 bytes Disk /dev/sde doesn't contain a valid partition table
3、添加三块硬盘
4、重新查看一下磁盘使用情况:
复制代码代码如下:
[root@sendmail ~]# fdisk -l
Device Boot Start End Blocks Id System
Disk /dev/sdb: 1073 MB, 1073741824 bytes
Device Boot Start End Blocks Id System
Disk /dev/sdc: 1073 MB, 1073741824 bytes
Device Boot Start End Blocks Id System
Disk /dev/sdd: 1073 MB, 1073741824 bytes
Device Boot Start End Blocks Id System
Disk /dev/sde: 1073 MB, 1073741824 bytes
Device Boot Start End Blocks Id System
5、内核重新载入三块磁盘的分区表
复制代码代码如下:
[root@sendmail ~]# kpartx -a /dev/sdc
[root@sendmail ~]# kpartx -a /dev/sdd [root@sendmail ~]# kpartx -a /dev/sde
6、pvcreate
9、格式化三个分区
复制代码代码如下:
mkfs.ext4 /dev/sdc1
mkfs.ext4 /dev/sdd1 mkfs.ext4 /dev/sde1 |