Operating System - HP-UX
1823230 Members
3556 Online
109648 Solutions
New Discussion юеВ

Re: How to extend the PE per PV

 
SOLVED
Go to solution
Cat_4
Advisor

How to extend the PE per PV

When I do vgextend of my new 18G hdd to the vg02 , error shown :

vgextend: Not enough physical extents per physical volume. Need: 4341, Have: 2170.

But Volume group "vg02" has been successfully extended.

Volume Group configuration for /dev/vg02 has been saved in /etc/lvmconf/vg02.conf

Then I pvdisplay the new disk :

pvdisplay -v /dev/dsk/c13t13d0 | more

&a23y0C K--- Physical volumes ---

PV Name /dev/dsk/c13t13d0

VG Name /dev/vg02

PV Status available

Allocatable yes

VGDA 2

Cur LV 0

PE Size (Mbytes) 4

Total PE 2170

Free PE 2170

Allocated PE 0

Stale PE 0

IO Timeout (Seconds) default





--- Physical extents ---

PE Status LV LE

0000 free 0000

0001 free 0000

0002 free 0000

0003 free 0000

0004 free 0000

0005 free 0000

Total PE is only 2170 only.

Please advise. Thanks in advance.

Cat




8 REPLIES 8
Jeff Schussele
Honored Contributor

Re: How to extend the PE per PV

Hi Cat,

Sorry, the only way to increase max PE/PV is to recreate the VG from scratch.
So, you'll have to back up the data, vgexport the old VG & recreate a new one. But be advised that whichever disk you choose to create the new VG determines the default value unless overridden on the command line with a specific value. So use the 18Gb to create the VG initially & then vgextend with the smaller. Or just override the default on the vgcreate command line.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Rajeev  Shukla
Honored Contributor

Re: How to extend the PE per PV

Hi,
First thing is this parameter is controlled at the time of creation of a volume group i.e
vgcreate with -p option.

Now this situation comes when you have a smaller disk in a VG and later plan to add a bigger disk. You wouldn't be able to utilize the full capacity of the bigger disk. Like here you wouldn't be able to use whole 18GB.

Now the only way to do that is re-create the VG with -p option and increase the MAX PE PER PV.

Cheers
Rajeev
Michael Tully
Honored Contributor
Solution

Re: How to extend the PE per PV

You have created a volume group with a 9Gb disk. The way LVM works is that 9Gb is the largest disk that can be added once a group has been created. If you attempt to add another disk that happens to be larger, then all you will get is the maximum number of extents of the first disk being 9Gb. If you had created the group with an 18Gb disk, then any disk added after that can have a maximum size of 18Gb. If a 9Gb disk is added, then you will get 9Gb.
Anyone for a Mutiny ?
Artyom Voronchihin
Respected Contributor

Re: How to extend the PE per PV

Hello !
Read DOCID=UIUXKBRC00010068 in knowledge base.
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062922008

"Intel inside" is not a label, it's a warning.
Cat_4
Advisor

Re: How to extend the PE per PV

Dear all ,

Thanks for all your valuable feedback. It seems that I have no other choice apart from recreate the VG. May I double confirm that should I export the lvol first ? Or just simply export the VG02 after doing the back up ? It would be much appreciate if there is existing procedure on the command.

Thanks in advance !!

p.s. Marks will be given in next reply. Many many thanks !!

Best regards,
Cat
Pete Randall
Outstanding Contributor

Re: How to extend the PE per PV

Cat,

There's no need to worry about the lvol - just vgexport the volume group and all traces of it will disappear - then recreate with appropriate values.


Pete


Pete
Rajeev  Shukla
Honored Contributor

Re: How to extend the PE per PV

Hi Cat,
Once you have taken the backup of the whole VG you can safely export without worrying about each lvols.
When you export the VG all the lvols will disappear and the disks will also disappear from /etc/lvmtab and you can then re-create VG
Todd McDaniel_1
Honored Contributor

Re: How to extend the PE per PV

I might suggest to make a new VG with the new disk and then migrate over to it from the existing VG...

That may be an option for you to consider.

Recreation is the only way... If you have a good backkup, that should be a good way to restore although slow depending on if it is from tape or over the network and depending then on your network fabric...

But I would look at makeing a new VG then creating new LVOLs and moving the data over that way... may be easier and safer in my estimation...
Unix, the other white meat.