LVEXTEND

 
kunjuttan
Super Advisor

LVEXTEND

Hi Gurus,
I am getting the following error while I am trying to extend my Filesystem.My OS is HP-UX11.23..pls suggest

9 REPLIES 9
Torsten.
Acclaimed Contributor

Re: LVEXTEND

The vgextend already shows an error, hence you don't have enough space for the lvextend.

Consider to adjust with "vgmodify" first.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
kunjuttan
Super Advisor

Re: LVEXTEND

but why it is coming.is it due to PE size issue.And how to use vgmodify??
Torsten.
Acclaimed Contributor

Re: LVEXTEND

Max_PE per PV is set to 3199, this means you can have disk up to 51GB. Larger space will not be used.

Your VG has now 51GB free, so you cannot extend to larger space.

Consider to use vgmodify and increase MAX_PE.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
kunjuttan
Super Advisor

Re: LVEXTEND

Can you able to give me the steps and comands to do vgmodify.Is the data will be safe.??
Raj Briden
Frequent Advisor

Re: LVEXTEND

kunjuttan
Super Advisor

Re: LVEXTEND

HP-UX11.23
Matti_Kurkela
Honored Contributor

Re: LVEXTEND

Your vgdisplay indicates vgsapdata1 has 3199 free extents and the physical extent size is 16 MB. Apparently you've just added a new LUN to it.

So the available capacity is 3199 * 16 MB = 51184 MB.

The total capacity of this VG is 8445 * 16 MB = 135120 MB.

The existing /dev/vgsapdata1/lvsapdata1 seems to be the *only* LV in this VG, and you're trying to extend it.
But it's impossible to extend it to 153400 MB: it simply does not fit onto the current PVs.

The root cause is visible in the earlier output:

> vgextend: Warning: Max_PE_per_PV for the volume group (3199) is too small for this PV (4351).
> Using only 3199 PEs from this physical volume.

In other words, when the vgsapdata1 volume group was created, the "Max PE per PV" value was set to 3199. Either it was explicitly set with the -e option of the vgcreate command, or the size of the largest LUN used at VG creation time was exactly 3199 extents = 51184 MB. This limits the usable size of all new LUNs added to this VG to 51184 MB per LUN, even if the LUN is actually bigger than that.

If your VG had originally been created with Max PE per PV set to 4351 or greater, your commands would have been successful. Your new LUN would have given you 4351 new free extents, and the total capacity of this VG would have been (8445 - 3199 + 4351) * 16 MB = 153552 MB.

To fix this problem, you'll need either to remove the new LUN and request two or more new, smaller LUNs (each sized 51184 MB or less), or some application downtime to fix the VG configuration.

There are basically two ways to fix the VG to allow the addition of larger LUNs:

1.)
The old method: create an entirely new VG, copy the data to it, then remove the old one. (You can then rename the new VG back to the old name by doing a vgexport + vgimport.)

If you do this, you should choose the "Max PE per PV" and "PE size" values so that they won't restrict you from expanding the VG in the future.

The maximum size of a PV in LVM 1.0 (= the only available LVM version until HP-UX 11.31) is 2 TB. If you want to make a VG that is prepared to accept LUNs of up to 2 TB in the future, then you might want to push the PE size to 256 M and Max PE per PV to 8192, i.e. "vgcreate -s 256 -e 8192 ..."

If the PE size of 256 M is too granular for you, "vgcreate -s 128 -e 16384 ..." or "vgcreate -s 64 -e 32768 ..." would be acceptable alternatives. But if you are planning to use the entire VG for a single LV, there is no reason not to push the PE size as high as it can go.

2.)
If you have the appropriate LVM patches installed (PHCO_38717 or the newer PHCO_40920), you can use the vgmodify command to adjust your existing VG to accept larger LUNs. Unfortunately, in HP-UX 11.23 you cannot do it on-line: you must deactivate the VG to use vgmodify.

Please see:
http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01920387/c01920387.pdf (BSC link updated by admin)

http://www.hpuxtips.es/?q=node/179

MK
MK
kunjuttan
Super Advisor

Re: LVEXTEND

Thanx Matti..Thats what exactly i needed..
SoorajCleris
Honored Contributor

Re: LVEXTEND

That was excatly you wanted and you have assigned 5 points to him... Thats sad.

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie