LVM
Create Logical Volume
You need to create multiple entities to achive a logical volume. First you need to create a physical volume, then a volume group and last but not least a volume group.
pvcreate /dev/sdb1
vgcreate vg0 /dev/sdb1
lvcreate -L10G -nlv0 vg0
Extend Logical Volume
Let's extend the now created logical volume to 20GB. You can use both of the following syntax for this task.
lvextend -L20G /dev/vg0/lv0
lvextend -L+10G /dev/vg0/lv0
Or if you desire to assign every bit of free space in the volume group to the logical volume.
lvextend -l+100%FREE /dev/vg0/lv0
Change Physical Volume
If you want to change the disk underlying the lvm, you would like to use something like this.
pvcreate /dev/sdc1
vgextend vg0 /dev/sdc1
pvmove /dev/sdb1
vgreduce vg0 /dev/sdb1
Create Mirror from existing Volume
Pretty useful if you don't want to go through the pain of configuring MD RAID - especially since both are pretty much as performant as the other because both use device-mapper.
pvcreate /dev/sdc1
vgextend vg0 /dev/sdc1
lvconvert --type raid1 -m 1 /dev/vg0/example