LVM Cheatsheet

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
  • howto, linux, centos, lvm
  • 0 أعضاء وجدوا هذه المقالة مفيدة
هل كانت المقالة مفيدة ؟

مقالات مشابهة

How to: Extend LVM partition

To increase the partition lv0 under volume group vg0 by 50GB, use lvextend command: lvextend...

How to: LVM Snapshot

LVM snapshot can be useful for filesystem integrity check and backups. A snapshot of size 15GB...

How to: Device Mapper Number to LV Name

It is often confusing when device mapper number appears while troubleshooting in place of logical...

How to: Repair a lvm thin pool

Sometimes there can be error like the following:Thin's thin-pool needs inspection.It can appear...

How to: List volume id or uuid in Linux

There are places where it is called volume id like r1soft, while most of the cases they are...