<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Dear LVM list,</div>

<div> </div>

<div>this is my first posting to this list and actually I am making my first experiences with LVM. The following is my situation:</div>

<div> </div>

<div>I had a RAID 1 consisting of /dev/sdb1 and /dev/sdc1 making /dev/md2 and used this device as a physical volume for LVM. I used this inside the volume group vg_data.</div>

<div> </div>

<div>Now I decided to convert this RAID 1 into a RAID 5 by "adding a third and identical partition /dev/sdd1". It follows how I am going to realize this:</div>

<div> </div>

<div>First I removed /dev/sdc1 from /dev/md2 (the old RAID 1) leaving it in degraded state.</div>

<div>Then I created a new RAID 5, having device name /dev/md0 with a total of three disks, but running only with two disks for the moment, namely /dev/sdc1 and /dev/sdd1.</div>

<div>The plan is now to initialize /dev/md0 as a physical volume and add a volume group and logical volume on top of this. Then I would copy the data from the old RAID 1 to the new RAID 5. Finally I will remove the old RAID 1 and add the remaining device /dev/sdb1 to the new RAID 5. Then the conversion would be complete.</div>

<div> </div>

<div>Now the actual problem related to LVM:</div>

<div> </div>

<div>While trying to initialize the new /dev/md0 as a pysical volume for LVM, I get the following message:</div>

<div> </div>

<div>
<div># pvcreate /dev/md0<br/>
  Incorrect metadata area header checksum on /dev/md0 at offset 3000456183808<br/>
  Found duplicate PV LNqPKpqdtqcLkmiqHYOeeVddNYx7FDOq: using /dev/md2 not /dev/md0<br/>
  Can't initialize physical volume "/dev/md0" of volume group "vg_data" without -ff</div>

<div> </div>

<div>I guess the reason is that new RAID 5 contains the data of the old disk (which was part of the RAID 1) and therefore it appears to have the same PV metadata. So I am amout to force its reinitialization.</div>

<div> </div>

<div>However, I looked as /dev/md2 first:</div>

<div> </div>

<div>
<div># pvdisplay /dev/md2<br/>
  Found duplicate PV LNqPKpqdtqcLkmiqHYOeeVddNYx7FDOq: using /dev/md0 not /dev/md2<br/>
  Incorrect metadata area header checksum on /dev/md0 at offset 3000456183808<br/>
  Incorrect metadata area header checksum on /dev/md0 at offset 3000456183808<br/>
  WARNING: Volume group vg_data is not consistent<br/>
  --- Physical volume ---<br/>
  PV Name               /dev/md0<br/>
  VG Name               vg_data<br/>
  PV Size               2,73 TiB / not usable 2,81 MiB<br/>
  Allocatable           yes (but full)<br/>
  PE Size               4,00 MiB<br/>
  Total PE              715364<br/>
  Free PE               0<br/>
  Allocated PE          715364<br/>
  PV UUID               LNqPKp-qdtq-cLkm-iqHY-OeeV-ddNY-x7FDOq<br/>
   </div>

<div>
<div><br/>
I am a bit confused that /dev/md0 appears under "PV name" here. I asked for /dev/md2. Why this? Does pvdisplay get confused since there are two devices with the same metadata? I have no backup of /dev/md2 (and it is difficult to create one) and therefore I have to avoid to damage /dev/md2. Can I be sure that if I run "pvcreate -ff /dev/md0" that /dev/md2 will not be touched?</div>

<div> </div>

<div>I appreciate your help, since I am a bit confused by the output of pvdisplay.</div>

<div> </div>

<div>Best regards</div>

<div>Oliver</div>
</div>
</div>
</div></div></body></html>