Install Oracle database 12c RAC On Oracle Enterprise Linux 6 Update 6(Step by step)
本文将一步步的介绍关于如何在Oracle Enterprise Linux 6的发行版上部署Oracle database 12c RAC。
由于本地资源有限,本文将部署两节点的RAC。
环境说明:
本文的存储服务器与节点服务器均通过VMware Workstation虚拟机实现。
共享存储:
Hostname:openfiler
IP:192.168.223.132
节点服务器:
节点一:
Hostname: ora12c1
IP:192.168.223.133 (基本的公共网卡IP)
节点二:
Hostname: ora12c2
IP:192.168.223.134 (基本的公共网卡IP)
介质准备:
Openfiler安装盘:
Openfiler下载路径:http://openfiler.com/
Oracle Enterprise Linux 6 Update 6安装盘:
OEL6U6下载路径:https://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number=18197008
Oracle Database 12C RAC安装介质:
Database 12C介质下载路径:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/database12c-linux-download-2240591.html
操作系统版本与内核。
对于两个节点服务器来说,操作系统统一采用“Oracle Enterprise Linux 6.6”,这个版本的Linux的版本信息与内核信息如下所示:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@ora12c1 ~]# lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: OracleServer Description: Oracle Linux Server release 6.6 Release: 6.6 Codename: n/a [root@ora12c1 ~]# [root@ora12c1 ~]# cat /etc/oracle-release Oracle Linux Server release 6.6 [root@ora12c1 ~]# [root@ora12c1 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.6 (Santiago) [root@ora12c1 ~]# uname -a Linux ora12c1 3.8.13-44.1.1.el6uek.x86_64 #2 SMP Wed Sep 10 06:10:25 PDT 2014 x86_64 x86_64 x86_64 GNU/Linux [root@ora12c1 ~]# |
注意:
操作系统版本务必是:64Bit。
从Oracle 12c开始,已经不再支持32位操作系统。
针对两个节点服务器的Linux通用配置。
所谓通用配置,顾名思义,即在两个节点上都需要作出的变更。
在通用配置部分所做的所有操作都需要在稍后配置的RAC节点服务器上做出更改,而本例中,该RAC的节点服务器数量为:2。
文件:/etc/hosts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
[root@ora12c1 ~]# cat /etc/hosts # Localhost 127.0.0.1 localhost # Public 192.168.223.133 ora12c1 192.168.223.134 ora12c2 # Storage 192.168.223.132 openfiler # VIP 192.168.223.135 ora12c1-vip 192.168.223.136 ora12c2-vip # Private 192.168.222.133 ora12c1-priv 192.168.222.134 ora12c2-priv # Flex Network 192.168.64.133 ora12c1-flex 192.168.64.134 ora12c2-flex # Scan 192.168.223.127 cloud-scan # GNS VIP 192.168.64.127 gns-vip [root@ora12c1 ~]# |
Linux软件包(RPM)
安装RPM比较方便的做法是依赖YUM实用程序。关于如何在Linux中配置YUM,本博客之前的日志里有过说明(URL:http://d-prototype.com/archives/66);也可以通过百度、谷歌找到相关知识点的论述。
YUM配置文件(For OEL 6.6)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
[root@ora12c1 ~]# cat /etc/yum.repos.d/iso.repo [iso] name=iso baseurl=file:///iso gpgcheck=0 [Server] name=Server baseurl=file:///iso/Server gpgcheck=0 [ResilientStorage] name=ResilientStorage baseurl=file:///iso/ResilientStorage gpgcheck=0 [HighAvailability] name=HighAvailability baseurl=file:///iso/HighAvailability gpgcheck=0 [LoadBalancer] name=LoadBalancer baseurl=file:///iso/LoadBalancer gpgcheck=0 [ScalableFileSystem] name=ScalableFileSystem baseurl=file:///iso/ScalableFileSystem gpgcheck=0 [UEK3] name=UEK3 baseurl=file:///iso/UEK3 gpgcheck=0 [root@ora12c1 ~]# [root@ora12c1 ~]# yum repolist Loaded plugins: refresh-packagekit, security HighAvailability | 3.7 kB 00:00 ... HighAvailability/primary_db | 55 kB 00:00 ... LoadBalancer | 3.7 kB 00:00 ... LoadBalancer/primary_db | 7.6 kB 00:00 ... ResilientStorage | 3.7 kB 00:00 ... ResilientStorage/primary_db | 51 kB 00:00 ... ScalableFileSystem | 3.7 kB 00:00 ... ScalableFileSystem/primary_db | 7.7 kB 00:00 ... Server | 3.7 kB 00:00 ... Server/primary_db | 3.1 MB 00:00 ... UEK3 | 3.7 kB 00:00 ... UEK3/primary_db | 626 kB 00:00 ... iso | 3.7 kB 00:00 ... iso/primary_db | 3.1 MB 00:00 ... repo id repo name status HighAvailability HighAvailability 76 LoadBalancer LoadBalancer 4 ResilientStorage ResilientStorage 62 ScalableFileSystem ScalableFileSystem 11 Server Server 3,765 UEK3 UEK3 12 iso iso 3,765 repolist: 7,695 [root@ora12c1 ~]# [root@ora12c1 ~]# |
(Pre-Request)需要保证Linux上安装了下列软件包:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
binutils-2.20.51.0.2-5.11.el6 (x86_64) compat-libcap1-1.10-1 (x86_64) compat-libstdc++-33-3.2.3-69.el6 (x86_64) compat-libstdc++-33-3.2.3-69.el6.i686 gcc-4.4.4-13.el6 (x86_64) gcc-c++-4.4.4-13.el6 (x86_64) glibc-2.12-1.7.el6 (i686) glibc-2.12-1.7.el6 (x86_64) glibc-devel-2.12-1.7.el6 (x86_64) glibc-devel-2.12-1.7.el6.i686 ksh libgcc-4.4.4-13.el6 (i686) libgcc-4.4.4-13.el6 (x86_64) libstdc++-4.4.4-13.el6 (x86_64) libstdc++-4.4.4-13.el6.i686 libstdc++-devel-4.4.4-13.el6 (x86_64) libstdc++-devel-4.4.4-13.el6.i686 libaio-0.3.107-10.el6 (x86_64) libaio-0.3.107-10.el6.i686 libaio-devel-0.3.107-10.el6 (x86_64) libaio-devel-0.3.107-10.el6.i686 libXext-1.1 (x86_64) libXext-1.1 (i686) libXtst-1.0.99.2 (x86_64) libXtst-1.0.99.2 (i686) libX11-1.3 (x86_64) libX11-1.3 (i686) libXau-1.0.5 (x86_64) libXau-1.0.5 (i686) libxcb-1.5 (x86_64) libxcb-1.5 (i686) libXi-1.3 (x86_64) libXi-1.3 (i686) make-3.81-19.el6 sysstat-9.0.4-11.el6 (x86_64) |
通过YUM安装的指令:
yum install -y binutils.x86_64 compat-libcap1.x86_64 compat-libstdc++-33.i686 compat-libstdc++-33.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.x86_64 glibc.i686 glibc-devel.x86_64 glibc-devel.i686 ksh.x86_64 libgcc.x86_64 libgcc.i686 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libaio.x86_64 libaio.i686 libaio-devel.i686 libaio-devel.x86_64 libXext.x86_64 libXext.i686 libXtst.x86_64 libXtst.i686 libX11.x86_64 libX11.i686 libXau.x86_64 libXau.i686 libxcb.x86_64 libxcb.i686 libXi.x86_64 libXi.i686 make.x86_64 sysstat.x86_64
文件:/etc/sysctl.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[root@ora12c1 ~]# tail -n 17 /etc/sysctl.conf # Oracle database 12c RAC fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 1934714880 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default=262144 net.core.rmem_max=4194304 net.core.wmem_default=262144 net.core.wmem_max=1048586 #net.ipv4.ip_local_range=9000 65500 kernel.panic_on_oops = 1 net.ipv4.conf.eth1.rp_filter = 0 net.ipv4.conf.eth2.rp_filter = 2 [root@ora12c1 ~]# |
文件:/etc/security/limits.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@ora12c1 ~]# tail -n 10 /etc/security/limits.conf # Oracle database 12c RAC grid soft nproc 2047 grid hard nproc 16384 grid soft nofile 1024 grid hard nofile 65536 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle hard memlock 3145728 [root@ora12c1 ~]# |
文件:/etc/sysconfig/network
在该文件中定义NOZEROCONF为:“yes”
1 2 3 4 5 |
[root@ora12c1 software]# cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=ora12c1 NOZEROCONF=yes [root@ora12c1 software]# |
文件:/etc/pam.d/login
1 2 3 4 5 |
[root@ora12c1 ~]# tail -n 3 /etc/pam.d/login # Oracle database 12c RAC session required pam_limits.so [root@ora12c1 ~]# |
创建用户和组:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
[root@ora12c1 ~]# cat create_user groupadd -g 501 oinstall groupadd -g 502 dba groupadd -g 504 asmadmin groupadd -g 506 asmdba groupadd -g 507 asmoper useradd -u 501 -g oinstall -G asmadmin,asmdba,asmoper grid useradd -u 502 -g oinstall -G dba,asmdba oracle [root@ora12c1 ~]# [root@ora12c1 ~]# sh create_user [root@ora12c1 ~]# [root@ora12c1 ~]# id grid uid=501(grid) gid=501(oinstall) groups=501(oinstall),504(asmadmin),506(asmdba),507(asmoper) [root@ora12c1 ~]# id oracle uid=502(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),506(asmdba) [root@ora12c1 ~]# [root@ora12c1 ~]# passwd grid Changing password for user grid. New password: BAD PASSWORD: it is based on a dictionary word BAD PASSWORD: is too simple Retype new password: passwd: all authentication tokens updated successfully. [root@ora12c1 ~]# [root@ora12c1 ~]# passwd oracle Changing password for user oracle. New password: BAD PASSWORD: it is based on a dictionary word BAD PASSWORD: is too simple Retype new password: passwd: all authentication tokens updated successfully. [root@ora12c1 ~]# |
其中,
用户:grid,服务于:Grid Infrastructure。
用户:oracle,服务于:Oracle Database。
创建,主Inventory(Central)路径:
1 2 3 4 5 6 7 |
[root@ora12c1 ~]# mkdir -p /u01/app/oraInventory [root@ora12c1 ~]# chown -R grid.oinstall /u01 [root@ora12c1 ~]# chmod -R 775 /u01/app/oraInventory [root@ora12c1 ~]# [root@ora12c1 ~]# ll -d /u01/app/oraInventory drwxrwxr-x 2 grid oinstall 4096 Oct 31 01:00 /u01/app/oraInventory [root@ora12c1 ~]# |
创建,Grid Infrastructure路径:
1 2 3 4 5 6 7 8 9 10 |
[root@ora12c1 ~]# mkdir -p /u01/app/12/grid [root@ora12c1 ~]# chown -R grid.oinstall /u01/app/12/grid [root@ora12c1 ~]# chmod -R 775 /u01/app/12/grid [root@ora12c1 ~]# [root@ora12c1 ~]# ll -d /u01/app/12/grid drwxrwxr-x 2 grid oinstall 4096 Oct 31 01:03 /u01/app/12/grid [root@ora12c1 ~]# [root@ora12c1 grid]# mkdir -p /u01/app/grid [root@ora12c1 grid]# chown -R grid.oinstall /u01/app/grid/ [root@ora12c1 grid]# |
创建,Oracle Database路径:
1 2 3 4 5 6 7 8 9 |
[root@ora12c1 ~]# mkdir -p /u01/app/oracle [root@ora12c1 ~]# mkdir -p /u01/app/oracle/cfgtoollogs [root@ora12c1 ~]# chown -R oracle.oinstall /u01/app/oracle [root@ora12c1 ~]# chmod -R 775 /u01/app/oracle [root@ora12c1 ~]# [root@ora12c1 ~]# mkdir -p /u01/app/oracle/product/12/db_1 [root@ora12c1 ~]# chown -R oracle.oinstall /u01/app/oracle/product/12/db_1 [root@ora12c1 ~]# chmod -R 775 /u01/app/oracle/product/12/db_1 [root@ora12c1 ~]# |
用户环境变量:
用户:grid
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
[root@ora12c1 ~]# cat /home/grid/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH export TMP=/tmp export TMPDIR=$TMP export ORACLE_HOSTNAME=ora12c1 export ORACLE_BASE=/u01/app/grid export ORACLE_HOME=/u01/app/12/grid export ORACLE_SID=+ASM1 export PATH=/usr/sbin:$PATH export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib [root@ora12c1 ~]# |
用户:oracle
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
[root@ora12c1 ~]# cat /home/oracle/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH export PATH export TMP=/tmp export TMPDIR=$TMP export ORACLE_HOSTNAME=ora12c1 export ORACLE_UNQNAME=yayu export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/12/db_1 export ORACLE_SID=yayu1 export PATH=/usr/sbin:$PATH export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib [root@ora12c1 ~]# |
关闭防火墙和SELINUX:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
[root@ora12c1 ~]# service iptables status iptables: Firewall is not running. [root@ora12c1 ~]# chkconfig iptables --list iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@ora12c1 ~]# [root@ora12c1 ~]# sestatus SELinux status: disabled [root@ora12c1 ~]# [root@ora12c1 ~]# cat /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted [root@ora12c1 ~]# |
时间同步。
关于时间同步,这里有两种方式解决:1,NTP;2,Vmware Toolbox
这里使用VMWARE TOOLBOX:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
[root@ora12c1 ~]# mkdir /software [root@ora12c1 ~]# cd /software [root@ora12c1 software]# ll total 59828 -r--r--r-- 1 root root 61260572 Oct 31 03:38 VMwareTools-9.6.2-1688356.tar.gz [root@ora12c1 software]# gunzip VMwareTools-9.6.2-1688356.tar.gz [root@ora12c1 software]# ll total 177780 -r--r--r-- 1 root root 182046720 Oct 31 03:38 VMwareTools-9.6.2-1688356.tar [root@ora12c1 software]# tar xf VMwareTools-9.6.2-1688356.tar [root@ora12c1 software]# ll total 177788 -r--r--r-- 1 root root 182046720 Oct 31 03:38 VMwareTools-9.6.2-1688356.tar drwxr-xr-x 7 root root 4096 Mar 22 2014 vmware-tools-distrib [root@ora12c1 software]# cd vmware-tools-distrib/ [root@ora12c1 vmware-tools-distrib]# ls bin doc etc FILES INSTALL installer lib vmware-install.pl [root@ora12c1 vmware-tools-distrib]# [root@ora12c1 vmware-tools-distrib]# ./vmware-install.pl A previous installation of VMware Tools has been detected. The previous installation was made by the tar installer (version 4). Keeping the tar4 installer database format. You have a version of VMware Tools installed. Continuing this install will first uninstall the currently installed version. Do you wish to continue? (yes/no) [yes] Uninstalling the tar installation of VMware Tools. Stopping services for VMware Tools Stopping VMware Tools services in the virtual machine: Guest operating system daemon: [ OK ] Unmounting HGFS shares: [ OK ] Guest filesystem driver: [ OK ] Stopping Thinprint services in the virtual machine: Stopping Virtual Printing daemon: done The removal of VMware Tools 9.6.2 build-1688356 for Linux completed successfully. Installing VMware Tools. In which directory do you want to install the binary files? [/usr/bin] What is the directory that contains the init directories (rc0.d/ to rc6.d/)? [/etc/rc.d] What is the directory that contains the init scripts? [/etc/rc.d/init.d] In which directory do you want to install the daemon files? [/usr/sbin] In which directory do you want to install the library files? [/usr/lib/vmware-tools] The path "/usr/lib/vmware-tools" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] In which directory do you want to install the documentation files? [/usr/share/doc/vmware-tools] The path "/usr/share/doc/vmware-tools" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want? [yes] The installation of VMware Tools 9.6.2 build-1688356 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl". Before running VMware Tools for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want this program to invoke the command for you now? [yes] Initializing... Making sure services for VMware Tools are stopped. Stopping Thinprint services in the virtual machine: Stopping Virtual Printing daemon: done Stopping VMware Tools services in the virtual machine: Guest operating system daemon: [ OK ] Unmounting HGFS shares: [ OK ] Guest filesystem driver: [ OK ] The module vmci has already been installed on this system by another installer or package and will not be modified by this installer. The module vsock has already been installed on this system by another installer or package and will not be modified by this installer. The module vmxnet3 has already been installed on this system by another installer or package and will not be modified by this installer. Use the flag --clobber-kernel-modules=vmxnet3 to override. The module pvscsi has already been installed on this system by another installer or package and will not be modified by this installer. Use the flag --clobber-kernel-modules=pvscsi to override. The module vmmemctl has already been installed on this system by another installer or package and will not be modified by this installer. Use the flag --clobber-kernel-modules=vmmemctl to override. The VMware Host-Guest Filesystem allows for shared folders between the host OS and the guest OS in a Fusion or Workstation virtual environment. Do you wish to enable this feature? [yes] Before you can compile modules, you need to have the following installed... make gcc kernel headers of the running kernel Searching for GCC... Detected GCC binary at "/usr/bin/gcc". The path "/usr/bin/gcc" appears to be a valid path to the gcc binary. Would you like to change it? [no] Searching for a valid kernel header path... The path "" is not a valid path to the 3.8.13-44.1.1.el6uek.x86_64 kernel headers. Would you like to change it? [yes] no WARNING: This program cannot compile any modules for the following reason(s)... - This program could not find a valid path to the kernel headers of the running kernel. Please ensure that the header files for the running kernel are installed on this sytem. [ Press Enter key to continue ] The filesystem driver (vmhgfs module) is used only for the shared folder feature. The rest of the software provided by VMware Tools is designed to work independently of this feature. If you wish to have the shared folders feature, you can install the driver by running vmware-config-tools.pl again after making sure that gcc, binutils, make and the kernel sources for your running kernel are installed on your machine. These packages are available on your distribution's installation CD. [ Press Enter key to continue ] The vmxnet driver is no longer supported on kernels 3.3 and greater. Please upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e) The vmblock enables dragging or copying files between host and guest in a Fusion or Workstation virtual environment. Do you wish to enable this feature? [yes] VMware automatic kernel modules enables automatic building and installation of VMware kernel modules at boot that are not already present. This feature can be enabled/disabled by re-running vmware-config-tools.pl. Would you like to enable VMware automatic kernel modules? [no] yes Thinprint provides driver-free printing. Do you wish to enable this feature? [yes] Disabling timer-based audio scheduling in pulseaudio. Detected X server version 1.15.0 Distribution provided drivers for Xorg X server are used. Skipping X configuration because X drivers are not included. Creating a new initrd boot image for the kernel. Starting Virtual Printing daemon: done Checking acpi hot plug [ OK ] Starting VMware Tools services in the virtual machine: Switching to guest configuration: [ OK ] VMware Automatic Kmods: [ OK ] Blocking file system: [ OK ] Guest operating system daemon: [ OK ] The configuration of VMware Tools 9.6.2 build-1688356 for Linux for this running kernel completed successfully. You must restart your X session before any mouse or graphics changes take effect. You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the command line. To enable advanced X features (e.g., guest resolution fit, drag and drop, and file and text copy/paste), you will need to do one (or more) of the following: 1. Manually start /usr/bin/vmware-user 2. Log out and log back into your desktop session; and, 3. Restart your X session. Enjoy, --the VMware team [root@ora12c1 vmware-tools-distrib]# [root@ora12c1 vmware-tools-distrib]# vmware-toolbox-cmd timesync enable Enabled [root@ora12c1 vmware-tools-distrib]# |
ASMLib支持。
AMSLib相关的软件包需要在Oracle官方网站下载获得,具体的路径如下:
Oracle Linux的项目首页:
http://www.oracle.com/technetwork/server-storage/linux/downloads/index.html
Oracle ASMLib的项目首页:
http://www.oracle.com/technetwork/server-storage/linux/asmlib/index-101839.html
这里,我的环境使用的是Oracle Linux 6,故而选择“Oracle ASMLib Downloads for Oracle Linux 6”。
All ASMLib installations require the oracleasmlib and oracleasm-support packages appropriate for their machine.
所有的ASMLib安装都需要匹配特定主机的oracleasmlib以及oracleasm-support软件的支持(匹配Linux内核)
The oracleasm-support package can be downloaded from the Unbreakable Linux Network (ULN) if you have an active support subscription, or from http://public-yum.oracle.com if you do not.
oracleasm-support软件包可以在ULN(Oracle的官方Linux支持网络)获得,但需要你拥有可用的授权(需要付费,类似于“My Oracle Support”的销售策略),如果你没有可用的授权,你可以在下列网站免费获取:http://public-yum.oracle.com。
The oracleasm kernel driver is built into the Unbreakable Enterprise Kernel for Oracle Linux 6 and does not need to be installed manually.
oracleasm的内核支持默认已经部署到了Oracle Linux 6的Unbreakable Enterprise Kernel(其实,就是Linux内核,加上“Unbreakable Enterprise”的修饰,仅仅因为更华丽、逼格更高。当然,Oracle也对该内核做出了针对数据库以及Orace全线产品的优化。)中,所以你不需要单独的手动安装它。
The oracleasm kernel driver for the 64-bit (x86_64) Red Hat Compatible Kernel for Oracle Linux 6 can be installed manually from ULN or http://public-yum.oracle.com using the yum tool:
# yum install kmod-oracleasm
如果你使用的是Oracle Linux 6的“Red Hat Compatible Kernel”(这种内核的选择,在Oracle Linux6启动时的引导窗口是可以看到的,并作出影响。),那么你需要手动安装oracleasm内核模块的支持。
手动安装时有两种安装介质的来源选择,(1)通过ULN,或者(2)通过“public-yum.oracle.com”;
手动安装时通过“yum”使用程序实现,命令代码为:
1 |
yum install kmod-oracleasm |
Oracle Enterprise Linux 6启动时的内核选择:
1
2
通常情况下,都会选择:Unbreakable Enterprise Kernel。
Package:oracleasm-support。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
[root@ora12c1 ~]# yum list | grep --color oracleasm oracleasm-support.x86_64 2.1.8-1.el6 Server [root@ora12c1 ~]# [root@ora12c1 ~]# yum install -y oracleasm-support.x86_64 Loaded plugins: refresh-packagekit, security Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package oracleasm-support.x86_64 0:2.1.8-1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================================================== Installing: oracleasm-support x86_64 2.1.8-1.el6 Server 73 k Transaction Summary ========================================================================================================================================================================================================== Install 1 Package(s) Total download size: 73 k Installed size: 216 k Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : oracleasm-support-2.1.8-1.el6.x86_64 1/1 Verifying : oracleasm-support-2.1.8-1.el6.x86_64 1/1 Installed: oracleasm-support.x86_64 0:2.1.8-1.el6 Complete! [root@ora12c1 ~]# |
Package:oracleasm-support安装成功后,就可以使用命令“oracleasm”了:
1 2 3 |
[root@ora12c1 ~]# oracleasm -V oracleasm version 2.1.8 [root@ora12c1 ~]# |
关于如何使用共享存储的磁盘资源有集中选择:
1.OCFS2,这种方式由于缺点很明显,所以很少有人使用了。
2.RAW
3.ASMLib,通过oracleasm将磁盘资源包装成ASM Disk。
如果使用ASMLib,需要首先对ASMLib进行初始化操作。
该部分操作可以确定以下策略:
1.通过“oracleasm createdisk …”包装的磁盘设备在Linux文件系统中会被赋予什么样的用户及组?
2.ASMLib是否在Linux启动时启动?
3.是否需要在Linux启动时刷新ASM Disk磁盘列表(包含扫描与罗列两个步骤)?
具体操作如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[root@ora12c1 ~]# /etc/init.d/oracleasm configure Configuring the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library driver. The following questions will determine whether the driver is loaded on boot and what permissions it will have. The current values will be shown in brackets ('[]'). Hitting <ENTER> without typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface []: grid Default group to own the driver interface []: asmadmin Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: y Writing Oracle ASM library driver configuration: done Initializing the Oracle ASMLib driver: [ OK ] Scanning the system for Oracle ASMLib disks: [ OK ] [root@ora12c1 ~]# |
此外,需要注意的是:
上述的“user”与“group”涉及到Oracle database 11g Release2的新特性:Job Role Separation,任务角色分离。
因此,这里的设置需要与稍后“Grid Infrastructure”中“Privileged Operation System Group”中的设置一致。
查看ASM Library的状态:
1 2 3 4 |
[root@ora12c1 ~]# oracleasm status Checking if ASM is loaded: yes Checking if /dev/oracleasm is mounted: yes [root@ora12c1 ~]# |
关于“oracleasm”命令的更多帮助信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[root@ora12c1 ~]# oracleasm -h Usage: oracleasm [--exec-path=<exec_path>] <command> [ <args> ] oracleasm --exec-path oracleasm -h oracleasm -V The basic oracleasm commands are: configure Configure the Oracle Linux ASMLib driver init Load and initialize the ASMLib driver exit Stop the ASMLib driver scandisks Scan the system for Oracle ASMLib disks status Display the status of the Oracle ASMLib driver listdisks List known Oracle ASMLib disks querydisk Determine if a disk belongs to Oracle ASMlib createdisk Allocate a device for Oracle ASMLib use deletedisk Return a device to the operating system renamedisk Change the label of an Oracle ASMlib disk update-driver Download the latest ASMLib driver [root@ora12c1 ~]# |
(关于共享存储的具体划分及其策略,稍后单独的描述。)
配置Openfiler。
如上,首先,通过查看服务器状态,获得Openfiler的WEB APP地址。
在本环境中,该地址为:
https://192.168.223.132:446/
Openfielr的默认登录账户是:opefiler。
如果不知道该用户的口令,可以在后台修改,如下图所示:
然后,你就可以登录了:
登陆后的画面:
“System”添加RAC节点到“Network Access”
这样,Openfile端的配置就完成了。
如上所示,我配置了一个49G的LUN:ora12c。
接下来,需要在RAC的节点服务器获取到该LUN。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
[root@ora12c1 ~]# yum install -y iscsi-initiator-utils.x86_64 Loaded plugins: refresh-packagekit, security Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package iscsi-initiator-utils.x86_64 0:6.2.0.873-13.0.1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================================================== Installing: iscsi-initiator-utils x86_64 6.2.0.873-13.0.1.el6 Server 720 k Transaction Summary ========================================================================================================================================================================================================== Install 1 Package(s) Total download size: 720 k Installed size: 2.4 M Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : iscsi-initiator-utils-6.2.0.873-13.0.1.el6.x86_64 1/1 Verifying : iscsi-initiator-utils-6.2.0.873-13.0.1.el6.x86_64 1/1 Installed: iscsi-initiator-utils.x86_64 0:6.2.0.873-13.0.1.el6 Complete! [root@ora12c1 ~]# [root@ora12c1 ~]# iscsiadm -m discovery -t sendtargets -p 192.168.223.132 Starting iscsid: [ OK ] 192.168.223.132:3260,1 ora12c [root@ora12c1~]# [root@ora12c1 ~]# fdisk -l | grep --color "Disk " Disk /dev/sda: 21.5 GB, 21474836480 bytes Disk identifier: 0x00003dac Disk /dev/mapper/vg_ora12c1-lv_root: 18.9 GB, 18865979392 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_ora12c1-lv_swap: 2080 MB, 2080374784 bytes Disk identifier: 0x00000000 [root@ora12c1 ~]# [root@ora12c1 ~]# iscsiadm -m node -T ora12c -p 192.168.223.132 -l Logging in to [iface: default, target: ora12c, portal: 192.168.223.132,3260] (multiple) Login to [iface: default, target: ora12c, portal: 192.168.223.132,3260] successful. [root@ora12c1 ~]# [root@ora12c1 ~]# fdisk -l | grep --color "Disk " Disk /dev/sda: 21.5 GB, 21474836480 bytes Disk identifier: 0x00003dac Disk /dev/mapper/vg_ora12c1-lv_root: 18.9 GB, 18865979392 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_ora12c1-lv_swap: 2080 MB, 2080374784 bytes Disk identifier: 0x00000000 Disk /dev/sdb: 40.9 GB, 40936407040 bytes Disk identifier: 0x00000000 [root@ora12c1 ~]# |
从上面的命令中可以看到,Openfiler的LUN已经成功的被节点服务器识别到,并包装为:/dev/sdb。
这里,首先划分1GB的空间作为OCR和Vote Disk的磁盘存储。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
[root@ora12c1 ~]# fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x9f7eea44. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): p Disk /dev/sdb: 40.9 GB, 40936407040 bytes 64 heads, 32 sectors/track, 39040 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x9f7eea44 Device Boot Start End Blocks Id System Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-39040, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-39040, default 39040): +1G Command (m for help): p Disk /dev/sdb: 40.9 GB, 40936407040 bytes 64 heads, 32 sectors/track, 39040 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x9f7eea44 Device Boot Start End Blocks Id System /dev/sdb1 1 1025 1049584 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@ora12c1 ~]# [root@ora12c1 ~]# partprobe /dev/sdb [root@ora12c1 ~]# [root@ora12c1 ~]# ll /dev/sdb* brw-rw---- 1 root disk 8, 16 Oct 31 13:44 /dev/sdb brw-rw---- 1 root disk 8, 17 Oct 31 13:44 /dev/sdb1 [root@ora12c1 ~]# |
命令“partprobe /dev/sdb”的操作也需要在另外一台节点上操作:
1 2 3 4 5 6 7 |
[root@ora12c2 ~]# ll /dev/sdb* brw-rw---- 1 root disk 8, 16 Oct 31 12:11 /dev/sdb [root@ora12c2 ~]# partprobe /dev/sdb [root@ora12c2 ~]# ll /dev/sdb* brw-rw---- 1 root disk 8, 16 Oct 31 13:45 /dev/sdb brw-rw---- 1 root disk 8, 17 Oct 31 13:45 /dev/sdb1 [root@ora12c2 ~]# |
使用“oracleasm”创建ASM Disk:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@ora12c1 ~]# oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Scanning system for ASM disks... [root@ora12c1 ~]# oracleasm listdisks [root@ora12c1 ~]# [root@ora12c1 ~]# oracleasm createdisk OCR /dev/sdb1 Writing disk header: done Instantiating disk: done [root@ora12c1 ~]# [root@ora12c1 ~]# oracleasm listdisks OCR [root@ora12c1 ~]# |
另一个节点扫描:
1 2 3 4 5 6 7 8 9 10 |
[root@ora12c2 ~]# oracleasm listdisks [root@ora12c2 ~]# oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Scanning system for ASM disks... Instantiating disk "OCR" [root@ora12c2 ~]# [root@ora12c2 ~]# oracleasm listdisks OCR [root@ora12c2 ~]# |
ASM Disk的初步操作完成。
(在后期建库的时候,还会需要划分新的数据分区,这是后续话题,对于12C RAC的架构搭建来说,这里仅需要创建针对OCR与VOTE DISK的ASM Diks就足够了)
关于SSH等价性。
SSH等价性的操作在我前面的文档以及以前的部署习惯中,会在运行OUI安装GI之前操作,但事实上从11g开始OUI提供的SSH等价性连接的功能已经很完善了,不需要像以前那样通过“ssh-keygen”或者“ssh-copy-id”那样很麻烦的操作。
(关于之前的SSH等价性配置,可以查阅本站以往的RAC文档。)
这里,本文档中,SSH等价性配置会在OUI中操作。
Grid Infrastructure部分。
上传安装介质到服务器:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@ora12c1 ~]# cd /software [root@ora12c1 software]# ll total 2515708 -rw-r--r-- 1 root root 1747043545 Oct 31 14:31 linuxamd64_12102_grid_1of2.zip -rw-r--r-- 1 root root 646972897 Oct 31 14:30 linuxamd64_12102_grid_2of2.zip -r--r--r-- 1 root root 182046720 Oct 31 03:38 VMwareTools-9.6.2-1688356.tar drwxr-xr-x 7 root root 4096 Mar 22 2014 vmware-tools-distrib [root@ora12c1 software]# du -sh * 1.7G linuxamd64_12102_grid_1of2.zip 618M linuxamd64_12102_grid_2of2.zip 174M VMwareTools-9.6.2-1688356.tar 181M vmware-tools-distrib [root@ora12c1 software]# [root@ora12c1 software]# chmod -R 777 /software [root@ora12c1 software]# |
用操作系统用户:grid,解压安装介质:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
[root@ora12c1 software]# su - grid [grid@ora12c1 ~]$ cd /software [grid@ora12c1 software]$ ll total 2515708 -rwxrwxrwx 1 root root 1747043545 Oct 31 14:31 linuxamd64_12102_grid_1of2.zip -rwxrwxrwx 1 root root 646972897 Oct 31 14:30 linuxamd64_12102_grid_2of2.zip -rwxrwxrwx 1 root root 182046720 Oct 31 03:38 VMwareTools-9.6.2-1688356.tar drwxrwxrwx 7 root root 4096 Mar 22 2014 vmware-tools-distrib [grid@ora12c1 software]$ unzip linuxamd64_12102_grid_1of2.zip ;unzip linuxamd64_12102_grid_2of2.zip (... ...输出) inflating: grid/stage/Components/oracle.rdbms/12.1.0.2.0/1/DataFiles/filegroup31.jar inflating: grid/stage/Components/oracle.rdbms/12.1.0.2.0/1/DataFiles/filegroup81.jar inflating: grid/stage/Components/oracle.rdbms/12.1.0.2.0/1/DataFiles/filegroup19.9.1.jar inflating: grid/stage/Components/oracle.rdbms/12.1.0.2.0/1/DataFiles/filegroup66.jar inflating: grid/stage/Components/oracle.rdbms/12.1.0.2.0/1/DataFiles/filegroup4.jar inflating: grid/stage/Components/oracle.rdbms/12.1.0.2.0/1/DataFiles/filegroup19.jar inflating: grid/install/.oui [grid@ora12c1 software]$ [grid@ora12c1 software]$ cd grid/ [grid@ora12c1 grid]$ ll total 44 drwxr-xr-x 4 grid oinstall 4096 Oct 31 14:37 install drwxrwxr-x 2 grid oinstall 4096 Jul 7 22:19 response drwxr-xr-x 2 grid oinstall 4096 Jul 7 21:14 rpm -rwxr-xr-x 1 grid oinstall 5085 Dec 20 2013 runcluvfy.sh -rwxr-xr-x 1 grid oinstall 8534 Jul 7 21:14 runInstaller drwxrwxr-x 2 grid oinstall 4096 Jul 7 22:19 sshsetup drwxr-xr-x 14 grid oinstall 4096 Jul 7 22:20 stage -rwxr-xr-x 1 grid oinstall 500 Feb 7 2013 welcome.html [grid@ora12c1 grid]$ |
安装CVU:
CVU的RPM包位于安装介质的目录中:
1 2 3 4 5 6 7 8 |
[root@ora12c1 ~]# cd /software/grid/rpm/ [root@ora12c1 rpm]# ls cvuqdisk-1.0.9-1.rpm [root@ora12c1 rpm]# rpm -ivh cvuqdisk-1.0.9-1.rpm Preparing... ########################################### [100%] Using default group oinstall to install package 1:cvuqdisk ########################################### [100%] [root@ora12c1 rpm]# |
1 2 3 4 |
[grid@ora12c1 grid]$ export DISPLAY=192.168.223.1:0.0 [grid@ora12c1 grid]$ xhost + access control disabled, clients can connect from any host [grid@ora12c1 grid]$ |
启动OUI:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
[grid@ora12c1 software]$ cd grid/ [grid@ora12c1 grid]$ ll total 44 drwxr-xr-x 4 grid oinstall 4096 Oct 31 14:37 install drwxrwxr-x 2 grid oinstall 4096 Jul 7 22:19 response drwxr-xr-x 2 grid oinstall 4096 Jul 7 21:14 rpm -rwxr-xr-x 1 grid oinstall 5085 Dec 20 2013 runcluvfy.sh -rwxr-xr-x 1 grid oinstall 8534 Jul 7 21:14 runInstaller drwxrwxr-x 2 grid oinstall 4096 Jul 7 22:19 sshsetup drwxr-xr-x 14 grid oinstall 4096 Jul 7 22:20 stage -rwxr-xr-x 1 grid oinstall 500 Feb 7 2013 welcome.html [grid@ora12c1 grid]$ [grid@ora12c1 grid]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 415 MB. Actual 8098 MB Passed Checking swap space: must be greater than 150 MB. Actual 1983 MB Passed Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-10-31_02-47-38PM. Please wait ... [grid@ora12c1 grid]$ [grid@ora12c1 grid]$ |
这里选择“Standard Cluster”。
对于“Flex Cluter”:
如果启用了Flex Cluster,那么整个RAC集群的节点会被分为两大类:Hub Node一起Leaf Node。
其中只有Hub Node可以与共享存储连接,Leaf Node则只能通过Hub Node访问共享存储,而不能直接访问。
Flex Cluster架构可以让整个集群的架构更宽松,并且容纳更多的节点。
在Flex Cluster中Hub Node的列表是通过GNS VIP发布的。
所以,如果你在前面的步骤里选择了Flex Cluster,那么在这里,需要对GNS做出配置。
这里不选择GNS。
当前没有配置SSH,测试(Test)肯定失败:
选择“Setup”,配置SSH:
Setup完成后,会弹窗提示:
这时候,节点服务器之间,用户:grid的SSH等价就配置好了,可以通过命令行验证一下:
节点一:
1 2 3 4 5 6 7 8 9 10 |
[root@ora12c1 rpm]# su - grid [grid@ora12c1 ~]$ ssh ora12c1 date Fri Oct 31 15:33:01 CST 2014 [grid@ora12c1 ~]$ ssh ora12c2 date Fri Oct 31 15:33:05 CST 2014 [grid@ora12c1 ~]$ ssh ora12c1-priv date Fri Oct 31 15:33:12 CST 2014 [grid@ora12c1 ~]$ ssh ora12c2-priv date Fri Oct 31 15:33:15 CST 2014 [grid@ora12c1 ~]$ |
节点二:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
[root@ora12c2 software]# su - grid [grid@ora12c2 ~]$ ssh ora12c1 date Fri Oct 31 15:38:43 CST 2014 [grid@ora12c2 ~]$ ssh ora12c2 date Fri Oct 31 15:38:46 CST 2014 [grid@ora12c2 ~]$ ssh ora12c1-priv date The authenticity of host 'ora12c1-priv (192.168.222.133)' can't be established. RSA key fingerprint is 87:e6:7c:d9:e6:56:51:89:85:72:6a:84:39:5c:c1:f9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ora12c1-priv,192.168.222.133' (RSA) to the list of known hosts. Fri Oct 31 15:38:52 CST 2014 [grid@ora12c2 ~]$ ssh ora12c2-priv date The authenticity of host 'ora12c2-priv (192.168.222.134)' can't be established. RSA key fingerprint is 98:23:c9:96:0a:b3:a7:21:fd:55:a2:b1:91:13:0b:3f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ora12c2-priv,192.168.222.134' (RSA) to the list of known hosts. Fri Oct 31 15:39:00 CST 2014 [grid@ora12c2 ~]$ |
验证成功。
在12C中,集群的网络配置和11g的网络配置有差别的。
在12C中,除了基本的公网和私网之外,因为Flex ASM的出现,需要额外的网络专门负责节点间的ASM元数据的传输。
由于ASM Meta Data的数据量很小,所以你可以选择像上图那样让私网与ASM网公用一个网段:ASM & Private。
或者,如下图这样,将它们分而治之:
这里,我选择分而治之。
这里选择你的OCR和Voting disk的存储方式。
总的来说,你有两种选择:文件系统,或者Oracle的自动存储管理。
在11g的时候,ASM的存储选择只有“Standard ASM”,如今,在12c中,通过上面截图可以看到新增了“Flex ASM”。
通过两个选项的描述可以看到:
在Standard ASM中,ASM实例会被配置到所有的集群节点上。
而Flex ASM中,ASM实例仅会被配置在一部分的集群节点上(Hub Node)。
默认情况下OUI的发现路径为:/dev/sd*,如果用“oracleasm”,可能这里看不到任何磁盘条目。
这时候需要调整“Discovery Path”:/dev/oracleasm/disks/*,如上图所示。
如果遇到这个问题,说明空间不够。
按照上文划分空间的方式,再通过“oracleasm”创建几个ASM Disk。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
[root@ora12c1 grid]# fdisk /dev/sdb WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): p Disk /dev/sdb: 40.9 GB, 40936407040 bytes 64 heads, 32 sectors/track, 39040 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x9f7eea44 Device Boot Start End Blocks Id System /dev/sdb1 1 1025 1049584 83 Linux Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 2 First cylinder (1026-39040, default 1026): Using default value 1026 Last cylinder, +cylinders or +size{K,M,G} (1026-39040, default 39040): +4500M Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. [root@ora12c1 grid]# partprobe /dev/sdb [root@ora12c1 grid]# [root@ora12c1 grid]# oracleasm createdisk OCR1 /dev/sdb2 Writing disk header: done Instantiating disk: done [root@ora12c1 grid]# [root@ora12c1 grid]# |
这里的Oracle ASM Administrator Group需要与前面ASMLib配置的组一致。
这一步是配置是否需要OUI自动执行root.sh脚本。
在12c之前是没有这个功能的,它为12c的新特性。
你可以选择开启或者禁用该功能。
如果你选择启用,那么它可以以两种方式作用:
1.提供root口令
2.授予sudu权限
这里,我选择启用自动执行,并且以第一种方式作用(如上截图所示)。
如上,可能会有一些告警或错误,但有的是可以忽略的(SKIP)。
1 2 3 4 5 6 7 8 |
Execution status of ora12c2 is:true Execution exit code of ora12c2 is:0 Execution status of ora12c1 is:true Execution exit code of ora12c1 is:0 INFO: ********************************************* INFO: Execute root script on all nodes successful. INFO: Overall status of execution of root/configuration scripts : succeeded |
查看下集群的状态:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
[grid@ora12c1 ~]$ crs_stat -t -v Name Type R/RA F/FT Target State Host ---------------------------------------------------------------------- ora....SM.lsnr ora....er.type 0/5 0/ ONLINE ONLINE ora12c1 ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE ora12c1 ora....N1.lsnr ora....er.type 0/5 0/0 ONLINE ONLINE ora12c1 ora.MGMTLSNR ora....nr.type 0/0 0/0 ONLINE ONLINE ora12c1 ora.OCR.dg ora....up.type 0/5 0/ ONLINE ONLINE ora12c1 ora.asm ora.asm.type 0/5 0/0 ONLINE ONLINE ora12c1 ora.cvu ora.cvu.type 0/5 0/0 ONLINE ONLINE ora12c1 ora.mgmtdb ora....db.type 0/2 0/1 ONLINE ONLINE ora12c1 ora....network ora....rk.type 0/5 0/ ONLINE ONLINE ora12c1 ora.oc4j ora.oc4j.type 0/1 0/2 ONLINE ONLINE ora12c1 ora.ons ora.ons.type 0/3 0/ ONLINE ONLINE ora12c1 ora....C1.lsnr application 0/5 0/0 ONLINE ONLINE ora12c1 ora....2c1.ons application 0/3 0/0 ONLINE ONLINE ora12c1 ora....2c1.vip ora....t1.type 0/0 0/0 ONLINE ONLINE ora12c1 ora....C2.lsnr application 0/5 0/0 ONLINE ONLINE ora12c2 ora....2c2.ons application 0/3 0/0 ONLINE ONLINE ora12c2 ora....2c2.vip ora....t1.type 0/0 0/0 ONLINE ONLINE ora12c2 ora.scan1.vip ora....ip.type 0/0 0/0 ONLINE ONLINE ora12c1 [grid@ora12c1 ~]$ [root@ora12c1 software]# /u01/app/12/grid/bin/olsnodes -n ora12c1 1 ora12c2 2 [root@ora12c1 software]# |
Oracle 12c RAC:数据库软件部分。
上传介质:
用操作系统用户:oracle,执行解压:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
[root@ora12c1 software]# pwd /software [root@ora12c1 software]# ll total 2625088 -rw-r--r-- 1 root root 1673544724 Nov 1 11:37 linuxamd64_12102_database_1of2.zip -rw-r--r-- 1 root root 1014530602 Nov 1 11:37 linuxamd64_12102_database_2of2.zip [root@ora12c1 software]# chmod -R 777 /software/ [root@ora12c1 software]# [root@ora12c1 software]# su - oracle [oracle@ora12c1 ~]$ cd /software [oracle@ora12c1 software]$ ls linuxamd64_12102_database_1of2.zip linuxamd64_12102_database_2of2.zip [oracle@ora12c1 software]$ unzip linuxamd64_12102_database_1of2.zip ;unzip linuxamd64_12102_database_2of2.zip (... ...输出) [root@ora12c1 database]# su - oracle [oracle@ora12c1 ~]$ cd /software [oracle@ora12c1 software]$ ls database [oracle@ora12c1 software]$ cd database/ [oracle@ora12c1 database]$ ll -ltr total 36 -rwxr-xr-x 1 oracle oinstall 500 Feb 7 2013 welcome.html -rwxr-xr-x 1 oracle oinstall 8533 Jul 7 21:14 runInstaller drwxr-xr-x 2 oracle oinstall 4096 Jul 7 21:14 rpm drwxrwxr-x 2 oracle oinstall 4096 Jul 7 22:18 sshsetup drwxrwxr-x 2 oracle oinstall 4096 Jul 7 22:18 response drwxr-xr-x 14 oracle oinstall 4096 Jul 7 22:19 stage drwxr-xr-x 4 oracle oinstall 4096 Nov 1 12:14 install [oracle@ora12c1 database]$ [oracle@ora12c1 database]$ env | grep DISPLAY DISPLAY=192.168.223.1:0.0 [oracle@ora12c1 database]$ [oracle@ora12c1 database]$ xhost access control disabled, clients can connect from any host INET:168.0.1.185 INET:192.168.222.1 INET:192.168.223.1 INET:192.168.64.1 [oracle@ora12c1 database]$ [oracle@ora12c1 database]$ |
调用OUI:
1 2 3 4 5 6 7 8 |
[oracle@ora12c1 database]$ ./runInstaller Starting Oracle Universal Installer... Checking Temp space: must be greater than 500 MB. Actual 21500 MB Passed Checking swap space: must be greater than 150 MB. Actual 1983 MB Passed Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-11-01_01-42-04PM. Please wait ... [oracle@ora12c1 database]$ |
安装类型可以选择三种:
单实例
RAC
RAC one Node
这里选择“RAC”。
用户:oracle,SSH等价性。
和安装GI的时候一样,这里通过OUI设置SSH:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
[oracle@ora12c1 database]$ whoami oracle [oracle@ora12c1 database]$ ssh ora12c1 date Sat Nov 1 13:53:16 CST 2014 [oracle@ora12c1 database]$ ssh ora12c2 date Sat Nov 1 13:53:21 CST 2014 [oracle@ora12c1 database]$ [oracle@ora12c1 database]$ ssh ora12c1-priv date The authenticity of host 'ora12c1-priv (192.168.222.133)' can't be established. RSA key fingerprint is 87:e6:7c:d9:e6:56:51:89:85:72:6a:84:39:5c:c1:f9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ora12c1-priv,192.168.222.133' (RSA) to the list of known hosts. Sat Nov 1 13:53:30 CST 2014 [oracle@ora12c1 database]$ ssh ora12c2-priv date The authenticity of host 'ora12c2-priv (192.168.222.134)' can't be established. RSA key fingerprint is 98:23:c9:96:0a:b3:a7:21:fd:55:a2:b1:91:13:0b:3f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ora12c2-priv,192.168.222.134' (RSA) to the list of known hosts. Sat Nov 1 13:53:35 CST 2014 [oracle@ora12c1 database]$ [oracle@ora12c1 database]$ ssh ora12c1-flex date Sat Nov 1 13:54:17 CST 2014 [oracle@ora12c1 database]$ ssh ora12c2-flex date Sat Nov 1 13:54:20 CST 2014 [oracle@ora12c1 database]$ |
节点二:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
[oracle@ora12c2 ~]$ whoami oracle [oracle@ora12c2 ~]$ ssh ora12c1 date Sat Nov 1 13:55:00 CST 2014 [oracle@ora12c2 ~]$ ssh ora12c2 date Sat Nov 1 13:55:04 CST 2014 [oracle@ora12c2 ~]$ ssh ora12c1-priv date The authenticity of host 'ora12c1-priv (192.168.222.133)' can't be established. RSA key fingerprint is 87:e6:7c:d9:e6:56:51:89:85:72:6a:84:39:5c:c1:f9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ora12c1-priv,192.168.222.133' (RSA) to the list of known hosts. Sat Nov 1 13:55:11 CST 2014 [oracle@ora12c2 ~]$ ssh ora12c2-priv date The authenticity of host 'ora12c2-priv (192.168.222.134)' can't be established. RSA key fingerprint is 98:23:c9:96:0a:b3:a7:21:fd:55:a2:b1:91:13:0b:3f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ora12c2-priv,192.168.222.134' (RSA) to the list of known hosts. Sat Nov 1 13:55:17 CST 2014 [oracle@ora12c2 ~]$ ssh ora12c1-flex date The authenticity of host 'ora12c1-flex (192.168.64.133)' can't be established. RSA key fingerprint is 87:e6:7c:d9:e6:56:51:89:85:72:6a:84:39:5c:c1:f9. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ora12c1-flex,192.168.64.133' (RSA) to the list of known hosts. Sat Nov 1 13:55:26 CST 2014 [oracle@ora12c2 ~]$ ssh ora12c2-flex date The authenticity of host 'ora12c2-flex (192.168.64.134)' can't be established. RSA key fingerprint is 98:23:c9:96:0a:b3:a7:21:fd:55:a2:b1:91:13:0b:3f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ora12c2-flex,192.168.64.134' (RSA) to the list of known hosts. Sat Nov 1 13:55:34 CST 2014 [oracle@ora12c2 ~]$ |
SSH等价,完成。
选择需要安装的数据库软件的版本。
这里选择的是企业版,它需要空间:6.4 GB。
选择数据库软件的安装路径。
这里的路径设置,对应操作系统用户:oracle,环境变量:ORACLE_BASE、ORACLE_HOME。
命令终端:
1 2 3 4 5 6 7 8 9 |
[oracle@ora12c2 ~]$ whoami oracle [oracle@ora12c2 ~]$ hostname ora12c2 [oracle@ora12c2 ~]$ env | grep --color BASE ORACLE_BASE=/u01/app/oracle [oracle@ora12c2 ~]$ env | grep --color ORACLE_HOME ORACLE_HOME=/u01/app/oracle/product/12/db_1 [oracle@ora12c2 ~]$ |
和GI的安装一样,也许也有一些报错,但是它们或许是可以忽略的。
OUI的安装日志:
1 2 3 4 |
[root@ora12c1 ~]# You can find the log of this install session at: /u01/app/oraInventory/logs/installActions2014-11-01_01-42-04PM.log [root@ora12c1 ~]# |
命令:tail -f /u01/app/oraInventory/logs/installActions2014-11-01_01-42-04PM.log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
[root@ora12c1 ~]# hostname ora12c1 [root@ora12c1 ~]# whoami root [root@ora12c1 ~]# [root@ora12c1 ~]# /u01/app/oracle/product/12/db_1/root.sh Performing root user operation. The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/12/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: The contents of "dbhome" have not changed. No need to overwrite. The contents of "oraenv" have not changed. No need to overwrite. The contents of "coraenv" have not changed. No need to overwrite. Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. [root@ora12c1 ~]# |
节点二:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
[root@ora12c2 ~]# hostname ora12c2 [root@ora12c2 ~]# whoami root [root@ora12c2 ~]# [root@ora12c2 ~]# /u01/app/oracle/product/12/db_1/root.sh Performing root user operation. The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/12/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: The contents of "dbhome" have not changed. No need to overwrite. The contents of "oraenv" have not changed. No need to overwrite. The contents of "coraenv" have not changed. No need to overwrite. Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. [root@ora12c2 ~]# |
此时的磁盘空间使用情况:
1 2 3 4 5 6 7 8 9 10 11 |
[root@ora12c1 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_ora12c1-lv_root 36G 16G 19G 47% / tmpfs 1.9G 157M 1.7G 9% /dev/shm /dev/sda1 477M 60M 388M 14% /boot /dev/sr0 3.6G 3.6G 0 100% /iso [root@ora12c1 ~]# [root@ora12c1 ~]# du -sh /u01/ 13G /u01/ [root@ora12c1 ~]# |
为了后面建库,这里通过“ASMCA”实用程序为集群新增一个ASM DISK GROUP:+DATA01。
磁盘资源的准备:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
[root@ora12c1 ~]# whoami root [root@ora12c1 ~]# fdisk -l | grep --color "Disk " Disk /dev/sda: 21.5 GB, 21474836480 bytes Disk identifier: 0x00003dac Disk /dev/sdb: 21.5 GB, 21474836480 bytes Disk identifier: 0x99c7701b Disk /dev/mapper/vg_ora12c1-lv_root: 39.3 GB, 39267074048 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_ora12c1-lv_swap: 2080 MB, 2080374784 bytes Disk identifier: 0x00000000 Disk /dev/sdc: 40.9 GB, 40936407040 bytes Disk identifier: 0x9f7eea44 [root@ora12c1 ~]# [root@ora12c1 ~]# fdisk -l /dev/sdc Disk /dev/sdc: 40.9 GB, 40936407040 bytes 64 heads, 32 sectors/track, 39040 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x9f7eea44 Device Boot Start End Blocks Id System /dev/sdc1 1 1025 1049584 83 Linux /dev/sdc2 1026 5526 4609024 83 Linux /dev/sdc3 5527 17815 12583936 83 Linux [root@ora12c1 ~]# [root@ora12c1 ~]# fdisk /dev/sdc WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): p Disk /dev/sdc: 40.9 GB, 40936407040 bytes 64 heads, 32 sectors/track, 39040 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x9f7eea44 Device Boot Start End Blocks Id System /dev/sdc1 1 1025 1049584 83 Linux /dev/sdc2 1026 5526 4609024 83 Linux /dev/sdc3 5527 17815 12583936 83 Linux Command (m for help): n Command action e extended p primary partition (1-4) e Selected partition 4 First cylinder (17816-39040, default 17816): Using default value 17816 Last cylinder, +cylinders or +size{K,M,G} (17816-39040, default 39040): Using default value 39040 Command (m for help): p Disk /dev/sdc: 40.9 GB, 40936407040 bytes 64 heads, 32 sectors/track, 39040 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x9f7eea44 Device Boot Start End Blocks Id System /dev/sdc1 1 1025 1049584 83 Linux /dev/sdc2 1026 5526 4609024 83 Linux /dev/sdc3 5527 17815 12583936 83 Linux /dev/sdc4 17816 39040 21734400 5 Extended Command (m for help): n First cylinder (17816-39040, default 17816): Using default value 17816 Last cylinder, +cylinders or +size{K,M,G} (17816-39040, default 39040): +15G Command (m for help): p Disk /dev/sdc: 40.9 GB, 40936407040 bytes 64 heads, 32 sectors/track, 39040 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x9f7eea44 Device Boot Start End Blocks Id System /dev/sdc1 1 1025 1049584 83 Linux /dev/sdc2 1026 5526 4609024 83 Linux /dev/sdc3 5527 17815 12583936 83 Linux /dev/sdc4 17816 39040 21734400 5 Extended /dev/sdc5 17816 33176 15729648 83 Linux Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) Syncing disks. [root@ora12c1 ~]# fdisk -l /dev/sdc Disk /dev/sdc: 40.9 GB, 40936407040 bytes 64 heads, 32 sectors/track, 39040 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x9f7eea44 Device Boot Start End Blocks Id System /dev/sdc1 1 1025 1049584 83 Linux /dev/sdc2 1026 5526 4609024 83 Linux /dev/sdc3 5527 17815 12583936 83 Linux /dev/sdc4 17816 39040 21734400 5 Extended /dev/sdc5 17816 33176 15729648 83 Linux [root@ora12c1 ~]# [root@ora12c1 ~]# ll /dev/sdc* brw-rw---- 1 root disk 8, 32 Nov 1 14:49 /dev/sdc brw-rw---- 1 root disk 8, 33 Nov 1 14:49 /dev/sdc1 brw-rw---- 1 root disk 8, 34 Nov 1 14:49 /dev/sdc2 brw-rw---- 1 root disk 8, 35 Nov 1 14:49 /dev/sdc3 brw-rw---- 1 root disk 8, 36 Nov 1 14:49 /dev/sdc4 brw-rw---- 1 root disk 8, 37 Nov 1 14:49 /dev/sdc5 [root@ora12c1 ~]# |
通过“oracleasm”制作ASM DISK:
+DATA01,/dev/sdc5。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
[root@ora12c1 ~]# oracleasm listdisks OCR OCR1 [root@ora12c1 ~]# oracleasm createdisk DATA01 /dev/sdc5 Writing disk header: done Instantiating disk: done [root@ora12c1 ~]# [root@ora12c1 ~]# oracleasm listdisks DATA01 OCR OCR1 [root@ora12c1 ~]# [root@ora12c1 ~]# ll /dev/oracleasm/disks/ total 0 brw-rw---- 1 grid asmadmin 8, 37 Nov 1 14:51 DATA01 brw-rw---- 1 grid asmadmin 8, 33 Nov 1 14:51 OCR brw-rw---- 1 grid asmadmin 8, 34 Nov 1 14:50 OCR1 [root@ora12c1 ~]# |
调用“asmca”:
1 2 3 4 5 6 7 8 9 10 11 12 |
[root@ora12c1 ~]# export DISPLAY=192.168.223.1:0.0 [root@ora12c1 ~]# xhost access control disabled, clients can connect from any host INET:168.0.1.185 INET:192.168.222.1 INET:192.168.223.1 INET:192.168.64.1 [root@ora12c1 ~]# [root@ora12c1 ~]# su - grid [grid@ora12c1 ~]$ asmca & [1] 21119 [grid@ora12c1 ~]$ |
RAC:建库。
通过“dbca”实用程序建库。
1 2 3 4 |
[root@ora12c1 ~]# su - oracle [oracle@ora12c1 ~]$ dbca & [1] 21922 [oracle@ora12c1 ~]$ |
EM:https://192.168.223.127:5500/em
用户:sys
权限:作为sysdba
密码:DBCA建库时指定的口令
命令行终端:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
[root@ora12c1 ~]# su - grid [grid@ora12c1 ~]$ crsctl stat res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.ASMNET1LSNR_ASM.lsnr ONLINE ONLINE ora12c1 STABLE ONLINE ONLINE ora12c2 STABLE ora.DATA01.dg ONLINE ONLINE ora12c1 STABLE ONLINE ONLINE ora12c2 STABLE ora.LISTENER.lsnr ONLINE ONLINE ora12c1 STABLE ONLINE ONLINE ora12c2 STABLE ora.OCR.dg ONLINE ONLINE ora12c1 STABLE ONLINE ONLINE ora12c2 STABLE ora.net1.network ONLINE ONLINE ora12c1 STABLE ONLINE ONLINE ora12c2 STABLE ora.ons ONLINE ONLINE ora12c1 STABLE ONLINE ONLINE ora12c2 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE ora12c2 STABLE ora.MGMTLSNR 1 ONLINE ONLINE ora12c1 169.254.153.196 192. 168.222.133,STABLE ora.asm 1 ONLINE ONLINE ora12c1 Started,STABLE 2 ONLINE ONLINE ora12c2 Started,STABLE 3 OFFLINE OFFLINE STABLE ora.atlas.db 1 ONLINE ONLINE ora12c1 Open,STABLE 2 ONLINE ONLINE ora12c2 Open,STABLE ora.cvu 1 ONLINE ONLINE ora12c2 STABLE ora.mgmtdb 1 ONLINE OFFLINE Instance Shutdown,ST ABLE ora.oc4j 1 ONLINE ONLINE ora12c2 STABLE ora.ora12c1.vip 1 ONLINE ONLINE ora12c1 STABLE ora.ora12c2.vip 1 ONLINE ONLINE ora12c2 STABLE ora.scan1.vip 1 ONLINE ONLINE ora12c2 STABLE -------------------------------------------------------------------------------- [grid@ora12c1 ~]$ [grid@ora12c1 ~]$ crsctl query css votedisk ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 534095ef29834f9bbf3dd4736bae9153 (/dev/oracleasm/disks/OCR) [OCR] Located 1 voting disk(s). [grid@ora12c1 ~]$ ocrcheck Status of Oracle Cluster Registry is as follows : Version : 4 Total space (kbytes) : 409568 Used space (kbytes) : 1620 Available space (kbytes) : 407948 ID : 2073892159 Device/File Name : +OCR Device/File integrity check succeeded Device/File not configured Device/File not configured Device/File not configured Device/File not configured Cluster registry integrity check succeeded Logical corruption check bypassed due to non-privileged user [grid@ora12c1 ~]$ [grid@ora12c1 ~]$ crsctl check crs CRS-4638: Oracle High Availabil |