All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Bakuwel <jan.bakuwel@omiha.com>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] LVM corruption/diagnosis
Date: Thu, 07 Apr 2011 20:31:52 +1200	[thread overview]
Message-ID: <4D9D7678.20906@omiha.com> (raw)
In-Reply-To: <1302155264.27047.469.camel@localhost>

Hi Radu,


> I don't think that mapping the partitions with kpartx could affect the
> VM (that reads/writes to the LV directly).

I don't think so either but then I didn't think that not zeroing
unallocated block might make a difference either :-)

> But what I know for sure is that when you map a block device with
> kpartx, the "partition" devices that kpartx creates under /dev/mapper
> have different read/write caches than the original block device (the LV
> in your case).
>
> One issue that I experienced is that when you write data to a kpartx
> mapped device (partition) and some (or all) of the blocks that you write
> happen to be in the read cache of the original block device (the LV),
> then you'll read "old" data from the LV, even if you first unmap the
> partitions with kpartx -d.


The VM is the only entity accessing the LV.


> This issue can be simply addressed by using "blockdev --flushbufs" on
> the LV, after you do "kpartx -d" and before you use the LV (start the VM
> for instance).
>
> What type of image are you restoring? The whole LV (including its
> partition table) or just the partition inside the LV (perhaps with
> ntfsclone)? Because if you're restoring the partition (and not using
> "kpartx -d" and "blockdev --flushbufs", it's very likely that you ran
> into caching issues.


A full disc image including the partition table, boot block etc.

Will let you know how it goes.

best regards,
Jan

      reply	other threads:[~2011-04-07  8:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05  4:44 [linux-lvm] LVM corruption/diagnosis Jan Bakuwel
2011-04-06  8:53 ` Radu Rendec
2011-04-06 20:51   ` Jan Bakuwel
2011-04-06 21:32   ` Jan Bakuwel
2011-04-06 21:52     ` Ron Johnson
2011-04-07  2:06       ` Jan Bakuwel
2011-04-07  2:16         ` Ron Johnson
2011-04-07  5:47         ` Radu Rendec
2011-04-07  8:31           ` Jan Bakuwel [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=4D9D7678.20906@omiha.com \
    --to=jan.bakuwel@omiha.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.