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

Re: dd/lvm question



On Wed, Apr 02, 2008 at 04:07:29PM -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

As you've probably noticed, this just isn't going to work the way you're
doing it.  Besides, it can't work live, because dd from sda to sdb will
result in an inconsistent image, unless you are doing it from a live CD
or something, in which case just disconnect sdb after you're done.

  http://www.addonics.com/products/mobile_rack/aesnapmrsa.asp

Otherwise, you need to attack this from a different angle.  My first
suggestion would be to just set up a RAID1 and be done with it.  That
keeps the "image" as fresh as it can get, and it lets you boot from
either drive.

Suggestion #2 would be to just use LVM like you're supposed to.  :-)
Create a volume group on /dev/sdb2 with a different name, create logical
volumes, and, if you want to make it easy, just make snapshot LVs of the
running system and dd the snapshots over to the "mirror" LVs.

The even quicker solution would be to use rsync instead of dd to copy
the snapshot LVs over.

See also http://backuppc.sourceforge.net/.

Steve
-- 
steve@silug.org           | Southern Illinois Linux Users Group
(618)624-4440             | See web site for meeting details.
Steven Pritchard          | http://www.silug.org/

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