User Tools

Site Tools


linux:linux-san:lvm

Using LVM

LVM is Linux's Volume Management. It is a default during installation

Creating a new LVM

This is done in 3 main steps

- Create a new partition on a disk and marking as type 8e then run 
pvcreate /dev/sdX#

- Create a new Volume group set run **vgcreate **

Extend a LVM

To extend a lvm you need to extend the volume group this is done by adding a new partition to it. Once you have the partition created run

lvextend -l +100%FREE -r  /dev/volume-group-name/logical-volume-name

found another interesting way to extend a disk.

If you have added a whole new partition that you want to use to extend a partition you can just vdo

lvextend -r /dev/volume-group-name/logical-volume-name /dev/sdX

The -r option is to run a resize2fs on the exntension.If you do not use it you need to run

resize2fs /dev/volume-group-name/logical-volume-name
linux/linux-san/lvm.txt · Last modified: by 127.0.0.1