LKML Archive on
help / color / mirror / Atom feed
From: "Marti Raudsepp" <>
To: "Lennart Sorensen" <>
Cc: "Kernel hackers" <>,
	fsdevel <>
Subject: Re: BUG: Files corrupt after moving LVM volume to USB disk
Date: Wed, 21 Mar 2007 18:15:47 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 3/21/07, Lennart Sorensen <> wrote:
> Not that I really have a clue, but some questions anyhow:
Thanks for your response; I will answer the remaining questions after I've
freed up some space on the USB disk and done some additional tests. Possibly
later today, or maybe tomorrow.

> Do you ever unmount and shutdown the lvm during this test?
> What happens if you were to build the LVM and filesystem, then issue the
> move, and then reboot.  Can you then read them from the USB device or is
> it still corrupt?
Yes, when I first came across this problem, I had done several reboots, prior
to and following the lvmove; the filesystem-level corruptions remained
afterwards (though, as reported, everything worked fine again after moving it

> Using any insane gentoo compiler options?
Nothing insane, just -fstack-protector -march=athlon64 -fomit-frame-pointer

> On Tue, Mar 20, 2007 at 12:34:08PM +0200, Marti Raudsepp wrote:
> > * Test partition is 68 extents times 16MiB = 1088 MiB large (that's the
> >  largest I could allocate while remaining in one segment -- otherwise lvmove
> >  wouldn't move the partition back to /dev/sda5 after "defragmenting" it.)
> That sounds strange.
I suppose it's a shortcoming of the current LVM mirror target -- when
allocating a larger LV on the primary disk, it initially creates the volume in
two segments; after done moving them to the secondary disk, it merges them into
one, as the two segments had been allocated continuously.

However, when attempting to move back the LV, the allocater can create two
extents, but the "mirror" LVM target does not appear to support regions that
are continuous on one copy and fragmented on another.

I even tried explicitly specifying --alloc= to lvmove, and it didn't have any
effect, confirming that it's not about allocation, but likely the "mirror"
stage of the move.

Marti Raudsepp

  reply	other threads:[~2007-03-21 16:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-20 10:34 Marti Raudsepp
2007-03-21 15:50 ` Lennart Sorensen
2007-03-21 16:15   ` Marti Raudsepp [this message]
2007-03-22 15:58     ` Alasdair G Kergon
2007-03-22 10:03 ` Milan Broz

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \
    --subject='Re: BUG: Files corrupt after moving LVM volume to USB disk' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).