Operating System - HP-UX
1833862 Members
2250 Online
110063 Solutions
New Discussion

Re: RAC HPUX - Add logical volume to existing config

 
Gene Kornacki_3
Advisor

RAC HPUX - Add logical volume to existing config

RAC HPUX - Add logical volume to existing config

I'm going to add a logical volume to an existing RAC configuration, so I can create 2 new tablespace, and I would just like to run my plans by someone in order to make sure I'm not missing something. This is a production environment and it's my job if I make a mistake.

Here is my script:

lvcreate -m 1 -M n -c n -s g -n users02.dbf -L 2048 /dev/vg_ops3
lvcreate -m 1 -M n -c n -s g -n index02.dbf -L 2048 /dev/vg_ops3

chmod 660 /dev/vg_ops3/r*
chown oracle:dba /dev/vg_ops3/r*

vgchange -a n vg_ops3

vgexport -s -p -m /tmp/vg_ops3_add.map /dev/vg_ops3

rcp /tmp/vg_ops3_add.map node2:/tmp

And then the vgimport:

vgimport -v -s -m /tmp/vg_ops3_add.map

Of course vgimport will not recreate, thus wiping out, the existing logical volumes, right? I debated creating the lv's on each machine manually. Is that a better solution? This is a two node cluster.

I can't imagine this not working perfectly, but I have to be 100% sure. If anyone can see something wrong or has any additions they could suggest please let me know. Thank you.
5 REPLIES 5
Ian Dennison_1
Honored Contributor

Re: RAC HPUX - Add logical volume to existing config

gene,

Have done a lot of work with vgexport / vgimport, but not with RAC (Royal Auto Club?)

Your vgexport does a preview only, no actual export takes place. Later when you perform the vgimport on the other server, won't you have problems? Is this deliberate?

The map file only contains the mappings of logical volume numbers to logical volume names. Where do you specify the disks to be used?

vgimport does not remove lvols, but will amend the VG id on the disks (unless you add the VG Minor Number the same as the original).

Hope these do not contradict whatever RAC does.

Share and Enjoy! Ian
Building a dumber user
Stuart Abramson_2
Honored Contributor

Re: RAC HPUX - Add logical volume to existing config

Below is how I do it.

You are using raw files, I guess, so you don't do some of the stuff I do. Mount points and stuff.

I also don't do RAC. On RAC the DB runs at the same time on both nodes? Is that right?

So, my stuff is based on the Oracle is ONLY runnign on the primary node when I add the LV.

But see if any of this applies to you..

ADD LV TO A CLUSTER:

1. Create the LV on the primary side of the cluster:

a. Add LV to an existing or new PV:

lvcreate -n lvolNEXT vgXX /dev/dsk/cNew
newfs -F vxfs /dev/vgXX/rlvolNEXT

b. Add new LV to /etc/cmcluster/package/package.cntl:

vi /etc/cmcluster/package/package.cntl

add in appropriate spot:

LV[56]="/dev/vgdb/sapdata46"; FS[56]="/oracle/PA1/sapdata46"

c. Make new mount point:

cd /oracle/PA1/
mkdir sapdata47

d. Mount LV manually for now:

mount /dev/vgdb/sapdata /oracle/PA1/sapdata47

e. Copy config files to other side:

rcp -rp /etc/cmcluster/ci/ci.cntl NodeB:/etc/cmcluster/ci/.
f. Creat new mapfile:

cd /etc/cmcluster/package
vgexport -p -s -m mapfile.VGname vgNAME
rcp -rp mapfile.VGname NODEB:/etc/cmcluster/package/.


2. Create new LV on adoptive node.

(You must create the /dev/vgdb/lvolX entry in /dev/vgdb.)

a. Note VG minor number:

# ll /dev/vg*/group
crw-r----- 1 root root 64 0x000000 1996 /dev/vg00/group
crw-rw-rw- 1 root sys 64 0x120000 12:39 /dev/vg_SG/group
^^
Record

b. vgexport the VG

vgexport vgXX # get rid of the /etc/lvmtab entry

c. vgimport VG:

# mkdir /dev/vgXX
# mknod /dev/vgXX/group c 64 0x120000
^^
Use the same minor number..
vgimport -s -m mapfile vgXX
strings /etc/lvmtab # verify that all disks are ther

3. Test package scripts at next outage.


melvyn burnard
Honored Contributor

Re: RAC HPUX - Add logical volume to existing config

take a look at the configuring RAC clusters manuals at:
http://docs.hp.com/hpux/ha/#ServiceGuard%20Extension%20for%20Real%20Application%20Cluster%20(ServiceGuard%20OPS%20Edition)
and htemn take a read of the Managing MC/ServiceGuard manual at:
http://docs.hp.com/hpux/ha/#ServiceGuard

You will have to halt the cluster I believe, as the vg is in Shared mode.
From ht Configuring RAC Clusters manual:
Making Changes to Shared Volume Groups

You may need to change the volume group configuration of RAC shared logical volumes to add capacity to the data files or to add log files. No configuration changes are allowed on shared LVM volume groups while they are activated. The volume group must be deactivated first on all nodes, and marked as non-shareable


My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Gene Kornacki_3
Advisor

Re: RAC HPUX - Add logical volume to existing config

Thanks everyone, I think I have it figured out now.
Ian Dennison_1
Honored Contributor

Re: RAC HPUX - Add logical volume to existing config

Gene,

Glad to hear you have figured it out.

Can you confirm (at your leisure) what it was, as I will probably be going though this in a couple of months.

Thanks, Ian
Building a dumber user