From: Lars Ellenberg <linux-lvm@linbit.com>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] Restore LVM snapshot without creating a full dumpto an "external" device?
Date: Mon, 10 Mar 2008 17:32:00 +0100 [thread overview]
Message-ID: <20080310163200.GE5426@barkeeper1.linbit> (raw)
In-Reply-To: <A374F37068535C46BFCF8D48CF29AA7FB358AF@zen.zetex.com>
On Mon, Mar 10, 2008 at 10:43:18AM -0000, Karl Wagner wrote:
> That is almost exactly what I was after.
>
> Just one thing though... If I was to just take a backup of the COW
> device, assuming the underlying origin had not changed, would I just be
> able to restore this? (i.e. gzip < /path/to/cowdevice >
> /path/to/backupfile.gz and restore with zcat /path/to/backup/file.gz >
> /path/to/cowdevice, or similar.) Would this work with a newly created
> snapshot? (ie backup as above then lvcreate -s -n newsnapshot
> /path/to/origin; zcat /path/to/backup/file.gz > /path/to/new/cow/device)
>
> I will just emphasize that the UNDERLYING ORIGIN WILL NEVER CHANGE, it
> is never mounted, never used for anything except as a snapshot origin.
won't work "just so."
just because you are messing with the storage does not mean the
in-kernel exception tables would be updated magically.
I mean, the equivalent is to dd back a file system image backup
below a mounted file system...
it may be possible to
lvcreate -s -n newsnapshot /path/to/origin
dmsetup table $that-new-snapshot
remember it.
dmsetup remove snapshot.
zcat image.gz > snapshot-cow
sync!!! maybe rather zcat | dd oflag=sync
dmsetup create snapshot with identical table again.
that in theory should make it read the
(just restored from backup) exeption table from storage again.
but I never tried.
and I think it is scary :-)
--
: Lars Ellenberg http://www.linbit.com :
: DRBD/HA support and consulting sales at linbit.com :
: LINBIT Information Technologies GmbH Tel +43-1-8178292-0 :
: Vivenotgasse 48, A-1120 Vienna/Europe Fax +43-1-8178292-82 :
prev parent reply other threads:[~2008-03-10 16:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-10 10:43 [linux-lvm] Restore LVM snapshot without creating a full dumpto an "external" device? Karl Wagner
2008-03-10 16:32 ` Lars Ellenberg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080310163200.GE5426@barkeeper1.linbit \
--to=linux-lvm@linbit.com \
--cc=linux-lvm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).