1855296 Members
1718 Online
104109 Solutions
New Discussion

Re: "cmrunserv" command.

 
Rajesh SB
Esteemed Contributor

"cmrunserv" command.

Hi Experts,

I want to take a backup of a Database, which is running on HA Cluster. This database is monitored by a script.

My plan as below to take backup without halting the package.

1.Halt the monitor service by
# cmhaltserv
2. Lock the Database to take backup.
# lock -db
3. Taking snapshot of Database mountpoint using Online JFS.
# mount -F vxfs -o snapof= /dev/vgsnp/lvsnp /BACKUP
4. Unlock database
# unlock -db
5. start the monitor service
# cmrunserv

I am not able to run the service again using "cmrunserv" command.
When you execute this command, says the file is existing.
Is there any way to rerun the Service.

Yours valueable input is highly appreciated.

Thanks & Regards,
Rajesh
12 REPLIES 12
Michael Steele_2
Honored Contributor

Re: "cmrunserv" command.

You're using unsupported commands, 'cmrunserv'. You need to be using 'cmrunpkg package_name' and 'cmhaltpkg package_name'.

Refer to 'cmviewcl -v' if you don't know the package names.

I believe service's are meant to connect the package.conf and package.cntl files only.
Support Fatherhood - Stop Family Law
Michael Steele_2
Honored Contributor

Re: "cmrunserv" command.

Tricia Sambrano
Frequent Advisor

Re: "cmrunserv" command.

Rajesh,
As far as the cmrunserv, I concur with the above reply. As for your underlying question; You need to build into the monitoring script the ability perform maintenance (i.e. the ability to take down the database).
This is usually done by setting a MAINTENANCE flag (file). A suggestion would be to have the script check of the MAINTENANCE file existence at which time the script will not check for the processes.
If you did not create the monitoring script, this may have already been done- it's fairly standard in the SG installations that I do and have modified.
Good luck,
Trish
UNIX IS user friendly... it's just selective about who its friends are. -Fabio Esquivel
Sritharan
Valued Contributor

Re: "cmrunserv" command.

Hi,

like others I'll also prefer using the cmhaltpkg and cmrunpkg.If i'm not mistaken if you halt the monitoring service it would halt the package also right?
In our case
1.halt the package
cmhaltpkg -v
2. mount the dirs manually(script)
vgchange -a e vg1
vgchange -a e vg2
vgchange -a e vg3
vgchange -a e vg04
mount /dev/vg3/lvol01 /stage1
cmmodnet -a -i 10.2.11.141 10.2.11.0

3. Do the database maintenance

4. umount the dirs manually (script)
umount /stage1
umount /ifmx
umount /dump
umount /stage2
vgchange -a n vg1
vgchange -a n vg2
vgchange -a n vg3
vgchange -a n vg04
cmmodnet -r -i 10.1.1.121 10.2.10.0

5.Start up back the package
cmrunpkg -v

Thanks & Regards
Sri
Known is a drop...unknown is an ocean -> quote from a movie
T G Manikandan
Honored Contributor

Re: "cmrunserv" command.

you have to use cmhaltpkg.
This will inturn call cmrunserv.

Jakes Louw
Trusted Contributor

Re: "cmrunserv" command.

Heck, wouldn't it be easier just to stop the database and then do the backup, or am I missing something here?
Why not just execute the DB stop script that (I assume) is in the package shell script?
Trying is the first step to failure - Homer Simpson
Rajesh SB
Esteemed Contributor

Re: "cmrunserv" command.

Thanks for your valuable comments on this.
Finally, I decided cmrunserv is not possible in command line and also not right way of usage.

I am going to restart the package, once task is over.

Cheers,
Rajesh
Sanjay_6
Honored Contributor

Re: "cmrunserv" command.

Hi Rajesh,

If this is an oracle database, have you looked into the possibility of taking a db backup in hot backup mode. If not you can explore that option.

Hope this helps.

Regds
Jakes Louw
Trusted Contributor

Re: "cmrunserv" command.

Sanjay,
I assumed that he wanted a cold backup.
I still think that shutting the whole package for a backup is counter-productive.
Trying is the first step to failure - Homer Simpson
Sanjay_6
Honored Contributor

Re: "cmrunserv" command.

Jakes,

It doesn't look like he is planning on a cold backup. If so then the idea of maintainence flag suggested by other forum members is a good one.

Thanks
Sanjay
Rajesh SB
Esteemed Contributor

Re: "cmrunserv" command.

Hi Folks,

I am looking for cold backup.
So that, planing to lock the database, before starting backup.
I am using QTIP/TQL database.

Thanks for your valualbe time spending on this issue.
We have decided to take backup by halting the application/Package.

Cheers,
Rajesh
melvyn burnard
Honored Contributor

Re: "cmrunserv" command.

There is a 3 day Advanced MC/ServiceGuard course, run by HP Customer Education, that has a module all about creating and using Maintenance Flags, and one of the labs used is to do this with an Oracle Database.
It might be worth atending this course, if it is available in your area.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!