LVM Cheatsheet Print

  • lvm, centos, storage, linux
  • 0

To install LVM2 in CentOS/Redhat servers:

yum install lvm2

1. Add a partition to physical storage/volume:

pvcreate /dev/sdb1 /dev/sdb2

2. Create volume group

vgcreate vg0 /dev/sdb2

(mention the partition where you want the volume group to be present)

3. Create logical volume:

lvcreate -L500G -n lv0 vg0

-n mentions the name of the logical volume.

4. Format your newly created logical volume:

mkfs.ext4 /dev/vg0/lv0

Was this answer helpful?

« Back