[linux-lvm] LVM Mirror question
lars.ellenberg at linbit.com
Thu Nov 6 15:55:41 UTC 2008
On Wed, Nov 05, 2008 at 05:06:05PM -0500, Scot Kreienkamp wrote:
> Hi Everyone…
> I have a difficult LVM question that I’m wrestling with. Hopefully someone can
> I have two hosts with 50 gigs of local RAID5 storage. (I am using only local
> storage due to performance problems with our SAN, so shared storage is out of
> the picture.) I have that divided into three LVM partitions on each host, 5
> gigs for /, 5 gigs for swap, and 40 gigs mounted on /var/lib/pgsql. I need to
> do a real-time mirror of /var/lib/pgsql (LogVol02) to the second host. I was
> trying to use LVM to do that via Network Block Device. So on host2 I exported
> LogVol02 via NBD, and imported it into host1. I then added that to VolGroup00
> and used lvconvert to establish the mirror. That all worked great. The
> problem is that I don’t know how to reverse that process then and mount
> LogVol02 in host2 without destroying the partition, with or without NBD; the
> second host doesn’t have any information on the LVM partition so it wouldn’t
> know how to do anything with it. That’s where I’m stuck.
> Basically what I’m after is I need to do a real-time mirror of the postgres
> database volume to a second host for recovery in case of an emergency. If
> there’s a way I can use LVM to do this, or if someone can suggest a better way,
> I’m all ears.
You heard of DRBD?
A year from now (or some such) we may have some successor
of DRBD, better integrated with device-mapper and LVM, and
with some additional features -- at least that is the plan.
But right now, I think that just going with DRBD
is your best bet for this exact purpose.
(though obviously I'm biased.)
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
More information about the linux-lvm