1、MBR最多支持2T硬盘,大于2T的硬盘需要GPT格式。
GPT硬盘转MBR:
parted /dev/sdb mktable msdos
MBR硬盘转GPT:
parted /dev/sdb mktable gpt
2、LVM的逻辑为:PV(Physical Volume)物理卷—VG(Volumne Group)卷组—LV(Logical Volume)- 逻辑卷 ,如图所示
3、操作步骤
#!/bin/bash
for i in `cat ssd.txt`
do
parted $i mklabel gpt
parted $i mkpart 1 xfs 0G 4000G
parted $i p
done
pvcreate /dev/sdb1 /dev/sdd1 /dev/sdc1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 /dev/sdj1 /dev/sdk1 /dev/sdl1 /dev/sdm1
vgcreate zone /dev/sdb1 /dev/sdd1 /dev/sdc1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 /dev/sdi1 /dev/sdj1 /dev/sdk1 /dev/sdl1 /dev/sdm1
lvcreate -n datav1 -l 100%FREE zone
yum -y install xfsprogs
mkfs.xfs /dev/zone/datav1
mount /dev/zone/datav1 /zone
4、测试性能
测试写100G: dd if=/dev/zero of=/zone/test bs=100M count=1000
测试读写: dd if=/zone/test of=/zone/test1 bs=100M count=1000