I am familiar with automating startup of single instances on Linux using $ORACLE_HOME/bin/dbstart and /etc/oratab and a script init /etc/init.d that invokes dbstart at the right runlevel.
Could someone say if any of that is relevant to automating the startup/shutdown of a 2-node RAC on Linux?
I've searched Google and this forum for an example of how to automate startup on RAC, but have come up empty-handed.
(I know things like srvctl start database -d mydb, but I am unclear if that needs to go into an init.d script, or if that takes care of all the crs processes etc., or if they need to be started up separately -and if there's a way to setup a dependency on the database and ASM instances, etc.)
Any pointers would be appreciated.
Clusterware/Grid Infrastructure (GI) is started at boot time by Linux/UNIX /etc/inittab configuration (this is automatically configured when installing GI).
Following picture details the 11.2 GI startup: http://docs.oracle.com/cd/E11882_01/rac.112/e16794/intro.htm#BABIDEFI.
By default GI is going to start all cluster resources using OCR configuration: VIPs, node applications, ASM instances, listeners, database instances .
You didn't specify your oracle version. but generally on RAC when you do a proper installation it will set you up to automated started when rebooting the server. Unless someone disable the automating restart. use srvctl enable to set it to automated startup
Hope it helps
For the auto start of CRS, you can find out the file (crsstart or ohasdstr) under /etc/oracle/scls_scr/`hostname`/root/. This file would store the value to indicate auto start or not.
enable auto start
crsctl enable crs
disable autod start
crsctl disable crs
For the CRS resource, you can check the requested resource with "crs_stat -p <resource name>". The output of "crs_stat -p" would show out the dependence resource.