All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars Ellenberg <lars.ellenberg@linbit.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] LVM mirror logic bug?
Date: Wed, 6 Feb 2013 13:25:53 +0100	[thread overview]
Message-ID: <20130206122553.GA17944@soda.linbit> (raw)
In-Reply-To: <CAPhuxPsnfme0a=AeqAQ_CS0WNp9FEhE=5oXyO7A9iZHHpA+MdA@mail.gmail.com>

On Wed, Feb 06, 2013 at 01:43:05PM +0200, Robert wrote:
> Hi,
> 
> Today I created a mirror due to some data migrations I am doing, and
> the funny thing is that two mirror legs ended up on the same physical
> volume:
> 
> # lvs -a -o +devices
>   LV                VG     Attr   LSize   Origin Snap%  Move Log Copy%
>  Convert Devices
>   oraarch           sapvg  -wi-ao  20.00G
>          /dev/dm-18(0)
>   oracle            sapvg  -wi-ao   5.00G
>          /dev/dm-18(5120)
>   orapta            sapvg  mwi-ao 299.12G
> 100.00         orapta_mimage_0(0),orapta_mimage_1(0)
>   [orapta_mimage_0] sapvg  iwi-ao 299.12G
>          /dev/dm-5(11520)
>   [orapta_mimage_0] sapvg  iwi-ao 299.12G
>          /dev/dm-3(12800)
>   [orapta_mimage_0] sapvg  iwi-ao 299.12G
>          /dev/dm-3(30002)
>   [orapta_mimage_0] sapvg  iwi-ao 299.12G
>          /dev/dm-4(0)
>   [orapta_mimage_0] sapvg  iwi-ao 299.12G
>          /dev/dm-4(9913)
>   [orapta_mimage_0] sapvg  iwi-ao 299.12G
>          /dev/dm-6(0)
>   [orapta_mimage_1] sapvg  iwi-ao 299.12G
>          /dev/dm-6(34249)
>   [orapta_mimage_1] sapvg  iwi-ao 299.12G
>          /dev/dm-16(0)
>   [orapta_mimage_1] sapvg  iwi-ao 299.12G
>          /dev/dm-17(0)
> ...
> ...
> 
> Here you can see /dev/dm-6 contains part of both mirror legs.
> 
> I have to admit I just used the command:
> lvconvert -m1 --corelog sapvg/orapta
> not specifying the target pv's as I thought LVM would calculate it for itself.
> 
> There should be a rule in place to never use the same PV for the
> second leg of a mirror that is used by the first shoudln't there?

I assume you have an --alloc=anywhere setting somewhere.
Try to reproduce with an explicit --alloc=normal.
See also man lvm

	Lars

> I am using a statically compiled version of LVM so I can use it on
> different machines that are older than SLES11SP2 as the older distro
> won't allow me to mirror multi segmented LV's.
> 
> # /tmp/lvm.static version
>   LVM version:     2.02.98(2) (2012-10-15)
>   Library version: 1.02.77 (2012-10-15)
>   Driver version:  4.15.0
> 
> Thanks!
> Robert

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

  reply	other threads:[~2013-02-06 12:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 11:43 [linux-lvm] LVM mirror logic bug? Robert
2013-02-06 12:25 ` Lars Ellenberg [this message]
2013-02-06 12:50   ` Alasdair G Kergon

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=20130206122553.GA17944@soda.linbit \
    --to=lars.ellenberg@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 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.