User Tools

Site Tools


lvm_handling

This is an old revision of the document!


General guide for LVM

Prepare new disk/VolumeGroup/Logical Volume

Prepare PV's with

pvcreate /dev/<device>

For FC LUN's use /dev/mapper/mpath<x> according to Red Hat DM Multipath Configuration & Administration

Create VG

vgcreate <vgname> -s <Physical Extent size> <path to PV>

Create LV

lvcreate --name <lvname> --size <xx>G <vgname>

Create filesytem

 mkfs.ext4 -F -b 4096 /dev/<vgname>/<lvname>

Depending on distribution use relevant ext2/ext3/ext4 file system type.

Resize existing Logical volume

Resize Physical Volume

 pvresize /dev/<device>

Extend Logical Volume

  lvextend -l 100%VG <lvname>

check man lvextend for further options

Extend filesytem which resides on Logical Volume

 resize2fs /dev/<vgname>/<lvname>
 

https://access.redhat.com/kb/docs/DOC-9855

lvm_handling.1307702330.txt.gz · Last modified: 2011/06/10 10:38 by root