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

dd/lvm question



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

--
Koree A. Smith, RHCE
--
koreesmith@gmail.com
koree@ameth.org