1832074 Members
3186 Online
110035 Solutions
New Discussion

lvextend problem

 
sachit patil
Regular Advisor

lvextend problem

hi
I hv installed 9gb disk . in that i used 3gb .But i wnt to extend that lv there is no free pe on the disk . How i can extend the lv
regards
sachit patil
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: lvextend problem

Was this 9GiB disk added to an existing volume group in which the largest disk was smaller than 9GiB? The maximum number of PE's per PV is set when the VG was created and cannot be increased afterwards. (Well, there are exceptions but they don't apply here.)

What is the exact error message you are getting?
If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: lvextend problem

Shalom,

Run a pvdisplay command against the disk in question.

Note that if a logical volume is set to strict allocation it won't extend even if there is free space.

The command you used and system response would be helpful. It's always useful to post the OS system type as well.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
sachit patil
Regular Advisor

Re: lvextend problem

yes i mirrored from lower disk capacity . So it mirrored of that one and i reduced that smaller one .now 9gb is with 3gb filled data . but rest is free .but not shoen in lvdisplay and shown in vgdisplay .Error is following
lvextend : not enough freee physical extents available
lofgical volume /dev/vg01/lvdata could not be extended
failure possibly caused by strict allocation pollicy .


regards
sachit patil
A. Clay Stephenson
Acclaimed Contributor

Re: lvextend problem

Bingo. Lvextend is telling you exactly what is wrong. There are noi more free extents (from an LVM perspective) while there may be tons of free space with respect to the physical disk.

Unless you specfically take steps to override the default behavior when the VG is created, the number of PE's per PV is
and the PE_SIZE are adjusted to accomodate the largest disk listed when vgcreate is run.

Essentially, the last 6GiB of your disk is wasted unless you rebuild the entire VG. At 11.31 there is a vgmodify utility which might be of help but unless you are running 11.31 then you are stuck.



If it ain't broke, I can fix that.
DCE
Honored Contributor

Re: lvextend problem



If you do not have access to vgmodify, then you will have to destroy vg01 and recreate it.

backup your data (twice)

vgexport vg01 (quickest way to remove the disk)
or use the lvreduce and vgreduce the the disk

pvcreate the disk
recreate vg01 and lvols - you might want sure max PE and PE size are big enough to allow for future (larger) disks
KathyL1
Valued Contributor

Re: lvextend problem

The vgmodify command is available for HP-UX 11i V2 if you install the LVM patches PHCO_35524 and PHKL_36244.

Refer to the following Technical Knowledge Base document for specific information about the vgmodify command and Max PE per PV - http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en&docId=emr_na-c0
1007548-1


Kathy
Torsten.
Acclaimed Contributor

Re: lvextend problem

As mentioned before, if you are running hp-ux 11.23 or 11.31 you can modify the value using vgmodify.
Otherwise you should consider to backup your data, remove and re-create the VG.

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!