Operating System - HP-UX
1836428 Members
3810 Online
110100 Solutions
New Discussion

Re: Question about vgsplit and vgmerge

 
dark-sun
Frequent Advisor

Question about vgsplit and vgmerge

Hello,
I just try (for testing) a vgsplit and vgmerge.
I split the lvol4.
vgdisplay -v show me a lvol4 and lvol4b

After fsck lvol4b is mountable, OK.

Than I try a worse case, f.e. lvol4 will be bad.
So I have to use the saved/splittet data from lvol4b =>
# lvmerge /dev/vg00/lvol4 /dev/vg00/lvol4b

Logical volume "/dev/vg00/lvol4" has been successfully merged
with logical volume "/dev/vg00/lvol4b".
Logical volume "/dev/vg00/lvol4" has been successfully removed.
Warning: Can not determine all Physical Volumes on which mirrored copies of
the Logical Volume are located. "/etc/lvmtab" is missing Physical Volumes.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
----------
# lvdisplay -v /dev/vg00/lvol4
lvdisplay: "/dev/vg00/lvol4": No such file or directory
-----------
# lvdisplay -v /dev/vg00/lvol4b
--- Logical volumes ---
LV Name /dev/vg00/lvol4b
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 24
Current LE 3
Allocated PE 6
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t2d0 3 3
/dev/dsk/c1t2d0 3 3

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c2t2d0 00319 current /dev/dsk/c1t2d0 00319 current
00001 /dev/dsk/c2t2d0 00320 current /dev/dsk/c1t2d0 00320 current
...
----------------------

Whats wrong?
Why "/etc/lvmtab is missing Physical Volumes"?
lvmtab seems OK, shows to devices (c1+c2)
How can I restore (working) lvol4b into lvol4, so I have at the end a lvol4 and no lvol4b in the VG?

Michael
3 REPLIES 3
RK_7
Advisor

Re: Question about vgsplit and vgmerge

Hi Michael,

The command used to merge lv is different.
You should use like this..

lvmerge /dev/vg00/lvol4b /dev/vg00/lvol4

Now the data in lvol4 will get mirrored to lvol4b and only lvol4 will be present.

Rgds,
dark-sun
Frequent Advisor

Re: Question about vgsplit and vgmerge

Hello RK,
lvol4b is the good one and lvol4 is the "bad" one,

Your syntax will copy lvol4 (bad) into lvol4b (good).
But you are right, than I have a lvol4 (but with bad data ;-)

I found out, that I can umount the FS and use move the lvol and rlvol to a new name!

But how can I fix the error-messages:
"Warning: Can not determine all Physical Volumes on which mirrored copies of
the Logical Volume are located. /etc/lvmtab is missing Physical Volumes."
IT_2007
Honored Contributor

Re: Question about vgsplit and vgmerge

move /etc/lvmtab to /tmp and do vgscan -av to recreate new lvmtab.