1829103 Members
2265 Online
109986 Solutions
New Discussion

lvmerge giving an error

 
Raghavendra GL
Advisor

lvmerge giving an error

Hi All,

I am trying to merge 2 LVs after lvsplit using lvmerge.It throws an error:

"The logival volumes /dev/vg01/lvol1b and /dev/vg01/lvol1 are different sizes" .Pls help me in merging these two LVs.

Rgds,
Raghavendra.

7 REPLIES 7
Naveej.K.A
Honored Contributor

Re: lvmerge giving an error

Raghavendra,

Does lvdisplay shows same size for both the logical volumes??

Please post the lvdisplay -v output for both the logical volumes.

Regards,
--Naveej
practice makes a man perfect!!!
Raghavendra GL
Advisor

Re: lvmerge giving an error

S its showing the two LVs with different size.
How do i merge it if its different size.

--- Logical volumes ---
LV Name /dev/vg01/lvol1
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery NOMWC
Schedule parallel
LV Size (Mbytes) 15000
Current LE 3750
Allocated PE 3750
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c3t0d0 2400 2400
/dev/dsk/c3t1d0 1350 1350

--- Logical volumes ---
LV Name /dev/vg01/lvol1b
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery NOMWC
Schedule parallel
LV Size (Mbytes) 23000
Current LE 5750
Allocated PE 5750
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c4t5d0 2400 2400
/dev/dsk/c4t6d0 3350 3350

Thayanidhi
Honored Contributor

Re: lvmerge giving an error

Hi,

How come you got two different size of LV?
May be after spiliting you did lvextend of one LV?

I don't think you can merge two LV of differnt sizes.

Remove the the backup (off line) LV and re-establish the mirror.

lvremove and lvextend.

That's the only workaround I see!

Regds
TT
Attitude (not aptitude) determines altitude.
Devender Khatana
Honored Contributor

Re: lvmerge giving an error

Hi,

Yes, the output of lvdisplay shows different sizes on both lvols. Possibally second copy was extended after split. Anyway you are going to merge it back having remove the data the best way would be to remove lvol and recreate mirror.

#lvremove /dev/vg01/lvol1b
Then recreate mirror

#lvextend -m 1 /dev/vg01/lvol1b

This is the simpleast way to achive this.

HTH,
Devender
Impossible itself mentions "I m possible"
KVK
Valued Contributor

Re: lvmerge giving an error


Hello Raghavendra,

There are two choice are available Either you take the backup of lvol1b and remove the lvol1b
using
#lvremove /dev/vg01/lvol1b
and extend the logical volume lvol1
#lvextend -L xxx /dev/vg01/lvol1b
or
Reduce the lvol1b and try to merge it , Ensure the backup of ur data

#lvreduce -l 3750 /dev/vg01/lvol1
and try to merge using the lvmerge

Raghavendra GL
Advisor

Re: lvmerge giving an error

Hi all,

Thanx a lot, i got it after lvremove and extablishing the mirror using lvextend.

Rgds,
Raghavendra.


Bharat Katkar
Honored Contributor

Re: lvmerge giving an error

Raghavendra ...now that it's working can you assign some points to say thankU to the responder and to help analyse the best response to your thread. If you need help in assigning point refer this link below:
http://forums1.itrc.hp.com/service/forums/helptips.do?admit=716493758+1085211538437+28353475#33

Thanks,
You need to know a lot to actually know how little you know