<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.2">
<TITLE>How to import a mirror of a volume group</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I am trying to figure out how to import a mirror of a volume group to a host where the mirror is visible.</FONT>
<BR><FONT SIZE=2 FACE="Arial">I am new to LVM. Any help will be appreciated.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">The system is RedHat Enterprise Linux 3.0. The kernel is 2.4.21-4. The LVM version 1.0.3-15.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Let me explain what I am trying to do.</FONT>
<BR><FONT SIZE=2 FACE="Arial">1. I created a volume group which consists of 2 physical volumes (2 full hard disks) and 2 logical volumes. </FONT>
<BR><FONT SIZE=2 FACE="Arial">    I created two ext3 file systems off the two logical volumes.</FONT>
<BR><FONT SIZE=2 FACE="Arial">    I mounted the two file systems. Everything was ok.</FONT>
<BR><FONT SIZE=2 FACE="Arial">2. I created mirror disks of the two original physical volumes, which should be the exact copy of the original </FONT>
<BR><FONT SIZE=2 FACE="Arial">    two physical volumes, using our own array technology.</FONT>
<BR><FONT SIZE=2 FACE="Arial">3. Now I want to import the volume group from the two mirror disks on the same host (The two mirror </FONT>
<BR><FONT SIZE=2 FACE="Arial">    disks are visible on the same host). I got the following error:</FONT>
<BR><FONT SIZE=2 FACE="Arial">    "</FONT><FONT SIZE=2 FACE="Courier New">vgimport -- ERROR "pv_read(): read" reading physical volume "/dev/sdbm""</FONT>
<BR><FONT SIZE=2 FACE="Arial">    Importing to a different host where the mirror disks are visible does not work either. Same error. </FONT>
<BR><FONT SIZE=2 FACE="Arial">    I have attached the vgimport output with debug option turned on at the end of this email.</FONT>
<BR><FONT SIZE=2 FACE="Arial">   </FONT>
<BR><FONT SIZE=2 FACE="Arial">Since the mirror disks are the exact copy of the originals, I would assume that VGDA should be copied</FONT>
<BR><FONT SIZE=2 FACE="Arial">to the mirror disks as well. Why import does not work?  Did I miss anything here? </FONT>
<BR><FONT SIZE=2 FACE="Arial">Is there other workaround that can help me achieve this? </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Thanks,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Jie</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Below is the output with debug option turned on.</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> lvm_get_iop_version -- CALLED</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> lvm_check_special -- CALLED</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> lvm_check_special -- LEAVING</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> lvm_get_iop_version -- AFTER ioctl ret: 0</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> lvm_get_iop_version -- LEAVING with ret: 10</FONT>
<BR><FONT SIZE=2 FACE="Courier New">vgimport -- locking logical volume manager</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> lvm_lock -- CALLED</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> lvm_check_special -- CALLED</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> lvm_check_special -- LEAVING</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> lvm_lock -- LEAVING with ret: 0</FONT>
<BR><FONT SIZE=2 FACE="Courier New">vgimport -- checking volume group name</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> vg_check_name -- CALLED with VG: jlin_vg2</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> lvm_check_chars -- CALLED with name: "jlin_vg2"</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> lvm_check_chars -- LEAVING with ret: 0</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> vg_check_name -- LEAVING with ret: 0</FONT>
<BR><FONT SIZE=2 FACE="Courier New">vgimport -- checking volume group "jlin_vg2" existence</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> lvm_tab_vg_check_exist -- CALLED with vg_name: "jlin_vg2"</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> vg_check_name -- CALLED with VG: jlin_vg2</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><333> lvm_check_chars -- CALLED with name: "jlin_vg2"</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><333> lvm_check_chars -- LEAVING with ret: 0</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> vg_check_name -- LEAVING with ret: 0</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> lvm_tab_read -- CALLED</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> lvm_tab_read -- LEAVING with ret: 0  data: 804CA98  size: 9</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> lvm_tab_vg_check_exist -- LEAVING with ret: 0</FONT>
<BR><FONT SIZE=2 FACE="Courier New">vgimport -- trying to read physical volumes</FONT>
<BR><FONT SIZE=2 FACE="Courier New">vgimport -- checking for duplicate physical volumes</FONT>
<BR><FONT SIZE=2 FACE="Courier New">vgimport -- checking physical volume name "/dev/sdbm"</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> pv_check_name -- CALLED with "/dev/sdbm"</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> lvm_check_chars -- CALLED with name: "/dev/sdbm"</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> lvm_check_chars -- LEAVING with ret: 0</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> pv_check_name -- LEAVING with ret: 0</FONT>
<BR><FONT SIZE=2 FACE="Courier New">vgimport -- reading data of physical volume "/dev/sdbm" from disk</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> pv_read -- CALLED with /dev/sdbm</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> pv_check_name -- CALLED with "/dev/sdbm"</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><333> lvm_check_chars -- CALLED with name: "/dev/sdbm"</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><333> lvm_check_chars -- LEAVING with ret: 0</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><22> pv_check_name -- LEAVING with ret: 0</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> pv_read -- going to read /dev/sdbm</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> pv_read -- LEAVING with ret: -282</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> lvm_error -- CALLED with: -282</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> lvm_error -- LEAVING with: "pv_read(): read"</FONT>
<BR><FONT SIZE=2 FACE="Courier New">vgimport -- ERROR "pv_read(): read" reading physical volume "/dev/sdbm"</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> lvm_unlock -- CALLED</FONT>
<BR><FONT SIZE=2 FACE="Courier New"><1> lvm_unlock -- LEAVING with ret: 0</FONT>
</P>

</BODY>
</HTML>