1834093 Members
2333 Online
110063 Solutions
New Discussion

Add in a new PV into VG

 
SOLVED
Go to solution
Ngoh Chean Siung
Super Advisor

Add in a new PV into VG

Hi,

Currently I have 1 VG00 with 1 PV which is 36GB. The PE size is 4MB.

I would like to add in a new PV which is 72GB into this VG00. So, what is the size that system will detect? 72GB or 36GB?

Because according to HP engineer, he told me that even I add in more than 36GB hard disk into this VG00, the max size that the system detect is 36GB only.

Is it true that what he told me?

regards.
14 REPLIES 14
bhavin asokan
Honored Contributor

Re: Add in a new PV into VG

hi,

HP engineer is true.
max. size you can use from one PV is =size of one pv extent*Max PE per PV.

for the root pv when you are installing OS ,the number of extents and Max PE per PV will be setted automatically as per size of disk.you have to create a new VG if you want to use this 73GB fully.
otherwise you should install OS on higher size disk and then add smaller disk.
regds,
bhavin asokan
Honored Contributor
Michael Tully
Honored Contributor

Re: Add in a new PV into VG

Once a VG has been created, it does not matter what size LUN you add later, it will only be the same as the first LUN that the VG was created with. Your best bet is to create a secondary VG00 VG and them place this one as your real VG later. It is quite possible.
Anyone for a Mutiny ?
Hein van den Heuvel
Honored Contributor

Re: Add in a new PV into VG

Hi,

Check out 'man vgcreate' very carefully. It's all there!
As you have the default pe_size of 4mb,
bhavin and myself suspect you also have the default max_ps which is adjusted to match the physical volume size. So that's about 9000 extends of 4MB, and that's now the max you can ever use on any disk added to that vg (probably max_pv = 16).
Verify with vginfo -v /dev/vg00

Unfortunatly, you have to roll-out, roll back-in, or re-ignite to change to a max_pe and/or pe_size.

But how about just adding the new disk in a new volume group? How critical is it to you do see a single volume group? Why not add a seconds one?

Also... there are many prior topic on this very question. Please try a search... more options... forum = hpux... text = max_pe (or something like that).

hth,
Hein.
Ngoh Chean Siung
Super Advisor

Re: Add in a new PV into VG

Hi,

How about if I add in a hard disk where the size is less than 36GB?

Server A
========
VG00 (1 PV with 36GB) PE=8
VG01 (1 PV with 36GB) PE=4

Server B
========
VG00 (1 PV with 72GB) PE=4
VG01 (1 PV with 72GB) PE=4
VG02 (1 PV with 36GB) PE=4
VG03 (1 PV with 36GB) PE=4

All the above installation and configuration is done by the HP engineer. I just wonder why he set the small PE? Any reason?

regards.
bhavin asokan
Honored Contributor

Re: Add in a new PV into VG

hi,

when you are creating a new vg if you are not specifying any options (see man page of vgcreate) default it will take a pe size of 4MB and max PE per PV as 1016 (if disk is less than 4GB).depending upon the size of disk max pe per pv will increase up to 65535 as default .

see the following options if you want to change this settings


-e max_pe Set the maximum number of physical extents
that can be allocated from any of the
physical volumes in the volume group. The
default value for max_pe is 1016. However,
if the size of any physical volume exceeds
1016 times the pe_size, the default value for
max_pe is adjusted to match the physical
volume size. The maximum number of physical
extents can be a value in the range 1 to
65535.



-s pe_size Sets the number of megabytes in each physical
extent, where pe_size is expressed in units
of megabytes (MB) in the range 1 to 256.
pe_size must be equal to a power of 2 (1, 2,
4, 8, etc.). The default value for pe_size
is 4 (four megabytes).



once created thereis no other way to change this parameters other than recreating the VG which will destroy data .

regds,
Ngoh Chean Siung
Super Advisor

Re: Add in a new PV into VG

Hi,

It means that no matter the hard disk size, if I'm not specify the PE size, the default PE size is 4MB. Am I right?

I thought the PE size will be adjusted by the system according to the hard disk size if we are not specify the PE size.

The most important thing is accroding to HP engineer, he told me that there is no different in term of perfomance, speed of data transferring if hv bigger PE size. Is it true?

regards.
bhavin asokan
Honored Contributor

Re: Add in a new PV into VG

hi,

speed of data trasferring ,etc depends on disk.

the io will depend on what is the rpm of disk,how many controllers you are using to access that disk (if you are using disk array),your network,etc.

regds,
Bharat Katkar
Honored Contributor

Re: Add in a new PV into VG

Hi,
All the above installation and configuration is done by the HP engineer. I just wonder why he set the small PE? Any reason?

No he has not done it deliberatley but used default. Default is 4MB. if you do not specify PE size while creating VG then it is set to 4MB whereas in ServerA he has set it to 8MB.
Well on server B i think you should go for new vg and this time make sure to specify the -s option which decides about the PE size. And then add disk to that VG instead of going in destructively. It offcourse depends on your requirement.

Hope that helps.
Regards,
You need to know a lot to actually know how little you know
Fred Ruffet
Honored Contributor

Re: Add in a new PV into VG

PE size only have granularity. The same as when you will mkfs (format) your LV. Once you've done, every LV on that VG will have its size a factor of this PE size. So it may drive you to loose space. That's why PE is not bigger as a default.

Regarding auto-sizing of PE, I believe it will be done by sam. IT will give 4 or 8 MB PE depending on disks size.

PE size is defined in VG structure. Modifying it will imply re-creating the VG. No other way.

Regarding max_pe_per_pv, it also indicates max size for a new PV in that VG.

Now VG00 is a not different. Problem is that it is built upon install. OS is on VG00. Change PE size implies recreating VG. Implies re-install OS and include from start this new disk.

Regards,

Fred


--

"Reality is just a point of view." (P. K. D.)
Ngoh Chean Siung
Super Advisor

Re: Add in a new PV into VG

Hi,

How about if I add in a hard disk where the size is less than 36GB into this VG00? Let said 20GB hard disk. What is the size that the system will detect?

regards.
Bharat Katkar
Honored Contributor

Re: Add in a new PV into VG

HI,
Yes it will detect entire 20 GB (formatted capacity would be little less) that should not be an issue.
The way Vg is created it support maximum size of PV upto 34GB so upto that there is no problem.
It will only detect less space if the disk is more than 36 GB.

Hope that helps,.
Regards,
You need to know a lot to actually know how little you know
Trond Haugen
Honored Contributor
Solution

Re: Add in a new PV into VG

You can add several 36Gb disks to you vg00 it increase its size. The only problem is adding bigger disks as only 36Gb of the is usable.

The option of reinstalling is made easier by Ignite/UX. It can be used to make a backup of the 36Gb disk and install /restore on the 72Gb.
I belive you can change the PE size when installing from Ignite. But you will also need to change the Max PE pr PV if you want to accoadate for even bigger disks.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
Angus Crome
Honored Contributor

Re: Add in a new PV into VG

The other question is, why do you want your root volume group (should be OS only) to be any bigger than 36Gb? If at all possible, you should try to seperate your OS from your actual data/applications. This will alleviate all kinds of potential bottlenecks to the OS.

However, if you don't actually grow the OS itself onto that second disk, then it is effectively seperated from your OS data stream. But I generally find it to be a bad practice, as some part of the OS generally ends up on there.

Unless you absolutely need that much space for your OS, it would be faster and easier to just create a second Volume Group and mount any directories you need from Logical Vols in that one. You generally should not need 36Gb for the OS much less 72GB or 108Gb.
There are 10 types of people in the world, those who understand binary and those who don't - Author Unknown