All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] LV mirror extents on same physical device
@ 2014-02-22  7:14 Julie Ashworth
  2014-02-22 10:12 ` emmanuel segura
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Julie Ashworth @ 2014-02-22  7:14 UTC (permalink / raw)
  To: linux-lvm

hi all,

just some background...
I installed a CentOS5 server in 2010 with a mdadm RAID1 containing 2 partitions (/dev/sda1 and /dev/sdb1). /dev/sda1 failed, and unfortuately, the mirror failed to sync with a new drive.

On this RAID1, I have one VG (VolGroup00) with 5 LVs.

I contacted the folks on the mdadm mailing list. The data on /dev/sdb is good, so they recommended that I convert the linear LVs to mirrors (to copy the data to a new drive).

I formatted a new drive (/dev/sde) identical to /dev/sd[ab], added it to a mdadm device (/dev/md2), which I then added to my VG:
mdadm --create --level=1 -n 2 /dev/md2 /dev/sde2 missing
pvcreate /dev/md2
vgextend VolGroup00 /dev/md2

I then converted all my volumes to mirrors:
lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/srvlv
lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/rootlv
lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/swaplv
lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/varlv
lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/tmplv

(in case you're wondering, when this completed, I added /dev/sda1 to /dev/md2, so /dev/md2 is a fuctional mdadm RAID1).

Now... the problem ;)....

When I run 'lvs' I see that the LV mirror extents were created on the same device (/dev/md1):

# lvs -a -o +devices 
LV                     VG         Attr   LSize  Origin Snap%  Move Log         Copy%  Convert Devices                                        
rootlv                 VolGroup00 mwi-ao 10.00G                    rootlv_mlog 100.00         rootlv_mimage_0(0),rootlv_mimage_1(0)          
[rootlv_mimage_0]      VolGroup00 iwi-ao 10.00G                                               /dev/md1(0)                                    
[rootlv_mimage_1]      VolGroup00 iwi-ao 10.00G                                               /dev/md1(4036)                                 
[rootlv_mlog]          VolGroup00 mwa-ao 32.00M                                100.00         rootlv_mlog_mimage_0(0),rootlv_mlog_mimage_1(0)
[rootlv_mlog_mimage_0] VolGroup00 iwi-ao 32.00M                                               /dev/md2(4)                                    
[rootlv_mlog_mimage_1] VolGroup00 iwi-ao 32.00M                                               /dev/md1(4356)      


My long-term goal is to convert the mirror back to a linear volume using just /dev/md2, i.e.
lvconvert -m0 /dev/VolGroup00/rootlv /dev/md1
lvconvert -m0 /dev/VolGroup00/swaplv /dev/md1
lvconvert -m0 /dev/VolGroup00/srvlv /dev/md1
lvconvert -m0 /dev/VolGroup00/varlv /dev/md1
lvconvert -m0 /dev/VolGroup00/tmplv /dev/md1

... so it seems problematic that both extents are on /dev/md1.

I thought lvm was supposed to use both physical devices. Do you know why both extents were created on the same physical device?
Should I create another extent on /dev/md2 before I remove the /dev/md1 extent(s)? If so, can you give me an example of how to use lvconvert in this case?

Thanks in advance!
best,
Julie

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-22  7:14 [linux-lvm] LV mirror extents on same physical device Julie Ashworth
@ 2014-02-22 10:12 ` emmanuel segura
  2014-02-24 18:56   ` Julie Ashworth
  2014-02-22 10:37 ` James Hawtin
  2014-02-24  2:16 ` Roger Heflin
  2 siblings, 1 reply; 16+ messages in thread
From: emmanuel segura @ 2014-02-22 10:12 UTC (permalink / raw)
  To: LVM general discussion and development

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

i don't understand why you are using two mirror technologies together, i'm
using in lvm mirror without mdadm and never found problems


2014-02-22 8:14 GMT+01:00 Julie Ashworth <ashworth@berkeley.edu>:

> hi all,
>
> just some background...
> I installed a CentOS5 server in 2010 with a mdadm RAID1 containing 2
> partitions (/dev/sda1 and /dev/sdb1). /dev/sda1 failed, and unfortuately,
> the mirror failed to sync with a new drive.
>
> On this RAID1, I have one VG (VolGroup00) with 5 LVs.
>
> I contacted the folks on the mdadm mailing list. The data on /dev/sdb is
> good, so they recommended that I convert the linear LVs to mirrors (to copy
> the data to a new drive).
>
> I formatted a new drive (/dev/sde) identical to /dev/sd[ab], added it to a
> mdadm device (/dev/md2), which I then added to my VG:
> mdadm --create --level=1 -n 2 /dev/md2 /dev/sde2 missing
> pvcreate /dev/md2
> vgextend VolGroup00 /dev/md2
>
> I then converted all my volumes to mirrors:
> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/srvlv
> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/rootlv
> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/swaplv
> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/varlv
> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/tmplv
>
> (in case you're wondering, when this completed, I added /dev/sda1 to
> /dev/md2, so /dev/md2 is a fuctional mdadm RAID1).
>
> Now... the problem ;)....
>
> When I run 'lvs' I see that the LV mirror extents were created on the same
> device (/dev/md1):
>
> # lvs -a -o +devices
> LV                     VG         Attr   LSize  Origin Snap%  Move Log
>     Copy%  Convert Devices
> rootlv                 VolGroup00 mwi-ao 10.00G
>  rootlv_mlog 100.00         rootlv_mimage_0(0),rootlv_mimage_1(0)
> [rootlv_mimage_0]      VolGroup00 iwi-ao 10.00G
>                     /dev/md1(0)
> [rootlv_mimage_1]      VolGroup00 iwi-ao 10.00G
>                     /dev/md1(4036)
> [rootlv_mlog]          VolGroup00 mwa-ao 32.00M
>      100.00         rootlv_mlog_mimage_0(0),rootlv_mlog_mimage_1(0)
> [rootlv_mlog_mimage_0] VolGroup00 iwi-ao 32.00M
>                     /dev/md2(4)
> [rootlv_mlog_mimage_1] VolGroup00 iwi-ao 32.00M
>                     /dev/md1(4356)
>
>
> My long-term goal is to convert the mirror back to a linear volume using
> just /dev/md2, i.e.
> lvconvert -m0 /dev/VolGroup00/rootlv /dev/md1
> lvconvert -m0 /dev/VolGroup00/swaplv /dev/md1
> lvconvert -m0 /dev/VolGroup00/srvlv /dev/md1
> lvconvert -m0 /dev/VolGroup00/varlv /dev/md1
> lvconvert -m0 /dev/VolGroup00/tmplv /dev/md1
>
> ... so it seems problematic that both extents are on /dev/md1.
>
> I thought lvm was supposed to use both physical devices. Do you know why
> both extents were created on the same physical device?
> Should I create another extent on /dev/md2 before I remove the /dev/md1
> extent(s)? If so, can you give me an example of how to use lvconvert in
> this case?
>
> Thanks in advance!
> best,
> Julie
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>



-- 
esta es mi vida e me la vivo hasta que dios quiera

[-- Attachment #2: Type: text/html, Size: 4164 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-22  7:14 [linux-lvm] LV mirror extents on same physical device Julie Ashworth
  2014-02-22 10:12 ` emmanuel segura
@ 2014-02-22 10:37 ` James Hawtin
  2014-02-22 17:08   ` Julie Ashworth
  2014-02-24  2:16 ` Roger Heflin
  2 siblings, 1 reply; 16+ messages in thread
From: James Hawtin @ 2014-02-22 10:37 UTC (permalink / raw)
  To: LVM general discussion and development

Ok I am not really sure what you are trying to do with madm, from what I 
can see you want to move data from pv on md1 to a pv on md2, this is 
really easy to do.

#pvcreate /dev/md2
#vgextend VolGroup00 /dev/md2
# Stop the old pv getting lvs created on it
pvchange -x n /dev/md1
# Whole thing in one go
pvmove -v /dev/md1 /dev/md2
# One at a time
pvmove -v -n rootlv /dev/md1 /dev/md2
vgreduce VolGroup00 /dev/md2

Your done.

James

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-22 10:37 ` James Hawtin
@ 2014-02-22 17:08   ` Julie Ashworth
  2014-02-24  1:59     ` John Stoffel
  0 siblings, 1 reply; 16+ messages in thread
From: Julie Ashworth @ 2014-02-22 17:08 UTC (permalink / raw)
  To: LVM general discussion and development

On 22-02-2014 10.37 +0000, James Hawtin wrote:
> #pvcreate /dev/md2
> #vgextend VolGroup00 /dev/md2
> # Stop the old pv getting lvs created on it
> pvchange -x n /dev/md1
> # Whole thing in one go
> pvmove -v /dev/md1 /dev/md2
> # One at a time
> pvmove -v -n rootlv /dev/md1 /dev/md2
> vgreduce VolGroup00 /dev/md2
> 
---end quoted text---

My LVs are already mirrored (w/ two extents on /dev/md1), so is pvmove really the right tool to move one of those extents?
best,
Julie 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-22 17:08   ` Julie Ashworth
@ 2014-02-24  1:59     ` John Stoffel
  2014-02-24  3:20       ` Julie Ashworth
  0 siblings, 1 reply; 16+ messages in thread
From: John Stoffel @ 2014-02-24  1:59 UTC (permalink / raw)
  To: LVM general discussion and development


Julie> On 22-02-2014 10.37 +0000, James Hawtin wrote:
>> #pvcreate /dev/md2
>> #vgextend VolGroup00 /dev/md2
>> # Stop the old pv getting lvs created on it
>> pvchange -x n /dev/md1
>> # Whole thing in one go
>> pvmove -v /dev/md1 /dev/md2
>> # One at a time
>> pvmove -v -n rootlv /dev/md1 /dev/md2
>> vgreduce VolGroup00 /dev/md2
>> 
Julie> ---end quoted text---

Julie> My LVs are already mirrored (w/ two extents on /dev/md1), so is
Julie> pvmove really the right tool to move one of those extents?
Julie> best,

Julie,

I think the problem is that you're confusing the Mirroring done at the
MD level, which is /dev/md#, and then the mirroring at the LVM level,
which is stacked on top of MD.  So there's no need to mirror at both
levels.  But let's double check your setup, so can you please reply
with the output of the following commands:

     cat /proc/mounts
     cat /proc/mdstat
     pvs
     vgs
     lvs

This will clarify exactly what your setup it and how it looks.

John

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-22  7:14 [linux-lvm] LV mirror extents on same physical device Julie Ashworth
  2014-02-22 10:12 ` emmanuel segura
  2014-02-22 10:37 ` James Hawtin
@ 2014-02-24  2:16 ` Roger Heflin
  2014-02-24  3:03   ` Roger Heflin
  2014-02-24  3:13   ` Julie Ashworth
  2 siblings, 2 replies; 16+ messages in thread
From: Roger Heflin @ 2014-02-24  2:16 UTC (permalink / raw)
  To: LVM general discussion and development

If I am reading what I can find correctly - -alloc=anywhere defeats
the mirror code from attempting to put on 2 different physical
devices.

The man pages seem to lack info on what other values there are for
that but disables device mirroring.

On Sat, Feb 22, 2014 at 1:14 AM, Julie Ashworth <ashworth@berkeley.edu> wrote:
> hi all,
>
> just some background...
> I installed a CentOS5 server in 2010 with a mdadm RAID1 containing 2 partitions (/dev/sda1 and /dev/sdb1). /dev/sda1 failed, and unfortuately, the mirror failed to sync with a new drive.
>
> On this RAID1, I have one VG (VolGroup00) with 5 LVs.
>
> I contacted the folks on the mdadm mailing list. The data on /dev/sdb is good, so they recommended that I convert the linear LVs to mirrors (to copy the data to a new drive).
>
> I formatted a new drive (/dev/sde) identical to /dev/sd[ab], added it to a mdadm device (/dev/md2), which I then added to my VG:
> mdadm --create --level=1 -n 2 /dev/md2 /dev/sde2 missing
> pvcreate /dev/md2
> vgextend VolGroup00 /dev/md2
>
> I then converted all my volumes to mirrors:
> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/srvlv
> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/rootlv
> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/swaplv
> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/varlv
> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/tmplv
>
> (in case you're wondering, when this completed, I added /dev/sda1 to /dev/md2, so /dev/md2 is a fuctional mdadm RAID1).
>
> Now... the problem ;)....
>
> When I run 'lvs' I see that the LV mirror extents were created on the same device (/dev/md1):
>
> # lvs -a -o +devices
> LV                     VG         Attr   LSize  Origin Snap%  Move Log         Copy%  Convert Devices
> rootlv                 VolGroup00 mwi-ao 10.00G                    rootlv_mlog 100.00         rootlv_mimage_0(0),rootlv_mimage_1(0)
> [rootlv_mimage_0]      VolGroup00 iwi-ao 10.00G                                               /dev/md1(0)
> [rootlv_mimage_1]      VolGroup00 iwi-ao 10.00G                                               /dev/md1(4036)
> [rootlv_mlog]          VolGroup00 mwa-ao 32.00M                                100.00         rootlv_mlog_mimage_0(0),rootlv_mlog_mimage_1(0)
> [rootlv_mlog_mimage_0] VolGroup00 iwi-ao 32.00M                                               /dev/md2(4)
> [rootlv_mlog_mimage_1] VolGroup00 iwi-ao 32.00M                                               /dev/md1(4356)
>
>
> My long-term goal is to convert the mirror back to a linear volume using just /dev/md2, i.e.
> lvconvert -m0 /dev/VolGroup00/rootlv /dev/md1
> lvconvert -m0 /dev/VolGroup00/swaplv /dev/md1
> lvconvert -m0 /dev/VolGroup00/srvlv /dev/md1
> lvconvert -m0 /dev/VolGroup00/varlv /dev/md1
> lvconvert -m0 /dev/VolGroup00/tmplv /dev/md1
>
> ... so it seems problematic that both extents are on /dev/md1.
>
> I thought lvm was supposed to use both physical devices. Do you know why both extents were created on the same physical device?
> Should I create another extent on /dev/md2 before I remove the /dev/md1 extent(s)? If so, can you give me an example of how to use lvconvert in this case?
>
> Thanks in advance!
> best,
> Julie
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-24  2:16 ` Roger Heflin
@ 2014-02-24  3:03   ` Roger Heflin
  2014-02-24  3:12     ` Julie Ashworth
  2014-02-24  3:13   ` Julie Ashworth
  1 sibling, 1 reply; 16+ messages in thread
From: Roger Heflin @ 2014-02-24  3:03 UTC (permalink / raw)
  To: LVM general discussion and development

without the anywhere option it indicates you need *4* devices, 2 for
data, and 2 for mirror log, using anywhere removes the more than 1
device for everything,.

Using this format should allow you to force the move of a copy from
one device to another, see the pvmove man page for more details.

pvmove /dev/sdb1:1000-1999 /dev/sdc1:0-999

I have had to do something similar on some other OS (not Linux) LVM
when it did incorrect things like this.

On Sun, Feb 23, 2014 at 8:16 PM, Roger Heflin <rogerheflin@gmail.com> wrote:
> If I am reading what I can find correctly - -alloc=anywhere defeats
> the mirror code from attempting to put on 2 different physical
> devices.
>
> The man pages seem to lack info on what other values there are for
> that but disables device mirroring.
>
> On Sat, Feb 22, 2014 at 1:14 AM, Julie Ashworth <ashworth@berkeley.edu> wrote:
>> hi all,
>>
>> just some background...
>> I installed a CentOS5 server in 2010 with a mdadm RAID1 containing 2 partitions (/dev/sda1 and /dev/sdb1). /dev/sda1 failed, and unfortuately, the mirror failed to sync with a new drive.
>>
>> On this RAID1, I have one VG (VolGroup00) with 5 LVs.
>>
>> I contacted the folks on the mdadm mailing list. The data on /dev/sdb is good, so they recommended that I convert the linear LVs to mirrors (to copy the data to a new drive).
>>
>> I formatted a new drive (/dev/sde) identical to /dev/sd[ab], added it to a mdadm device (/dev/md2), which I then added to my VG:
>> mdadm --create --level=1 -n 2 /dev/md2 /dev/sde2 missing
>> pvcreate /dev/md2
>> vgextend VolGroup00 /dev/md2
>>
>> I then converted all my volumes to mirrors:
>> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/srvlv
>> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/rootlv
>> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/swaplv
>> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/varlv
>> lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/tmplv
>>
>> (in case you're wondering, when this completed, I added /dev/sda1 to /dev/md2, so /dev/md2 is a fuctional mdadm RAID1).
>>
>> Now... the problem ;)....
>>
>> When I run 'lvs' I see that the LV mirror extents were created on the same device (/dev/md1):
>>
>> # lvs -a -o +devices
>> LV                     VG         Attr   LSize  Origin Snap%  Move Log         Copy%  Convert Devices
>> rootlv                 VolGroup00 mwi-ao 10.00G                    rootlv_mlog 100.00         rootlv_mimage_0(0),rootlv_mimage_1(0)
>> [rootlv_mimage_0]      VolGroup00 iwi-ao 10.00G                                               /dev/md1(0)
>> [rootlv_mimage_1]      VolGroup00 iwi-ao 10.00G                                               /dev/md1(4036)
>> [rootlv_mlog]          VolGroup00 mwa-ao 32.00M                                100.00         rootlv_mlog_mimage_0(0),rootlv_mlog_mimage_1(0)
>> [rootlv_mlog_mimage_0] VolGroup00 iwi-ao 32.00M                                               /dev/md2(4)
>> [rootlv_mlog_mimage_1] VolGroup00 iwi-ao 32.00M                                               /dev/md1(4356)
>>
>>
>> My long-term goal is to convert the mirror back to a linear volume using just /dev/md2, i.e.
>> lvconvert -m0 /dev/VolGroup00/rootlv /dev/md1
>> lvconvert -m0 /dev/VolGroup00/swaplv /dev/md1
>> lvconvert -m0 /dev/VolGroup00/srvlv /dev/md1
>> lvconvert -m0 /dev/VolGroup00/varlv /dev/md1
>> lvconvert -m0 /dev/VolGroup00/tmplv /dev/md1
>>
>> ... so it seems problematic that both extents are on /dev/md1.
>>
>> I thought lvm was supposed to use both physical devices. Do you know why both extents were created on the same physical device?
>> Should I create another extent on /dev/md2 before I remove the /dev/md1 extent(s)? If so, can you give me an example of how to use lvconvert in this case?
>>
>> Thanks in advance!
>> best,
>> Julie
>>
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-24  3:03   ` Roger Heflin
@ 2014-02-24  3:12     ` Julie Ashworth
  0 siblings, 0 replies; 16+ messages in thread
From: Julie Ashworth @ 2014-02-24  3:12 UTC (permalink / raw)
  To: LVM general discussion and development

On 23-02-2014 21.03 -0600, Roger Heflin wrote:
> without the anywhere option it indicates you need *4* devices, 2 for
> data, and 2 for mirror log, using anywhere removes the more than 1
> device for everything,.

The -alloc=aywhere simply refers to the log. I'm not concerned about the log, I'm concered about the actual image extents, which seem to be both on /dev/md1.
 
> Using this format should allow you to force the move of a copy from
> one device to another, see the pvmove man page for more details.
> 
> pvmove /dev/sdb1:1000-1999 /dev/sdc1:0-999

The end goal is to convert the mirror to a linear volume (on /dev/md2). 
I'm still not convinced that pvmove is the right utility for mirrored extents. But thanks for the advice - I will try it if lvconvert -m0 fails. (this is a test server).

best,
Julie

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-24  2:16 ` Roger Heflin
  2014-02-24  3:03   ` Roger Heflin
@ 2014-02-24  3:13   ` Julie Ashworth
  2014-02-24  3:29     ` Roger Heflin
  1 sibling, 1 reply; 16+ messages in thread
From: Julie Ashworth @ 2014-02-24  3:13 UTC (permalink / raw)
  To: LVM general discussion and development


On 23-02-2014 20.16 -0600, Roger Heflin wrote:
> If I am reading what I can find correctly - -alloc=anywhere defeats
> the mirror code from attempting to put on 2 different physical
> devices.
---end quoted text---

-alloc=anywhere just refers to the logs, which isn't important at this point.
best,
Julie

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-24  1:59     ` John Stoffel
@ 2014-02-24  3:20       ` Julie Ashworth
  0 siblings, 0 replies; 16+ messages in thread
From: Julie Ashworth @ 2014-02-24  3:20 UTC (permalink / raw)
  To: LVM general discussion and development

On 23-02-2014 20.59 -0500, John Stoffel wrote:
> 
> I think the problem is that you're confusing the Mirroring done at the
> MD level, which is /dev/md#, and then the mirroring at the LVM level,
> which is stacked on top of MD.  So there's no need to mirror at both
> levels.  But let's double check your setup, so can you please reply
> with the output of the following commands:

I'm not confused about mdadm vs. LVM mirror. I regret mentioning mdadm, since it seems to be confusing everyone. I should have only asked why the lvconvert command produced extents on the same physical device. At this point, I will just go ahead and test if
lvconvert -m0 /dev/VolGroup00/rootlv /dev/md1
will produce a functional linear volume on /dev/md2

best,
Julie

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-24  3:13   ` Julie Ashworth
@ 2014-02-24  3:29     ` Roger Heflin
  2014-02-24  4:29       ` Julie Ashworth
  0 siblings, 1 reply; 16+ messages in thread
From: Roger Heflin @ 2014-02-24  3:29 UTC (permalink / raw)
  To: LVM general discussion and development

This indicates that it "worked" that way on some versions rhel5 but
does not work that way on rhel6 in a number of versions.

https://bugzilla.redhat.com/show_bug.cgi?id=594525

I would suspect depending on exactly what version you are using that
it is a bug.

I know up to at least 5.7 there are some bad LVM bugs when you are
doing abnormal things (mirroring, pvmoves with lv with multiple
extents), there are probably other bugs I don't know about.

I would suggest unmirroring it, and just doing a straight pvmove to
the new device, mirroring it in the middle would just appear to
complicate things.


On Sun, Feb 23, 2014 at 9:13 PM, Julie Ashworth <ashworth@berkeley.edu> wrote:
>
> On 23-02-2014 20.16 -0600, Roger Heflin wrote:
>> If I am reading what I can find correctly - -alloc=anywhere defeats
>> the mirror code from attempting to put on 2 different physical
>> devices.
> ---end quoted text---
>
> -alloc=anywhere just refers to the logs, which isn't important at this point.
> best,
> Julie
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-24  3:29     ` Roger Heflin
@ 2014-02-24  4:29       ` Julie Ashworth
  0 siblings, 0 replies; 16+ messages in thread
From: Julie Ashworth @ 2014-02-24  4:29 UTC (permalink / raw)
  To: LVM general discussion and development

On 23-02-2014 21.29 -0600, Roger Heflin wrote:
> This indicates that it "worked" that way on some versions rhel5 but
> does not work that way on rhel6 in a number of versions.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=594525
> 
> I would suspect depending on exactly what version you are using that
> it is a bug.
> 
> I know up to at least 5.7 there are some bad LVM bugs when you are
> doing abnormal things (mirroring, pvmoves with lv with multiple
> extents), there are probably other bugs I don't know about.
> 
> I would suggest unmirroring it, and just doing a straight pvmove to
> the new device, mirroring it in the middle would just appear to
> complicate things.
---end quoted text---

Thank you. 
It's possible to specify where the extents should be located, i.e.

The following command creates a mirrored logical volume with a single mirror. The volume is 500 megabytes in size, it is named mirrorlv, and it is carved out of volume group vg0. The first leg of the mirror is on device /dev/sda1, the second leg of the mirror is on device /dev/sdb1, and the mirror log is on /dev/sdc1. 
lvcreate -L 500M -m1 -n mirrorlv vg0 /dev/sda1 /dev/sdb1 /dev/sdc1
(from http://linux-satya.blogspot.com/2010/09/logical-volume-manager.html)

I regret not doing this. Oh well. At this point, I haven't decided if I should convert to linear LV, or add aother mirror on /dev/md2.

Thanks again for the heads-up about the bug.
best,
Julie

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-22 10:12 ` emmanuel segura
@ 2014-02-24 18:56   ` Julie Ashworth
  2014-02-24 21:51     ` Julie Ashworth
  0 siblings, 1 reply; 16+ messages in thread
From: Julie Ashworth @ 2014-02-24 18:56 UTC (permalink / raw)
  To: LVM general discussion and development

On 22-02-2014 11.12 +0100, emmanuel segura wrote:
>    i don't understand why you are using two mirror technologies together, i'm
>    using in lvm mirror without mdadm and never found problems
---end quoted text---

hi Emmanuel, 
I personally prefer to use mdadm RAID1, and I'm only using lvm mirroring to recover from an mdadm failure. If you want to learn more, I encourage you to join the mailing list for mdadm issues (linux-raid@vger.kernel.org).
best,
Julie

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-24 18:56   ` Julie Ashworth
@ 2014-02-24 21:51     ` Julie Ashworth
  2014-02-25 11:18       ` emmanuel segura
  0 siblings, 1 reply; 16+ messages in thread
From: Julie Ashworth @ 2014-02-24 21:51 UTC (permalink / raw)
  To: LVM general discussion and development

I doubt anybody else will have this problem, but just in case...
my solution was to upgrade lvm2, convert my mirrors to linear arrays, and recreate the mirrors. After the lvm2 upgrade, I didn't see allocation errors when creating the mirrored log.

lvconvert -m0 /dev/VolGroup00/lvname
lvconvert -m1 --mirrorlog=mirrored /dev/VolGroup00/lvname

best,
Julie

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-24 21:51     ` Julie Ashworth
@ 2014-02-25 11:18       ` emmanuel segura
  2014-02-25 11:19         ` emmanuel segura
  0 siblings, 1 reply; 16+ messages in thread
From: emmanuel segura @ 2014-02-25 11:18 UTC (permalink / raw)
  To: LVM general discussion and development

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

Hi Julie,

Thanks for your comment, but you mirror over mirror, i don't need to learn
anything like that :)



2014-02-24 22:51 GMT+01:00 Julie Ashworth <ashworth@berkeley.edu>:

> I doubt anybody else will have this problem, but just in case...
> my solution was to upgrade lvm2, convert my mirrors to linear arrays, and
> recreate the mirrors. After the lvm2 upgrade, I didn't see allocation
> errors when creating the mirrored log.
>
> lvconvert -m0 /dev/VolGroup00/lvname
> lvconvert -m1 --mirrorlog=mirrored /dev/VolGroup00/lvname
>
> best,
> Julie
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>



-- 
esta es mi vida e me la vivo hasta que dios quiera

[-- Attachment #2: Type: text/html, Size: 1450 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [linux-lvm] LV mirror extents on same physical device
  2014-02-25 11:18       ` emmanuel segura
@ 2014-02-25 11:19         ` emmanuel segura
  0 siblings, 0 replies; 16+ messages in thread
From: emmanuel segura @ 2014-02-25 11:19 UTC (permalink / raw)
  To: LVM general discussion and development

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

Hi Julie,

Thanks for your comment, but you are using mirror over mirror, i don't need
to learn anything like that :)


2014-02-25 12:18 GMT+01:00 emmanuel segura <emi2fast@gmail.com>:

> Hi Julie,
>
> Thanks for your comment, but you mirror over mirror, i don't need to learn
> anything like that :)
>
>
>
> 2014-02-24 22:51 GMT+01:00 Julie Ashworth <ashworth@berkeley.edu>:
>
> I doubt anybody else will have this problem, but just in case...
>> my solution was to upgrade lvm2, convert my mirrors to linear arrays, and
>> recreate the mirrors. After the lvm2 upgrade, I didn't see allocation
>> errors when creating the mirrored log.
>>
>> lvconvert -m0 /dev/VolGroup00/lvname
>> lvconvert -m1 --mirrorlog=mirrored /dev/VolGroup00/lvname
>>
>> best,
>> Julie
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
>
>
>
> --
> esta es mi vida e me la vivo hasta que dios quiera
>



-- 
esta es mi vida e me la vivo hasta que dios quiera

[-- Attachment #2: Type: text/html, Size: 2085 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-02-25 11:19 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-22  7:14 [linux-lvm] LV mirror extents on same physical device Julie Ashworth
2014-02-22 10:12 ` emmanuel segura
2014-02-24 18:56   ` Julie Ashworth
2014-02-24 21:51     ` Julie Ashworth
2014-02-25 11:18       ` emmanuel segura
2014-02-25 11:19         ` emmanuel segura
2014-02-22 10:37 ` James Hawtin
2014-02-22 17:08   ` Julie Ashworth
2014-02-24  1:59     ` John Stoffel
2014-02-24  3:20       ` Julie Ashworth
2014-02-24  2:16 ` Roger Heflin
2014-02-24  3:03   ` Roger Heflin
2014-02-24  3:12     ` Julie Ashworth
2014-02-24  3:13   ` Julie Ashworth
2014-02-24  3:29     ` Roger Heflin
2014-02-24  4:29       ` Julie Ashworth

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.