Adventures in LVM

In recent times I have been using Logical Volume Management (LVM) on Linux as a very flexible way of operating a flexible file system. LVM is a very powerful way of dynamically adding and removing disk from a Linux server (or desktop). Rather than mounting individual devices in different parts of the file system LVM lets you place all your physical disk drives together into virtual pools. Inside these pools you can dynamically divide the space up however your like and format each partition in any of the available Linux file formats.

It is a great way to work with disk resources and is very similar to Novell's Network Storage Services (NSS) volumes (minus the very useful 'salvage' tool). To get around the lack of a salvage tool you can create regular snapshots of your data. These snapshots are like CVS branches in that rather than creating a separate copy of the data a snapshot tracks what has changed on disk from a particular time.
For example to create a snapshot of your 'data' volume you perform the following command (Note: you must have the dm-snapshot module loaded into the kernel):

lvcreate -L10G -s -n salvage /dev/system/data