1825222 Members
4429 Online
109679 Solutions
New Discussion юеВ

lvplit error!

 
SOLVED
Go to solution
Amit Manna_6
Regular Advisor

lvplit error!


HI,
While i am trying to do a lvspit of a LV it gives error was follows:

lvsplit: Logical Volume is not wholly contained by the specified Physical Volumes.


It was not having problems since it was extended on last Friday.


Can any one suggest and help me out
8 REPLIES 8
OldSchool
Honored Contributor

Re: lvplit error!

please post the results of "lvdisplay -v "

and the "lvsplit" command that you are attempting.
Amit Manna_6
Regular Advisor

Re: lvplit error!

HI,
Please find details below

lvdisplay -v /dev/vgp_lus_d1/lvol_db01 | pg


--- Logical volumes ---
LV Name /dev/vgp_lus_d1/lvol_db01
VG Name /dev/vgp_lus_d1
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 5028
Current LE 1257
Allocated PE 1257
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict/distributed
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c4t0d2 67 67
/dev/dsk/c4t0d3 67 67
/dev/dsk/c4t0d4 67 67
/dev/dsk/c4t0d5 67 67
/dev/dsk/c4t0d6 67 67
/dev/dsk/c4t0d7 67 67
/dev/dsk/c4t1d0 67 67
/dev/dsk/c9t1d1 99 99
/dev/dsk/c9t1d2 99 99
/dev/dsk/c9t1d3 99 99
/dev/dsk/c9t1d4 99 99
/dev/dsk/c9t1d5 98 98
/dev/dsk/c9t1d6 98 98
/dev/dsk/c9t1d7 98 98
/dev/dsk/c9t2d0 98 98

--- Logical extents ---
LE PV1 PE1 Status 1
00000 /dev/dsk/c4t0d2 00000 current
00001 /dev/dsk/c4t0d3 00000 current
00002 /dev/dsk/c4t0d4 00000 current
00003 /dev/dsk/c4t0d5 00000 current
00004 /dev/dsk/c4t0d6 00000 current
00005 /dev/dsk/c4t0d7 00000 current






lvdisplay -v /dev/vgp_lus_d1/lvol_db01b | pg
--- Logical volumes ---
LV Name /dev/vgp_lus_d1/lvol_db01b
VG Name /dev/vgp_lus_d1
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 5028
Current LE 1257
Allocated PE 1257
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict/distributed
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c4t2d1 67 67
/dev/dsk/c4t2d2 67 67
/dev/dsk/c4t2d3 67 67
/dev/dsk/c4t2d4 67 67
/dev/dsk/c4t2d5 67 67
/dev/dsk/c4t2d6 67 67
/dev/dsk/c4t2d7 67 67
/dev/dsk/c4t3d0 67 67
/dev/dsk/c9t1d1 32 32
/dev/dsk/c9t1d2 32 32
/dev/dsk/c9t1d3 32 32
/dev/dsk/c9t1d4 32 32
/dev/dsk/c9t1d5 32 32
/dev/dsk/c9t1d6 32 32
/dev/dsk/c9t1d7 32 32
/dev/dsk/c9t2d0 32 32
/dev/dsk/c9t3d1 67 67
/dev/dsk/c9t3d2 67 67
/dev/dsk/c9t3d3 67 67
/dev/dsk/c9t3d4 66 66
/dev/dsk/c9t3d5 66 66
/dev/dsk/c9t3d6 66 66
/dev/dsk/c9t3d7 66 66

:
Hein van den Heuvel
Honored Contributor

Re: lvplit error!

Amit

Just to be clear...

1) You previously succesfuly used lvsplit on this lv.

2) That LV was always allocated over mutlple physical devices

3) an lvextend was successfuly issued on Friday and the lvsplit has failed since.

Anything else done to the volume Friday?

I notice this warning in the lvsplit man page:

"and there must be enough unused logical volumes remaining in the volume group to hold the newly split logical volumes."

A vgdisplay would show whether you have space left to define/name the cloned volumes.

Some exact commands on the lvsplit and/or lxentend might be needed.

fwiw,
Hein.
Amit Manna_6
Regular Advisor

Re: lvplit error!

While the file system was extended LV was in Split state. There are two PVGS in the volume group. Now i can see there are common disks present in both the copies. Can that be a issue. I am attaching the configuration after the file system extension for a particular LV.

Mridul Shrivastava
Honored Contributor
Solution

Re: lvplit error!

Did you do lvsplit and then extended the LV and now trying to do lvsplit again??? If this is correct then this output is obvious, Please refer the man pages of lvsplit and lvmerge, following is the extract:
Whenever a mirrored logical volume is split into two logical volumes, a bit map is stored that keeps track of all writes to either logical volume in the split pair. When the two logical volumes are subsequently merged using lvmerge, the bit map is used to decide which areas of the logical volumes need to be resynchronized (see lvmerge(1M)). This bit map remains in existence until one of the following conditions occurs:

+ The merge is completed.

+ One of the logical volumes is extended, reduced, or split again.

+ The volume group is cross-activated to shared mode (see vgchange(1M)).

+ The system is rebooted.

WARNINGS : After a two-way mirrored logical volume has been split once, it cannot be split again without merging the logical volumes using the lvmerge command (see lvmerge(1M)).


Refered the man pages of lvmerge, it clearly says "The lvmerge command merges two logical volumes of the same size." So now it won't be possible to merge the lv's back since you extended the LV after lvsplit.

Time has a wonderful way of weeding out the trivial
Hein van den Heuvel
Honored Contributor

Re: lvplit error!

Yeah, I think that explains.

Sounds like LV A had mirror.
This was split into A and Ab
At this point the sstem maintains a bitmap for a minimerge
Now A was extended into AA
This drops the bitmap.
Than a merge is attempted, but Ab is the wrong size.
So now you need to grow Ab to become AAb
Then do a full merge.

Per lvmerge manpage:

"If there is no bit map available, the entire logical volume is resynchronized."

Hein.



Amit Manna_6
Regular Advisor

Re: lvplit error!

HI,
When it was in split state it was in split state. We had extended the Lv and LV-B to equal size.

Mridul Shrivastava
Honored Contributor

Re: lvplit error!

As far as remember.. it is not a supported way to split the lv and then extend both copies.... If it works then u r lucky but this is not suported....
Time has a wonderful way of weeding out the trivial