linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Paul LeoNerd Evans <leonerd-lvm@leonerd.org.uk>
To: linux-lvm@redhat.com
Subject: [linux-lvm] Mirror resync direction
Date: Thu, 26 Oct 2006 21:17:38 +0100	[thread overview]
Message-ID: <20061026211738.008da405@nim.leo> (raw)

[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]

I'm running kernel 2.6.17 using the lvm2 package currently in debian
testing (2.02.06-3). I use it to set up a VG containing two
PVs, /dev/sda2 and /dev/sdb2. I create a mirror LV using corelog:

  lvcreate --mirror 1 --corelog ...

I create a filesystem on it, and populate it with files. I then try
testing how it copes with drive failures, by simulating a replaced disk.

To do this, I zero out one of the sides using 

  dd if=/dev/zero of=/dev/sda2

Having done that, I do the usual restore method

  pvcreate --uuid 'whatever' /dev/sda2
  vgcfgrestore vg
  vgchange -a y

And I note that it starts to resync the mirror. But it goes in the
"wrong" direction - sda2's PV is the master, but that's been zeroed out.
sdb2's is the slave but contains the real data. The block copying goes in
the wrong direction here, copying the master's zeroes over the good data
in the slave.

Is this a bug in the LVM2 tools, or the dm-mirror target, or what? Is it
perhaps a limitation of --corelog; in which case, how can I protect
against that?


-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2006-10-26 20:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-26 20:17 Paul LeoNerd Evans [this message]
2006-10-26 20:27 ` [linux-lvm] Mirror resync direction Alasdair G Kergon
2006-10-26 20:30   ` Alasdair G Kergon
2006-10-26 21:10   ` Paul LeoNerd Evans
2006-11-01 17:43     ` Jonathan E Brassow
2006-10-26 22:08   ` Paul LeoNerd Evans
2006-10-26 21:14 ` Jonathan E Brassow
2006-10-26 21:16   ` Paul LeoNerd Evans
2006-10-26 21:45     ` Jonathan E Brassow

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=20061026211738.008da405@nim.leo \
    --to=leonerd-lvm@leonerd.org.uk \
    --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).