BackupPC-users

Re: [BackupPC-users] Block-level rsync-like hashing dd?

2011-04-12 18:47:52
Subject: Re: [BackupPC-users] Block-level rsync-like hashing dd?
From: Timothy J Massey <tmassey AT obscorp DOT com>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Tue, 12 Apr 2011 18:44:06 -0400
"Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org> wrote on 04/12/2011 05:10:15 PM:

> Timothy J Massey wrote at about 15:40:05 -0400 on Tuesday, April 12, 2011:
>  > "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org> wrote on 04/10/201101:57:01
>  > PM:
>  >
>  > > The only problem with dd is that you would generally need to either
>  > > make a "snapshot" (e.g., using lvm2) or shutdown BackupPC and unmount
>  > > the drives to assure a perfect partition copy.
>  >
>  > You always have to unmount (for it to work correctly, anyway), whether
>  > you're dd'ing the partition raw or using LVM.  The difference with LVM is
>  > that you only have to have it umounted for a brief moment, and without it
>  > for the entire time of the DD.
>
> Well with LVM, if you have a dedicated BackupPC partition, it should
> be sufficient to make sure no backup (or backuppc nightly process) is
> running and that you are not at one of the round-number o'clock wakeup
> times, then just doing a 'sync' followed by a lvm-snapshot should be
> sufficient. I agree though that unmounting would be simpler though and
> less likely to make mistakes.


Last I looked, if you dd a LVM snapshot of an EXT2/3 partition that is mounted R/W, it will be marked dirty on mount.  If this is not the case, then yes, quiescing BackupPC is enough.

However, we're talking about *backup* here.  I'm not a big fan of "should be OK":  I'd rather unmount the partition!  :)

>  > > I'm not sure though how a 'dd' of an lvm2 snapshot works and what you
>  > > would need to do on the new drive to get it to mount.
>  >
>  > The same thing you'd have to do in any other case:  mount it!  :)
>
> Well with 'dd' I typically do *not* mount it. I do a dd on the
> unmounted partition (to ensure it is stable). I guess my question is
> whether I can do the same on an unmounted lvm partition using
> /dev/lvm-pv/lvm-vg format. I imagine I can...


A snapshot partition is indistinguishable from the same partition before the snapshot.  So go nuts.

> That being said, I have found that at least on my slow machines,
> lvm-snapshots add a significant slowdown tax...

It's not a "slow machine" thing, it's a spindle thing.  If you put the log volume on a dedicated spindle (and *not* a crummy USB drive!), the performance is high, even on slow machines (such as a VIA EPIA system).

Most people think, "Oh look:  I'll keep some space free at the end of my VG for snapshots!"  Epic fail, basically no matter *how* fast the hardware is...  unless you've got a full SAN below it--in which case, why are you screwing around with LVM?!?  That's what your NetApp Filer/EMC Clariion/whatever is for! :)

Timothy J. Massey
 
Out of the Box Solutions, Inc.
Creative IT Solutions Made Simple!

http://www.OutOfTheBoxSolutions.com
tmassey AT obscorp DOT com
      22108 Harper Ave.
St. Clair Shores, MI 48080
Office: (800)750-4OBS (4627)
Cell: (586)945-8796

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/
<Prev in Thread] Current Thread [Next in Thread>