Linux LVM users
 help / color / mirror / Atom feed
From: Tim Post <echo@echoreply.us>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] LVM snapshot?
Date: Mon, 22 Dec 2008 02:34:27 +0800	[thread overview]
Message-ID: <1229884467.5412.26.camel@localhost.localdomain> (raw)
In-Reply-To: <alpine.LFD.2.00.0812210927010.3626@tigger.tntechs.com>

On Sun, 2008-12-21 at 09:33 -0500, Tom Diehl wrote:
> Hi,
> 
> I have a machine that is running EL5 with xen. One of the DOMU's has an LV
> from DOM0 mounted on it to allow access to the data. Is it safe to do 
> a snapshot of the LV from DOM0 while it is still mounted rw on the DOMU?

Yes, provided:

1 - You send a sysrq 's' to the guest to sync anything dirty
2 - You pause the guest prior to taking the snapshot

After taking the snapshot, of course unpause the guest. I have a tool
that I wrote using libxenctrl / liblvm2cmd which does this very quickly,
if you'd like it I'll send you the source code when I get back to my
office next week. Its also rather easy to export mount stats (how much
is used on any given mount) via xenbus, which helps automatically size
the snapshots from dom-0.

A fsck -n /dev/xvda(x) within the running guest itself should tell you
(more reliably) if any problems exist, depending on the file system and
journal mode. It need not run completely, ~15 seconds in you'll be able
to tell and just ctrl-c. Moreover, this gives you a general indication
of how big the downtime window should be. Plus, the i/o of the test is
in the dom-u, which is better.

A "All Clean" message will look like the normal "clean" message, plus a
warning that journal recovery is not possible since fsck is not going to
make any changes to the FS.

HTH

Cheers,
--Tim

  reply	other threads:[~2008-12-21 18:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-21 14:33 [linux-lvm] LVM snapshot? Tom Diehl
2008-12-21 18:34 ` Tim Post [this message]
2008-12-23  0:15   ` [linux-lvm] LVM2 robustness w/ large (>100TB) name spaces? Steve Costaras
2008-12-23  1:24     ` Alasdair G Kergon
2008-12-23  1:33       ` Steve Costaras
2008-12-23 10:27     ` Marek Podmaka
2008-12-29  3:06       ` Steve Costaras

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=1229884467.5412.26.camel@localhost.localdomain \
    --to=echo@echoreply.us \
    --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