Operating System - HP-UX
1833705 Members
2290 Online
110063 Solutions
New Discussion

steps for offline increasing of PE of VG

 
SOLVED
Go to solution
g3jza
Esteemed Contributor

steps for offline increasing of PE of VG

Hi,

I would like to re-create volume group so I can change the current value of PE Size(4MB) to higher value(16MB). Does the recreation of volume group corrupt data? The only reason I want to do this is that I need to extend some mounts

I've read a lot about this and found out something about vgexport command.
These are my steps I'd like to do in order to achieve higher value of PE Size:

1. umount all mounts using vg01
2. vgchange -a n /dev/vg01
3. vgexport /dev/vg01

4. mkdir /dev/vg01
5. mknod /dev/vg01/group c 64 0x010000

6. pvcreate -f /dev/dsk/c0t5d0
7. vgcreate -s 16 /dev/vg01 /dev/dsk/c0t5d0
8. recreate all logical volumes and mount them back.

On my testing system, I actually found out that it worked since all of the data in remounted LV's was there and readable.
Is this not going to corrupt any data?
Offcourse I should consider to backup all of the data first...

Thank you for your opinions
12 REPLIES 12
James R. Ferguson
Acclaimed Contributor

Re: steps for offline increasing of PE of VG

Hi:

Only in simple cases would I expect this to work. The Volume Group Reserved Area (VGRA) information established during a 'vgcreate' includes data that (will later) depict the physical and logical extent mappings of each logical volume.

Hence, I would only expect to be able to "recover' the correct relationships in straightforward configurations where logical volumes were successively allocated once on a fresh disk. Caveat emptor.

If you are running 11.31, you (now) have the option of using 'vgmodify' to change the volume group parameters. If you are running 11.23, there are patches available (back-ported from 11.31) that provide the same ability. Otherwise, backup your data; destroy the volume group; recreate it using the appropriate 'vgcreate' arguments; recreate your logical volumes; and reload your data.

Regards!

...JRF...
Sandy Chen
Honored Contributor

Re: steps for offline increasing of PE of VG

Hi,

What is your OS? If it is 11.23 or 11.31 you can use vgmodify and your data will still be there. But if it is 11.11, with the steps that you provide, your data will be destroyed and must be reloaded (backup/restore).

Good luck!

Regards
Sandy
I never think of the future. It comes soon enough.
Ramesh S
Esteemed Contributor

Re: steps for offline increasing of PE of VG

Hi

Just to add some more with JRF and Sandy suggestions.

If you are running

-> 11.00 -- No Other go.. Need to recreate VG & LV and restore data from backup

-> 11.11 -- vgmodify tool is available. You need to download and try that. But, that is not officially recommended.

-> 11.23 -- You need the patch PHCO_36744 for vgmodify command.

-> 11.31 -- vmodify command is there to resize the PE

Thanks & Regards

Ramesh

Torsten.
Acclaimed Contributor

Re: steps for offline increasing of PE of VG

vgmodify is a nice tool and can do a lot for you, but it CANNOT change the PE size:

"The new vgmodify command provides the ability to alter some characteristics of an existing Volume Group (VG) or Physical Volume (PV) that were set via vgcreate or pvcreate. These modifiable attributes are the maximum number of PVs, the maximum number of Logical Volumes (LVs) and the maximum number of extents per PV allowed in the VG, as well as whether a PV should be bootable or not. The vgmodify command handles the expansion (DLE) and contraction of a LUN."

see
http://h20000.www2.hp.com/bc/docs/support/SupportManual/c01920387/c01920387.pdf (BSC link updated by admin)

You should always backup your data!!!

If you pvcreate the disk - your data will be destroyed at least in 99% of cases).


Your steps are good, but you need to add data backup and restore!

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!   
g3jza
Esteemed Contributor

Re: steps for offline increasing of PE of VG

Thanks a lot for your responses.

I'm gonna find out what version those systems are after coming back to work in a few hours.

Anyway, I think increasing the 'max. PE per PV' parameter with that 'vgmodify' tool can do the job instead of increasing size of PE.

The backround of this is, that people apparently didn't think about the future before creating VG's for this testing oracle server.
There were some smaller LUN's on the va7400 before, like 15GB. When the increase(by 25GB) of mount point needed to be done, the HP guy came here and created 25GB LUN, so after vgextend not all of the PE got allocated. What a mess :((
Torsten.
Acclaimed Contributor

Re: steps for offline increasing of PE of VG

I agree, the increase of max PE will probably help.

For this you can use vgmodify.

See the doc I posted for usage instructions.

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!   
g3jza
Esteemed Contributor

Re: steps for offline increasing of PE of VG

It's 11.11, so I gues I'll be taking it on my own risk. Anyway, I'm gonna read that .pdf carefully.

Thanks again
Torsten.
Acclaimed Contributor

Re: steps for offline increasing of PE of VG

There is no official version of vgmodify for 11.11.

In this case you should backup all the data, delete the VG and re-create.
After this is done, restore your backup.

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!   
g3jza
Esteemed Contributor

Re: steps for offline increasing of PE of VG

Yep,

but I have nothing to lose I guess.

1. Backuping my data and try that vgmodify

If it fails, then I have to do the restore anyway :)
Robert-Jan Goossens
Honored Contributor
Solution

Re: steps for offline increasing of PE of VG

use at your own risk. The manual page is included in the zip file.

Regards,
Robert-Jan

Torsten.
Acclaimed Contributor

Re: steps for offline increasing of PE of VG

Nothing to loose is OK, but the problem is this:

vgmodify is already built-in for 11.31, delivered in patch format (LVM patch PHCO_36744) for 11.23 and not avail. for 11.11.


I would NOT try to install any 11.23 software on a 11.11 system.

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!   
g3jza
Esteemed Contributor

Re: steps for offline increasing of PE of VG

Wow, I was just going to look for that tool do download it myself.

Thank you very much, you are very helpful.