Before creating an LVM physical volume, the disk must first be configured with type Linux LVM. This can be accomplished with fdisk, gdisk, or parted. Here are the steps on how to set /dev/sdb1 to type Linux LVM using fdisk.
The fdisk command can be used to verify that /dev/sdb1 is now type Linux LVM.
~]# fdisk -l /dev/sdb
Device Boot Start End Blocks ID System
/dev/sdb1 2048 10141474 531553 8e Linux LVM
Install LVM.
~]# yum install lvm2
The pvcreate command can be used to create LVM physical volumes.
~]# pvcreate /dev/sdb1
The pvdisplay command can be used to verify that /dev/sdb1 was added as an LVM physical volume.
~]# pvdisplay
---Physical volumes---
PV Name /dev/sdb1
VG Name
PV Size 15.51 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 3970
Free PE 10
Allocated PE 3960
PV UUID uIlzqI-ff0q-xAcl-CYLG-FJMV-tRxf-Ub1sd1
Next, create a volume group.