Create an LVM physical volume

Home > Search
  by

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.

  1. In Terminal, type fdisk /dev/sdb1.
  2. Press t (type) and press enter.
  3. Press 8e (Linux LVM) and press enter.
  4. Press w (write) and press enter.

 

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.

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments