Re: LVM Mirror question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> help.
> 
>  
> 
> 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?
 http://www.drbd.org

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.

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux