Software RAID and LVM on Linux

(the joy of disk virtualization)

David W. Aquilina

dwa@trilug.org

October TriLUG Presentation

Introduction

Platforms

Experimenting without a SAN

Software RAID

RAID Levels

MD demonstrations

MD Demos Continued

Logical Volume Management

LVM Structure

 
 
 
Logical Volume FooLogical Volume BazLogical Volume Bar
Volume Group One
Physical Volume md0Physical Volume md1Physical Volume md2Physical Volume md3

Creating a Logical Volume

  1. Create the physical volume: pvcreate /dev/md0
  2. Create a volume group and include the PV: vgcreate TriVG /dev/md0
    • PVs can be added to existing volume groups with the vgextend command.
  3. Create the logical volume out of the above volume group: lvcreate -n lv01 -L 512M TriVG
  4. Create a filesystem on the device as you would any other block devices: mkfs -j /dev/TriVG/lv01

LVM Features

LVM Snapshot Tricks

Ways to Shoot Yourself in the Foot

Any questions?

Colophon