In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to achieve Oracle cluster self-startup". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to achieve Oracle cluster self-startup".
Let's first look at the following parts:
Oracle 10G:
Cat / etc/inittabh2:35:respawn:/etc/init.d/init.evmd run > / dev/null 2 > & 1 / etc/init.d/ohasdlrwxrwxrwx. 1 root root 17 Feb 21 2018 / etc/rc.d/rc6.d/K15ohasd-> / etc/init.d/ohasdlrwxrwxrwx. 1 root root 17 Feb 21 2018 / etc/rc.d/rc4.d/K15ohasd-> / etc/init.d/ohasdlrwxrwxrwx. 1 root root 17 Feb 21 2018 / etc/rc.d/rc2.d/K15ohasd-> / etc/init.d/ohasdlrwxrwxrwx. 1 root root 17 Feb 21 2018 / etc/rc.d/rc1.d/K15ohasd-> / etc/init.d/ohasdlrwxrwxrwx. 1 root root 17 Feb 21 2018 / etc/rc.d/rc0.d/K15ohasd-> / etc/init.d/ohasdlrwxrwxrwx. 1 root root 17 Mar 26 01:40 / etc/rc.d/rc3.d/S96ohasd-> / etc/init.d/ohasd [root@rac1 ~] #
When is init.ohasd/ohasd called
1) post the BIOS and read the MBR and load the Bootloader program according to the boot device configured in the BIOS.
2) load and execute the bootstrap program GRUB.
3) GRUB loads the kernel image according to configuration.
4) kernel boot (root file system mount, kernel execution / sbin/init).
5) Init initializes the system according to the run level configured in / etc/inittab (initialization script: / etc/rc.d/rc.sysinit). / the configuration file in etc/init/* takes effect at this step
6) start the service according to the different running level (the server script is located in / etc/rc.d/rc [0-6] .d).
The Linux system can be divided into six steps at startup, and init.ohasd and ohash are called to start the cluster in steps 5 and 6.
When the system boots to step 5, the init process scans all the configuration files under / etc/init/. For Oracle clusters, the init process derives the init.ohasd process based on the contents of / etc/init/oracle-ohasd.conf (init.ohasd issues the command to read the pipe file npohasd).
When the system boots to step 6, the script in / etc/rc.d/rc [0-6] .d / * is executed depending on the startup level of the system, and ohasd calls the $ORACLE_HOME/bin/crsctl script, and crsctl is responsible for starting the cluster.
| | disables cluster self-starting ohasdstr |
There is a configuration file ohasdstr in the / etc/oracle/scls_scr/ [Sid] / root/ directory. When the ohasd script is called, the ohasdstr file is read and the enable/disable recorded in the ohasdstr file is used to determine whether the cluster starts automatically with the system startup.
How to prevent the cluster from starting itself when the system starts? The correct way is to use "crsctl disable/enable crs" to control whether the cluster starts automatically when the system starts, and "crsctl disable/enable crs" actually modifies the configuration file ohasdstr.
As follows:
# cat / etc/oracle/scls_scr/qdata1/root/ohasdstr enable [root@qdata1 / root] # crsctl disable crsCRS-4621: Oracle High Availability Services autostart is disabled. [root@qdata1 / root] # cat / etc/oracle/scls_scr/qdata1/root/ohasdstr disable [root@qdata1 / root] # crsctl enable crsCRS-4622: Oracle High Availability Services autostart is enabled. [root@qdata1 / root] # cat / etc/oracle/scls_scr/qdata1/root/ohasdstr enable [root@qdata1 / root] #
Of course, we can also modify the ohasdstr file manually.
In addition, there are also some materials that comment out the derived init.ohasd part of oracle-ohasd.conf when prohibiting cluster self-startup. When the system starts, the init process cannot derive the init.ohash script, but this is a tricky way to directly prohibit the operation of init.ohasd. This way is not recommended. If the init.ohasd script is not started, the npohasd named pipe file will not be created and will not be created by read. When you need to start the cluster manually using 'crsctl start crs', the cluster cannot be started because the named pipe is read, in which case we can manually execute "exec / etc/init.d/init.ohasd run" and then use the' crsctl start crs' command to start the cluster.
By the way, there is also an ohasdrun configuration file in the / etc/oracle/scls_scr/ [Sid] / root/ directory, which is a configuration file that controls whether init.ohasd achieves the high availability of ohasd.bin. As we said above, one of the functions of init.ohasd scripts is to achieve high availability of ohasd.bin processes. Init.ohasd uses the configuration file ohasdrun to determine whether or not to start the ohasd.bin process when the ohasd.bin process terminates abnormally.
What to do after the loss of init.ohasd/ohasd
The two init.ohasd/ohasd scripts are copied from the $GRID_HOME/crs/init/ directory during root.sh execution during the cluster installation and configuration. When the script init.ohasd/ohasd is lost, it can be re-copied from $GRID_HOME/crs/init, and the init.ohasd/ohasd permission in / etc/init.d is set to 755.
Thank you for your reading, the above is the content of "how to achieve Oracle cluster self-startup". After the study of this article, I believe you have a deeper understanding of how to achieve Oracle cluster self-startup, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 258
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.