Operating System - HP-UX
1748194 Members
4491 Online
108759 Solutions
New Discussion юеВ

extending a physical volume

 
SOLVED
Go to solution
Brian Pyle
Frequent Advisor

extending a physical volume

I've got an EVA -- HSV110 SAN. If I want to increase the size of a disk, I increase the size of the LUN then copy the data somewhere else, remove the PV from the VG and recreate the VG with the larger LUN. What I would like to do, is to increase the size of the PV without having to recreate it. I've done some reading, and the only mention of extending a physical volume is in the vgcreate man pages. The -x option which is the default notes that this is to allow the addition of physical extents to a physical volume. Sounds like what I need, but how do I increase the PV with data on it?

TIA

Brian Pyle
Follow The Path With Heart
4 REPLIES 4
Mark Grant
Honored Contributor

Re: extending a physical volume

As far as I am aware, LVM doesn't support changinf the size of the PV after a create so I believe the only solution is to "pvmove" the extents somewhere, vgreduce your LUN out of there, increase the size of the LUN, pvcreate it, vgextend and then pvmove all your data back.

I will admit that the -x option of vgcreate looks quite exciting though!
Never preceed any demonstration with anything more predictive than "watch this"
Jeff Schussele
Honored Contributor
Solution

Re: extending a physical volume

Hi Brian,

As our esteemed colleague Clay Stephenson would say - That dog won't hunt.
You won't be able to "extend" the PV or LUN & leave the data untouched & available.
The better alternative would be to create another, new LUN & vgextend the Volume Group, lvextend the Logical Volume & increase the filesystem size with fsadm. This you could do w/o touching the data, provided you have the OnlineJFS product.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Brian Pyle
Frequent Advisor

Re: extending a physical volume

Thanx, I couldn't find an easy way to do it either :) So what exactly does the -x option of the vgcreate do for us??
Follow The Path With Heart
James R. Ferguson
Acclaimed Contributor

Re: extending a physical volume

Hi Brian:

The '-x extensibility' option can be expressed as '-x y' or '-x n'. 'y'es allows the allocation of new physical extents on the physical volume(s) specified by the 'pv_path'(s) or 'pvg_name' used during the 'vgcreate' or 'vgextend'.

The default value is 'y'es, which allows the (later) addition of physical extents on the physical volume by an 'lvextend' or 'lvcreate'. A value of 'n'o prohibits addition of physical extents on the physical volumes so set.

'pvchange -x [y|n]' allows you to alter the extensibility attribute.

The idea is that you can prevent selected physical volumes from being candidates for the allocation of physical extents on them when they are chosen, even when specified in a 'pv_path' or 'pvg_name' argument.

Regards!

...JRF...