[root@Centos7 dev]# pvcreate /dev/sdb /dev/sdc
Physical volume "/dev/sdb" successfully created.
Physical volume "/dev/sdc" successfully created.
//指定那几块硬盘加入 物理卷
[root@Centos7 dev]# vgcreate 300G /dev/sdb /dev/sdc
Volume group "300G" successfully created
//创建 一个卷组,名字300G,将出现在 /dev 下面
[root@Centos7 dev]# vgdisplay
--- Volume group ---
VG Name cl
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 20.95 GiB
PE Size 4.00 MiB
Total PE 5363
Alloc PE / Size 5362 / 20.95 GiB
Free PE / Size 1 / 4.00 MiB
VG UUID yePmEL-JDnu-cTAY-1EsZ-4fMg-LQvk-PUEHML
--- Volume group ---
VG Name 300G
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 299.99 GiB
PE Size 4.00 MiB
Total PE 76798
Alloc PE / Size 0 / 0
Free PE / Size 76798 / 299.99 GiB
VG UUID gisqra-Zb30-u61B-cDWR-kBlM-79oU-ugr7ei
//显示卷组
[root@Centos7 dev]# lvcreate -L 290G 300G -n D
Logical volume "D" created.
//创建一个逻辑卷 名字 D,将出现在/dev/300G下面
[root@Centos7 mapper]# mkfs.xfs /dev/300G/D
meta-data=/dev/300G/D isize=512 agcount=4, agsize=19005440 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=76021760, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=37120, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@Centos7 mapper]# mount /dev/300G/D /mnt
[root@Centos7 mapper]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cl-root 19G 1.3G 18G 7% /
devtmpfs 743M 0 743M 0% /dev
tmpfs 754M 0 754M 0% /dev/shm
tmpfs 754M 8.4M 745M 2% /run
tmpfs 754M 0 754M 0% /sys/fs/cgroup
/dev/sda1 1014M 140M 875M 14% /boot
tmpfs 151M 0 151M 0% /run/user/0
/dev/mapper/300G-D 290G 33M 290G 1% /mnt
//可以使用了 ,永久使用需要编辑 /etc/fstab ,注意mount -a测试