Operating System - HP-UX
1832207 Members
2527 Online
110040 Solutions
New Discussion

LVM extending, What's wrong?

 
SOLVED
Go to solution
GerGon
Regular Advisor

LVM extending, What's wrong?

Hi gurus,

I'm trying to extend a lv into new one disk.
I have a vg00 in mirror disk, but I need more disk space, then I add two new disk, one for extend the lvol9 and the other for mirror.
Lvol9 will extend across of the two disks.

As you can see (attach file) the policy is "strict".

But I get:
1.vgextend -g PVG2 /dev/vg00 /dev/dsk/c2t0d0
vgextend: Not enough physical extents per physical volume.
Need: 8683, Have: 4350.

**** Warn, BUT always PASS..???? *****
I knew obviosly, that have 4k in one disk and now I trying to extend and it will be 8k

2. lvextend -L 15000 /dev/vg00/lvol9 PVG1
lvextend: "PVG1": No such file or directory

**** This command Fail ****

Can you review my attach, please.

What am I doing wrong?

Thanks 4 u time...
11 REPLIES 11
Helen French
Honored Contributor

Re: LVM extending, What's wrong?

It look like you have created vg00 originally with 18GB drives and now trying add 36GB drives to it. What happened is, unless otherwise specified, the OS will allocate default (or calculated) values for Max PE/PV, PE size, Max PV during VG creation. So, when you created vg00 originally, the system calculated the best values for 18GB drives and assigned it. Now when you add a 36GB drive, those values (Max PE and PE size) will not be enough.

The best practice is to define VGs by calculating future updates. In your case, you may create a recovery tape (make_tape_recovery) and recreate the root VG and it's values and then extend the LV.
Life is a promise, fulfill it!
Robert-Jan Goossens
Honored Contributor

Re: LVM extending, What's wrong?

Hi,

Take a look at this doc.

Document description: vgextend: not enough physical extents per physical volume
Document id: KBAN00000076

Europe
http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062683939

US
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062683939

Robert-Jan.
GerGon
Regular Advisor

Re: LVM extending, What's wrong?

Thanks for you answers..

BUT, because that, I can't do a lvextend?
WHY the lvextend doesn't find the PVG1?
Have I a syntax error? How will the syntax be?

Thanks
Pete Randall
Outstanding Contributor

Re: LVM extending, What's wrong?

I have to question why you would need to increase this lvol. What is in lvol9? Is this /var? An 18 GB disk should be extremely adequate for vg00, unless you have data mixed in with your root volume or seriously need some housecleaning to free up space. How about posting the output from "bdf -l"?


Pete


Pete
Helen French
Honored Contributor

Re: LVM extending, What's wrong?

To the last question:

Do you have enough free space on vg00 to extend the LV? what's the free PE count on this VG? What's the current LV size?

If you don't have enough free PEs, then the Lvextend will fail. Your vgextend is failing and for the same reason, the lvextend will also fail.

Also, like Pete noted, you may have to look at what is using the file system space? If it's log files and core files, trim or move it.
Life is a promise, fulfill it!
GK_5
Regular Advisor

Re: LVM extending, What's wrong?

The new disk you are adding has more PE than the PE per PV allowed in the VG. In this case only maximum allowed PE per PV will be used from this disk.
IT is great!
GerGon
Regular Advisor

Re: LVM extending, What's wrong?

 
Patrick Wallek
Honored Contributor
Solution

Re: LVM extending, What's wrong?

You can NOT change the Max PE per PV once the VG has been created. The only way to change it is to recreate the VG, which in the case of VG00 involves createing a make_tape_recovery tape and booting from the tape to essentially reinstall the system allowing you to modify the VG00 parameters, including MAX PE per PV.

The only other way you are going to be able to use all of your new disks is if you create another VG, ie VG01, that contains only the new disks.

The above are really your only 2 options.
GerGon
Regular Advisor

Re: LVM extending, What's wrong?

Tanks to all for your answers.

Excuseme, One question more to close...

I review the command lvextend but it isn't clearly for me.

How will the syntax be, to specify the pvg_name?

lvextend -L 26540 /dev/vgXX/lvYY ???????

Thanks
Helen French
Honored Contributor

Re: LVM extending, What's wrong?

Syntax:

# lvextend -L new_size_in_MB /dev/vgXX/lvol_name PVG_name

Your PVG name can be found from /etc/lvmpvg file.
Life is a promise, fulfill it!
Helen French
Honored Contributor

Re: LVM extending, What's wrong?

To add, I would suggest the best thing to do is create different VGs and LVs for applications. Move your existing data from vg00 if possible. Also, the lvextend will fail with PVG_names when:

1) The PVGstrict policy is not set for the LV
2) PVG is not created on system (/etc/lvmpvg)
3) The order (sequence) in lvmpvg file is wrong.
Life is a promise, fulfill it!