1833554 Members
3119 Online
110061 Solutions
New Discussion

lvsplit takes too long

 
Jim Mulshine
Frequent Advisor

lvsplit takes too long

I made a LVM change and ever since, lvsplit takes much longer to complete, 3 minutes before compared to 30 minutes after.

Before the change...I had 51 LVs distributed between vg01 (44 LVs) and vg02 (7 LVs). vg01 was created with defaults and it was made up of 12 PVs. vg02 was created so that it could be extended with PVs larger than the 6 PVs it had at the time of creation, and the maximum number of PVs can be 64.

The change eliminated vg01 and placed all of its PVs and LVs into vg02. Thus vg02 grew to 18 PVs and 51 LVs.

The problem is that now when we split the mirrored LVs in vg02 it takes so much longer than before. Does anyone have any theories as to why this occurs?

Some command output...
# vgdisplay vg02
--- Volume groups ---
VG Name /dev/vg02
VG Write Access read/write
VG Status available, exclusive
Max LV 255
Cur LV 51
Open LV 51
Max PV 64
Cur PV 18
Act PV 18
Max PE per PV 4350
VGDA 36
PE Size (Mbytes) 4
Total PE 31482
Alloc PE 28790
Free PE 2692
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
4 REPLIES 4
Carlos Fernandez Riera
Honored Contributor

Re: lvsplit takes too long

What?s about hardware? diferent controler types or number?

Whats about LE ditributions? Extends on one only disks or more disks, or more disks to distribute?

What about stripping???


just some ideas.
unsupported
A. Clay Stephenson
Acclaimed Contributor

Re: lvsplit takes too long

Hi Jim,

At the moment I'm clueless but I do have a couple of ideas.

1) Is your lvsplit command one big statement?
i.e. are you doing an lvsplit of all the logical volumes in one statement or are you doing a separate lvsplit command for each logical volume. If you are doing all the lvsplits in one command then I can see that you might have a possible n-squared problem waiting for all the lvols to sync before spliting.
2) I would, at least for the moment, break the lvsplit into a series of commands and I would timex each lvsplit command. If you see one lvol that is taking an inordinate amount of time that might point you in the right direction.

Just food for though, Clay
If it ain't broke, I can fix that.
Jim Mulshine
Frequent Advisor

Re: lvsplit takes too long

Thanks for the ideas! I tried the suggestion of splitting up the LVs between two lvsplit commands, however it still took 30 minutes. Any more ideas out there?
A. Clay Stephenson
Acclaimed Contributor

Re: lvsplit takes too long

Okay Jim,

So much for the n-squared idea. My psychic powers tell me that it is one logical volume. I would now turn you script into a for loop using timex to lvsplit the lvols one at a time.

Clay
If it ain't broke, I can fix that.