[linux-lvm] Using LVM Mirroring to obtain a usable backup

Brian J. Murrell brian at interlinx.bc.ca
Thu Sep 17 15:34:14 UTC 2009


On Thu, 2009-09-17 at 11:06 -0400, Stuart D. Gathman wrote:
> Using dd from a snapshot does not help the OP.

Right.

> He says the dd will take
> 5-6 hours, and he needs a backup of the system *just before* the upgrade,
> not hours before.

Which a snapshot will achieve.

> The rollback also needs to be quick.

Which a snapshot will achieve.

> A snapshot with dd does the "instant" backup part ok, but rollback
> requires 5-6 hours to copy the snapsnot to a normal LV.

Why would you copy the snapshot anywhere?  If you decided you needed a
roll-back, you boot from the snapshot of the root filesystem and have
the /etc/fstab in that snapshot mount any snapshots of other filesystems
he might have made.  Personally, I keep separate /, /usr, and /var and
so snapshot them all before an upgrade and fix up the /etc/fstab in the
snapshot-of-/ to mount the /usr and /var snapshots (rather than the
origins).

AFAICT, the only issue the OP has with snapshots is that he fears an
upgrade might screw up his LVM configuration.  Personally, I think that
is a low-probability fear, but everyone has to have their own comfort
level I guess.

> The OP is correct that creating and breaking a RAID1 mirror does what
> he needs.

Indeed.

> I always build my VGs on md* devices.

I typically have not.  I typically don't mirror anything except my
backup volume, which fully (as in bare metal restore able) backs up
every filesystem I have in my network.  For that reason I feel that
mirroring the disks in all the machines is overkill.

But granted, building systems on broken mirrors is easy enough and
allows one the flexibility of mirroring at a later date if one wants.

In fact I always thought/felt, that given that the MD superblock is at
the end of a device (or partition), shrinking the filesystem on a
partition and then trying to create an MD mirror with that partition
should be doable.  Never tried though.

b.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20090917/d8d98992/attachment.sig>


More information about the linux-lvm mailing list