<div dir="ltr">i don't understand why you are using two mirror technologies together, i'm using in lvm mirror without mdadm and never found problems<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-02-22 8:14 GMT+01:00 Julie Ashworth <span dir="ltr"><<a href="mailto:ashworth@berkeley.edu" target="_blank">ashworth@berkeley.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
hi all,<br>
<br>
just some background...<br>
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.<br>
<br>
On this RAID1, I have one VG (VolGroup00) with 5 LVs.<br>
<br>
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).<br>
<br>
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:<br>
mdadm --create --level=1 -n 2 /dev/md2 /dev/sde2 missing<br>
pvcreate /dev/md2<br>
vgextend VolGroup00 /dev/md2<br>
<br>
I then converted all my volumes to mirrors:<br>
lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/srvlv<br>
lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/rootlv<br>
lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/swaplv<br>
lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/varlv<br>
lvconvert -m1 --mirrorlog=mirrored --alloc=anywhere /dev/VolGroup00/tmplv<br>
<br>
(in case you're wondering, when this completed, I added /dev/sda1 to /dev/md2, so /dev/md2 is a fuctional mdadm RAID1).<br>
<br>
Now... the problem ;)....<br>
<br>
When I run 'lvs' I see that the LV mirror extents were created on the same device (/dev/md1):<br>
<br>
# lvs -a -o +devices<br>
LV                     VG         Attr   LSize  Origin Snap%  Move Log         Copy%  Convert Devices<br>
rootlv                 VolGroup00 mwi-ao 10.00G                    rootlv_mlog 100.00         rootlv_mimage_0(0),rootlv_mimage_1(0)<br>
[rootlv_mimage_0]      VolGroup00 iwi-ao 10.00G                                               /dev/md1(0)<br>
[rootlv_mimage_1]      VolGroup00 iwi-ao 10.00G                                               /dev/md1(4036)<br>
[rootlv_mlog]          VolGroup00 mwa-ao 32.00M                                100.00         rootlv_mlog_mimage_0(0),rootlv_mlog_mimage_1(0)<br>
[rootlv_mlog_mimage_0] VolGroup00 iwi-ao 32.00M                                               /dev/md2(4)<br>
[rootlv_mlog_mimage_1] VolGroup00 iwi-ao 32.00M                                               /dev/md1(4356)<br>
<br>
<br>
My long-term goal is to convert the mirror back to a linear volume using just /dev/md2, i.e.<br>
lvconvert -m0 /dev/VolGroup00/rootlv /dev/md1<br>
lvconvert -m0 /dev/VolGroup00/swaplv /dev/md1<br>
lvconvert -m0 /dev/VolGroup00/srvlv /dev/md1<br>
lvconvert -m0 /dev/VolGroup00/varlv /dev/md1<br>
lvconvert -m0 /dev/VolGroup00/tmplv /dev/md1<br>
<br>
... so it seems problematic that both extents are on /dev/md1.<br>
<br>
I thought lvm was supposed to use both physical devices. Do you know why both extents were created on the same physical device?<br>
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?<br>
<br>
Thanks in advance!<br>
best,<br>
Julie<br>
<br>
<br>
_______________________________________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com">linux-lvm@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-lvm" target="_blank">https://www.redhat.com/mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" target="_blank">http://tldp.org/HOWTO/LVM-HOWTO/</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>esta es mi vida e me la vivo hasta que dios quiera
</div>