All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olle Liljenzin <olle.liljenzin@jeppesen.com>
To: mauelshagen@redhat.com,
	LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] How to re-stripe a LV after pvmove?
Date: Thu, 29 Mar 2007 16:05:54 +0200	[thread overview]
Message-ID: <460BC7C2.3060206@jeppesen.com> (raw)
In-Reply-To: <20070329123929.GA7718@redhat.com>

Heinz Mauelshagen wrote:
> On Thu, Mar 29, 2007 at 01:42:47PM +0200, Olle Liljenzin wrote:
>   
>> Hello,
>>
>> How can I rearrange a striped volume after pvmove has been run, so that 
>> I get back the original structure with the stripes equally distributed 
>> on PVs?
>>     
>
> I need to presume, that IO to the striped LV was going on during pvmove.
> Hence restoring the old mapping won't help and will lead to data corruption.
>
> pvmove back using the destination options of the command.
>   

Maybe an example is helpful. After the commands below I have two stripes 
on sdb2 and one on sdb3. How do I move one of the stripes from sdb2 to sdb4?

pvcreate /dev/sdb{1,2,3}
vgcreate vg /dev/sdb{1,2,3}
lvcreate -i 3 -L100M -n lv /dev/vg
vgreduce /dev/vg /dev/sdb1
pvremove /dev/sdb1
pvcreate /dev/sdb4
vgextend /dev/vg /dev/sdb4
lvdisplay -m /dev/vg/lv

--- Logical volume ---
  LV Name                /dev/vg/lv
  VG Name                vg
  LV UUID                NVBrvT-5fZe-0qKA-LCYA-Z9au-X84A-fXYkx3
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                108.00 MB
  Current LE             27
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:2
  --- Segments ---
  Logical extent 0 to 26:
    Type                striped
    Stripes             3
    Stripe size         64 KB
    Stripe 0:
      Physical volume   /dev/sdb2
      Physical extents  9 to 17
    Stripe 1:
      Physical volume   /dev/sdb2
      Physical extents  0 to 8
    Stripe 2:
      Physical volume   /dev/sdb3
      Physical extents  0 to 8

  reply	other threads:[~2007-03-29 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-29 11:42 [linux-lvm] How to re-stripe a LV after pvmove? Olle Liljenzin
2007-03-29 12:39 ` Heinz Mauelshagen
2007-03-29 14:05   ` Olle Liljenzin [this message]
2007-03-29 14:29     ` Dave Wysochanski
2007-03-29 14:39       ` Olle Liljenzin

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=460BC7C2.3060206@jeppesen.com \
    --to=olle.liljenzin@jeppesen.com \
    --cc=linux-lvm@redhat.com \
    --cc=mauelshagen@redhat.com \
    --cc=olle@carmen.se \
    /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.