[TriLUG] RAID-LVM-LUKS slides

Alan Porter porter at trilug.org
Fri Jan 14 09:54:36 EST 2011


The slides for last night's talk (and many others) are here:

http://trilug.org/~porter/meetings/

I enjoyed giving the presentation... I learned something new.
We had a lot of questions about LVM snapshots, and in
answering them, something became a lot clearer in my mind.

LVM snapshots can be used in three different ways:

(1) Make a snapshot of a volume, and continue writing to the
original.  This is what I presented, backing up a root filesystem
while it was being written to.

(2) Make a snapshot, and write to the new snapshotted copy.
This is how you make a pristine image and then let various VM's
use their own copy, writing their diffs to their own snapshot
volume.

(3) Some combination of writing to the original volume and
writing to the snapshot volume.  They just diverge.

In all of these cases, the "diffs" are written to the snapshot
volume.  If you mount the snapshot volume, you'll see the entire
contents of the original + diffs.  But under the covers, it only
has to store the diffs.

If changes occur to the snapshot itself, that's easy, LVM just
stores those changes in the snapshot volume.  But if changes
are made to the original volume, then LVM does two writes -- it
stores the OLD block in the snapshot volume and writes the
NEW block to the original volume.

Confusing, huh?  Not really, not if you just think of the snapshot
volume as containing all of the "diffs" between the original and
the new copy.

Either way, if you mount the volumes, you'll see the all of the
contents.  The clever bit is just in the LVM implementation, and
how it uses your disk very efficiently, without keeping two copies
of the same data.

Thanks for showing up last night.

Next month, stay tuned... we have Ryan Linn, a security engineer
from SAS, who will show us the hacker's Live CD, "BackTrack4".
Join us as he demonstrates "Metasploit", a tool to quickly and
efficiently break into unsecured (Windows) computers.  Can you
say "pwn3d" ?

Alan






.




More information about the TriLUG mailing list