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

Re: dd/lvm question



On Wed, 2008-04-02 at 16:07 -0500, Koree A. Smith wrote:
> I asked a related question here a while back, but I never truly solved
> this issue, and came at it from a different angle.  Here's what I want
> to do:
> 
> 1.  I have a linux server with two drives, one is sda, the other sdb.
> The drives are *identical*
> 2.  I want to dd sda to sdb
> 3.  I want to be able to boot either sda or sdb
> 4.  I want to be able to script a regular (daily, weekly, monthly) dd
> to keep the second image fresh
> 
> I have played around with this, and here are the challenges
> 
> 1.  the dd works fine.  However, it creates duplicate UUIDs (duh), so
> when the system boots, it gives a message like " Found duplicate PV
> PnvnzL7YFft76Ky0EaPbOh519SQD5Uxc: using /dev/sdb2 not 
> /dev/sda2 "
> 2.  I found some workarounds using the lvm.conf file's filters, but
> those aren't really going to work for what I want to do, as I'm not
> allowed to re-roll the initrd to do this.
> 3.  pvchange -u should work fine, but I am having a challenge there.
> To make it work, one has to umount anything on it (easy), and disable
> the VGs on it (easy too).  I then try to do the "pvchange
> -u /dev/sdb2" command, and it says that isn't a valid PV.  The only
> thing that has to happen is for the UUIDs to change (hard) and the
> ext3 labels to change (easy).
> 
> Anyone got a clue how to get past this?
> 

Koree,

It sounds to me like LVM is more of a hindrance in this case than a
benefit. Have you considered using dd mirroring to /dev/sdb without LVM?
You would probably have to set up an separate boot stanza in grub to
boot /dev/sdb1 rather than /dev/sda1, but that would probably be fairly
simple.

--Doc


-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.