Serviceguard

Re: Adding a disk to an existing volume group

 
SOLVED
Go to solution
Antonio Prast
New Member

Adding a disk to an existing volume group

Hi;
A simple question ( I expect :-) )
I have to add a disk to an existing volume group which it has an Informix database that i have to make big.
I have read several post and the relatives documents but Ii have a doubt.
To do the vgextend, it's necessary to halt the package in which is defined the volume group or simply I do the command and after I modify the logical volumes and I make the vgexport -s -m so I can export the strcture to the other node that I have in my cluster ????

Thanks a lot,
7 REPLIES 7
Solution

Re: Adding a disk to an existing volume group

Antonio,

You can do the vgextend online, no problem.

However remember on your vgexport command to include a '-p' for preview, as you don't actually want to export the volume group.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Robert-Jan Goossens
Honored Contributor

Re: Adding a disk to an existing volume group

Hi Antonio,

--
that i have to make big
--

How big? Larger then the max_pe per pv?

Could you post the output of the vgdisplay -v vgxx command and the size of you disk/lun you would like to add?

Regards,
Robert-Jan
Antonio Prast
New Member

Re: Adding a disk to an existing volume group

Thanks,
I have just calculated the size and it doesn't pass the limit max_pe.
Steven E. Protter
Exalted Contributor

Re: Adding a disk to an existing volume group

Shalom,

I recommend a full backup before doing this work.

Note that if your PE size needs to be changed, the volume group needs to be redone from vgcreate command from scratch. Changing these aspects of volume group structure is not possible.

Plan a big enough window to handle this possible problem.

-s PE size
-p physical volume limit

These to vgcreate parameters let you control overall capacity. -p defaults to 255 and if you set that lower, your ability to access more space on a very large disk improves.

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
Robert-Jan Goossens
Honored Contributor

Re: Adding a disk to an existing volume group

Hi again,

You will not be able to add this disk/lun online. If you are running 11.23 or 11.31 you could have a look at the vgmodify command, there is even un unsupported version of this command for 11.11.

Have a look at vgmodify document.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1201316

Regards,
Robert-Jan
Carlos M.J.
Frequent Advisor

Re: Adding a disk to an existing volume group


Hi Antonio,

You don't need to stop package to vgextend a clustered volume. Simply vgextend with your new disk (of course, beware max PE per PV etc...), and then vgexport in PREVIEW mode (-p) your VG, and then vgexport and vgimport on inactive node.

On active node:
vgexport -p -v -s -m VG.map VG

rcp VG.map file to inactive node.

On inactive node:
vgexport VG
mkdir /dev/VG
mknod /dev/VG c 64 0x??0000 (??->the same number it had before vgexport)
vgimport -v -s -m VG.map VG

It would be wise to vgcfgbackup your newly created VG.

Hope it helps.
psreedhar
Frequent Advisor

Re: Adding a disk to an existing volume group

Hi,

If i look at the problem from LVM angle it is very simple and straight forward, no need of vgmodify and all.

You don't have to deactivate the volume group in all nodes. But you to deactivate the VG in all nodes but one.
In that one node you can keep your applications active.

I am assuming that your VG is activated in Shared mode.
Then run vgchange -a e -x to bring the VG to exclusive mode.
Then run
vgextend
lvextend -l /dev//
vgchange -a s -x
vgexport -m /tmp/map -s -p
rcp /tmp/map to all other nodes.

in all other nodes run the following commands.

vgimport -m /tmp/map -s
vgchange -a s