Operating System - HP-UX
1833863 Members
1944 Online
110063 Solutions
New Discussion

Re: Script for Split and Establishing Symm BCV's

 
cgshaju
Occasional Contributor

Script for Split and Establishing Symm BCV's

Hi
I am trying to write a script to Split, then do back up and establish BCVs on symm8830.
Hosts are hpux11x based and backup is NB4.5.
The Database is "Progress".
Anyone has done this before ?
Please try to help.
Thanks
9 REPLIES 9
Wilfred Chau_1
Respected Contributor

Re: Script for Split and Establishing Symm BCV's

Is the database a filesystem database?

You can split the BCV, then mount one copy onto the backup system, backup the data, and them establish the bcv.
Dave La Mar
Honored Contributor

Re: Script for Split and Establishing Symm BCV's

cgshaju -
We do this nighlty using an XP512 and NBDC. On the production machine we issue the resync command at a given time, scheduled in cron. At another given time we issue the parisplit, also via cron, and also on the production box.
The split script then calls a script on another box (our NBDC master), using remsh. That remote script performs the vgchange, fsck, mount, and then calls the backup script. The backup script checks the return code of the backup, notifies via email if the return code is -ne 0. If the return code -eq 0, it then calls a script to perform the umount.
In each of the scripts is anything fails, i.e. vgchange, fsck, mount, umount, backup, someone(s) are notified immediately.
Ours is a bit integrated since we break the scripts up into 7 different processes, one of each mentioned, so we have 7 backups running for this BC group.
With that in mind, if you are interested, I can post the commands in some of the scripts and whole scripts where that pertains and is reasonable.
Please advise if this fits your scenario.
Best of luck.
Regards,
dl
"I'm not dumb. I just have a command of thoroughly useless information."
Rita C Workman_1
New Member

Re: Script for Split and Establishing Symm BCV's

Hi,

Well since you mention a script to Split-I will assume that you have set up your device group (dg) and it includes the BCV disks.
Before going further...split the device group

symmir -g -instant split

Now....
First I must ask if you have already taken your BCV disks and created new volume groups (..on the server you intend to mount these on to do your back) with ONLY the BCV disks.

vgcreate /dev/vgname /dev/dsk/c-t-d- /dev/dsk/c-t-d- /dev/dsk/c-t-d- (with these devices being BCV disks only - and do this in one vgcreate statement)

Once you've created your BCV vg you can add the alternate links using the vgextend.

So...have you done this yet???

Rgrds,
Rita

..enough said
Rita C Workman_1
New Member

Re: Script for Split and Establishing Symm BCV's

woops...mistake.....stop

that should be create your vg in one statement but using the vgimport command...

whew....
So vgexport your disks from your primary dg server (I use the -s option)
vgexport -pvs -m /etc/lvmconf/vgname.mapxx /dev/vgname

then rcp this over to your other disk you intend you mount your BCV disks to..

mkdir /dev/vgname
mknod /dev/vgname/group c 64 0x- - 0000
Now...
vgimport /dev/vgname /dev/dsk/c-t-d- ...etc...

So Sorry !!!
Rita
..enough said
Geoff Wild
Honored Contributor

Re: Script for Split and Establishing Symm BCV's

We use Netbackup.

Here's the activate script...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: Script for Split and Establishing Symm BCV's

Here's the deactivate script.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
cgshaju
Occasional Contributor

Re: Script for Split and Establishing Symm BCV's

hi folks

It was really helpful to get your guide lines on what i am intenting to do.

I thank you very much for you all and i will try this and update the results later in this forum.

Bye

Shaju
Sundar_7
Honored Contributor

Re: Script for Split and Establishing Symm BCV's

One more thing , since the BCV is the exact hardware copy of the std devices, the VGRA & PVRA of the both std & bcv devices will be the same.

So if you are trying to mount the BCV in the same node as the std device (which may or may not be the case with u) then u need to run vgchgid. This command basically changes the VGID of the BCV physical disks so that they can be imported in to a different VG.

Look in to the man page of vgchgid.

Rita can validate this if possible.
Learn What to do ,How to do and more importantly When to do ?
Rita C Workman
Honored Contributor

Re: Script for Split and Establishing Symm BCV's

Yes, if you don't run this you will have a problem with try mount your BCV's.
I am including some scribbled notes of mine when for this...and you'll notice that running vgchid is included.
========================
setting up bcv's on another system !

After you have created your vg and your device group
on all systems you need to:
Example:
A device group that's R1/R2 to two systems for
failover. You would also create an R2 device group
for the box you intend to attach and mount your BCV's.

You can attach your BCV's to your R2 by doing the following:
Get list of your R2:
symrdf -g query

Map & lun mask your BCV's disks to the host you want to mount these on.
Remember your R2 disks would be mapped to your R2 host AND
to your BCV host as well. BUT YOUR BCV'S WOULD BE MAPPED -ONLY-
TO YOUR HOST THAT YOU WILL MOUNT THE BCV'S ON !!!!

Now add your BCV's to your device group:

symbcv -g associate dev

Now you must establish the R2/BCV pairing:

symmir -g -full establish DEV001 bcv dev

Note: I used DEV001 or the logical device number, you could
just as easily have used ...-full establish dev bcv dev

Once the pairing is finished you want to ensure the data is sync'd
from the R2 to the BCV so run on the host that will use the BCV's:

symmir -g establish

When sync'd then split them off:

symmir -g -instant split

Now go back to your R1 host and do a vgexport of each volume group
that are included in this device group to a mapfile and r-copy.

On R1 host: vgexport -pvs -m /etc/lvmconf/vgname.mapxxx /dev/vgname
rcp /etc/lvmconf/vgname.mapxxx :/etc/lvmconf

Now to set up your BCV's and mount you would need to know the c-t-d-
of your BCV's....so first manually track this down and document.
BE VERY CAREFUL....MISTAKES CAN BE VERY HARD HERE !! Use the disk space
report to match up dev# to vgnames is helpful in speeding this up.
Once documented - ready !

On your BCV host !!!!

cd /dev
mkdir
mknod /dev//group c 64 0x- - 0000 (minor number)

Now run to change the vgid on these disks...
vgchgid /dev/rdsk/c-t-d- /dev/rdsk/c-t-d- and so on for all the disks involved.

Now import your mapfile to create the vg:
vgimport -v -m /etc/lvmconf/vgname.mapxxx /dev/vgname /dev/dsk/c-t-d- /dev/dsk/c-t-d- etc.

Note: on the vgimport ONLY -v & -m used....also note the disks entered on
the line are the primary disks of ALL THE BCV DISKS
DO NOT USE THE -s OPTION HERE !!!

vgextend /dev/vgname /dev/dsk/c-t-d- (you can extend to add the BCV's alt links)
vgchange -a y /dev/vgname
vgcfgbackup /dev/vgname

mkdir /your mount point
mount /dev/vgname/lvname /your mount point

Your lvnames should have picked up from your mapfile correctly !

And you should now have your BCV's mounted on the other system !!!
Watch and ensure that they are not writeable, as you don't want your
Gold Copy/BCV copy altered, in case you should need to restore your R2/R1
from these !
Use the script to umount the f/s - refresh - split and re-mount everything. ###############################################

Like I said...just my scribbled notes for here..so excuse please.

Rgrds,
Rita