Tag: lvm

LVM snapshot performance

The Linux Logical Volume Manager (LVM) supports creating snapshots of logical volumes (LV) using the device mapper. Device mapper implements snapshots using a copy on write system, so whenever you write to either the source LV or the new snapshot LV, a copy is made first.

So a write to a normal LV is just a write, but a write to a snapshotted LV (or an LV snapshot) involves reading the original data, writing it elsewhere and then writing some metadata about it all.

This quite obviously impacts performance, and due to device mapper having a very basic implementation, it is particularly bad.  My tests show synchronous sequential writes to a snapshotted LV are around 90% slower than writes to a normal LV.

(more…)

Virtualized Storage Talk at WYLUG

I’m doing a talk tonight about virtualizing your storage with LVM on Linux at the West Yorkshire Linux User Group. Sorry about the short notice here (it was announced earlier in the week elsewhere though).

My mate Paul Brook is talking about RAID on Linux too.

Come along for the talk, or the beer, or the socialising – or all three.

Corrupted filesystem recovery dry-run with LVM snapshots

I have a corrupt Reiser filesystem that needs a tree rebuild on it, which can be a scary thing to do (and is only advised when you *really* do need to do it which, unfortunately, I do).

Now, this filesystem largely works, there is just a small part of it that causes problems when accessed. A rebuild could make things a lot worse, or it might just solve my problem (note: my problem appears NOT to be due to hardware failure. rebuilding the tree of a Reiser filesystem on hardware that has badsectors or whatever is VERY likely to make things worse. don’t do it).

So, I’m currently using the filesystem and avoiding the broken bit.  I need to know if one: how long a rebuild is going to take, so I can plan the downtime and two: will it complete sucessfully or will the world fall on my head.

LVM snapshots can help here and my filesystem in on a LVM logical volume.  The idea is to take a snapshot of the filesystem and run the rebuild on the snapshot.  Then you can decide whether you want to take the live filesystem down to rebuild that, or maybe you decide to update your backups best you can and start a new filesystem from scratch.

(more…)