LVM and VxVM
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I import a volume group, and retain PVG setup?

 
SOLVED
Go to solution
Peterstoops
Occasional Contributor

How can I import a volume group, and retain PVG setup?

Hi,

 

I am implementing a 2-node ServiceGuard cluster, with EVA storage in two sites:

Site 1 has node1 and 1 EVA frame, Site2 has node2 and another EVA frame. The goal is to have the storage mirrored over the two sites using LVM.

I have /etc/lvmpvg set up on node 1:

VG      /dev/vgwaakdata
PVG     EVADC1
/dev/disk/disk56
PVG     EVADC2
/dev/disk/disk108

 

vgdisplay -v vgwaakdata shows PVG is OK:

VG Name                     /dev/vgwaakdata
VG Write Access             read/write
VG Status                   available, exclusive
Max LV                      255
Cur LV                      1
Open LV                     1
Max PV                      16
Cur PV                      2
Act PV                      2
Max PE per PV               65535
VGDA                        4
PE Size (Mbytes)            16
Total PE                    31998
Alloc PE                    31998
Free PE                     0
Total PVG                   2
Total Spare PVs             0
Total Spare PVs in use      0
VG Version                  1.0
VG Max Size                 16776960m
VG Max Extents              1048560

   --- Logical volumes ---
   LV Name                     /dev/vgwaakdata/lvol1
   LV Status                   available/syncd
   LV Size (Mbytes)            255984
   Current LE                  15999
   Allocated PE                31998
   Used PV                     2


   --- Physical volumes ---
   PV Name                     /dev/disk/disk56
   PV Status                   available
   Total PE                    15999
   Free PE                     0
   Autoswitch                  On
   Proactive Polling           On

   PV Name                     /dev/disk/disk108
   PV Status                   available
   Total PE                    15999
   Free PE                     0
   Autoswitch                  On
   Proactive Polling           On


   --- Physical volume groups ---
   PVG Name                    EVADC1
   PV Name                     /dev/disk/disk56

   PVG Name                    EVADC2
   PV Name                     /dev/disk/disk108


 

Created a mapfile of the volume group with vgexport -p -s -v -m

after importing the volumegroup on node2 (vgimport -sv -N -m /tmp/vgwaakdata2.map vgwaakdata), manually updating /etc/lvmpvg with the correct disks for node2, and then switching the package to node2, LVM does not show the PVG information:

VG Name                     /dev/vgwaakdata
VG Write Access             read/write
VG Status                   available, exclusive
Max LV                      255
Cur LV                      1
Open LV                     1
Max PV                      16
Cur PV                      2
Act PV                      2
Max PE per PV               65535
VGDA                        4
PE Size (Mbytes)            16
Total PE                    31998
Alloc PE                    31998
Free PE                     0
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0
VG Version                  1.0
VG Max Size                 16776960m
VG Max Extents              1048560

   --- Logical volumes ---
   LV Name                     /dev/vgwaakdata/lvol1
   LV Status                   available/syncd
   LV Size (Mbytes)            255984
   Current LE                  15999
   Allocated PE                31998
   Used PV                     2


   --- Physical volumes ---
   PV Name                     /dev/disk/disk108
   PV Status                   available
   Total PE                    15999
   Free PE                     0
   Autoswitch                  On
   Proactive Polling           On

   PV Name                     /dev/disk/disk56
   PV Status                   available
   Total PE                    15999
   Free PE                     0
   Autoswitch                  On
   Proactive Polling           On

 

Can someone please point out what I am missing?

 

Thanks!!

 

Peter

1 REPLY 1
Peterstoops
Occasional Contributor
Solution

Re: How can I import a volume group, and retain PVG setup?

I seem to have found what I was missing:

By copy/pasting, apparently, the tabs between the name / value pair have been substituted by spaces. After editing /etc/lvmpvg, and replacing the spaces with a tab, vgdisplay correctly shows the Physical Volume Group information.

 

I have 7 volume groups that were in this scenario, and so far, I have fixed two of them. I will continue doing the same for the remainder and confirm my findings.

 

Peter