RAC19c搭建-centos7+openfiler+multipath+udev
1.環境:centos7.9
openfiler
oracle19c
rac11g搭建參考 http://blog.itpub.net/70004783/viewspace-2792218/
2.1 IP 規劃
Hostname |
Host-alias |
type |
ip |
interface |
rac1 |
rac1 |
Public ip |
10.8.98.103 |
Eth0 |
rac1-vip |
rac1-vip |
Virtual ip |
10.8.98.105 |
Eth0:1 |
rac1-priv |
rac1-priv |
Private ip |
192.168.1.103 |
Eth1 |
|
|
|
|
|
rac2 |
rac2 |
Public ip |
10.8.98.104 |
Eth0 |
rac2-vip |
rac2-vip |
Virtual ip |
10.8.98.106 |
Eth0:1 |
rac2-priv |
rac2-priv |
Private ip |
192.168.1.104 |
Eth1 |
|
|
|
|
|
cluster-scan |
cluster-scan |
scan ip |
10.8.98.107 |
Eth0 |
|
|
|
|
|
openfiler |
openfiler |
|
10.8.98.100 |
Eth0 |
|
|
|
10.8.98.101 |
Eth1 |
倆節點hosts檔案修改
[root@rac1 ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 #public ip eth0 10.8.98.103 rac1 10.8.98.104 rac2 #priv ip eth1 192.168.1.103 rac1-priv 192.168.1.104 rac2-priv #vip ip 10.8.98.105 rac1-vip 10.8.98.106 rac2-vip #scan ip 10.8.98.107 cluster-scan
2.2 目錄規劃
Grid infrastructure |
Oracle database |
HOME=/home/oracle |
HOME=/home/oracle |
ORACLE_BASE=/u01/app/grid |
ORACLE_BASE=/u01/app/oracle |
ORACLE_HOME=/u01/app/19c/grid |
ORACLE_HOME=/u01/app/oracle/product/19c/db_1 |
2.3 ORACLE SID
db_name |
prod |
Node 1 instance sid |
prod1 |
Node 2 instance sid |
prod2 |
2.4 儲存規劃
儲存LUN (分割槽)規劃原則(生產環境)
1. 資料檔案和歸檔檔案底層屬於不同的raid 組,屬於不通的DG( 磁碟組)
2. 線上日誌檔案同一組中不同成員分別儲存在兩個DG 中
3. 控制檔案不同成員分別儲存在兩個DG 中
4. Ocr 和votedisk 存放在資料之外單獨的ASM 磁碟組
ASM 磁碟劃分
Rac 節點 |
Lun name |
Asm 磁碟名稱 /alias |
Size |
ASM 磁碟組名稱 |
冗餘型別 |
Rac1 |
|
asmocrvote1 |
1G |
OCRDG |
High/normal |
|
asmocrvote2 |
1G | |||
|
asmocrvote3 |
1G | |||
|
asmdata01 |
20G |
DATADG |
external | |
|
asmdata02 |
20G | |||
|
asmarch01 |
10G |
FRADG |
external | |
|
asmmgmt01 |
30G |
MGMTDG |
external | |
|
|
|
|
|
|
Rac2 |
|
asmocrvote1 |
1G |
SYSTEMDG |
High/normal |
|
asmocrvote2 |
1G | |||
|
asmocrvote3 |
1G | |||
|
asmdata01 |
20G |
DATADG |
external | |
|
asmdata02 |
20G | |||
|
asmarch01 |
10G |
FRADG |
external | |
|
asmmgmt01 |
30G |
MGMTDG |
external |
我這邊時搭建的測試環境,生產環境可自己調整
openfile的搭建參考 http://blog.itpub.net/70004783/viewspace-2791487/
本地yum源的搭建參考 http://blog.itpub.net/70004783/viewspace-2789438/
安裝需要的軟體列表
yum install -y bc yum install -y compat-libcap1* yum install -y compat-libcap* yum install -y binutils yum install -y compat-libstdc++-33 yum install -y elfutils-libelf yum install -y elfutils-libelf-devel yum install -y gcc yum install -y gcc-c++ yum install -y glibc-2.5 yum install -y glibc-common yum install -y glibc-devel yum install -y glibc-headers yum install -y ksh libaio yum install -y libaio-devel yum install -y libgcc yum install -y libstdc++ yum install -y libstdc++-devel yum install -y make yum install -y sysstat yum install -y unixODBC yum install -y unixODBC-devel yum install -y binutils* yum install -y compat-libstdc* yum install -y elfutils-libelf* yum install -y gcc* yum install -y glibc* yum install -y ksh* yum install -y libaio* yum install -y libgcc* yum install -y libstdc* yum install -y make* yum install -y sysstat* yum install -y libXp* yum install -y glibc-kernheaders yum install -y net-tools-*
2.1 建立使用者組,使用者和目錄
在兩個節點增加使用者與組:
/usr/sbin/groupadd -g 501 oinstall /usr/sbin/groupadd -g 502 dba /usr/sbin/groupadd -g 503 oper /usr/sbin/groupadd -g 504 asmadmin /usr/sbin/groupadd -g 505 asmoper /usr/sbin/groupadd -g 506 asmdba /usr/sbin/useradd -g oinstall -G dba,asmdba,oper oracle /usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid
修改使用者密碼:
passwd grid
passwd oracle
登陸測試(必須做),分別用oracle,grid使用者透過ssh登入,按提示修改密碼
目錄
mkdir -p /u01/app/19c/grid mkdir -p /u01/app/grid mkdir -p /u01/app/oraInventory chown -R grid:oinstall /u01 mkdir -p /u01/app/oracle mkdir -p /u01/app/oracle/product/19c/db_1 chown -R oracle:oinstall /u01/app/oracle chmod -R 775 /u01
2.修改作業系統引數2節點
修改/etc/security/limits.conf檔案,增加內容如下:
vi /etc/security/limits.conf
#ORACLE SETTING grid soft nproc 2047 grid hard nproc 16384 grid soft nofile 1024 grid hard nofile 65536 grid soft stack 10240 grid hard stack 32768 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 10240 oracle hard stack 32768 oracle hard memlock 6291456 oracle soft memlock 6291456
3.禁用SELINUX
vi /etc/selinux/config 修改下面
SELINUX=disabled
4.關閉防火牆
systemctl stop firewalld systemctl disable firewalld
禁用NTP
systemctl stop chronyd systemctl disable chronyd mv /etc/chrony.conf /etc/chrony.conf.bak
禁用avahi
systemctl stop avahi-daemon.socket systemctl stop avahi-daemon.service systemctl disable avahi-daemon.socket systemctl disable avahi-daemon.service
5、修改/etc/pam.d/login檔案
vi /etc/pam.d/login 新增如下
新增以下 #oracle setting add session required /lib/security/pam_limits.so session required pam_limits.so
6、修改sysctl.conf配置檔案
vi /etc/sysctl.conf 新增如下
#oracle setting add kernel.shmmax = 277495689510912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586 fs.file-max = 6815744 kernel.shmall = 67747971072 net.ipv4.tcp_max_tw_buckets = 6000 net.ipv4.ip_local_port_range = 9000 65500 net.ipv4.tcp_tw_recycle = 0 net.ipv4.tcp_tw_reuse = 1 #net.core.somaxconn = 262144 net.core.netdev_max_backlog = 262144 net.ipv4.tcp_max_orphans = 262144 net.ipv4.tcp_max_syn_backlog = 262144 net.ipv4.tcp_synack_retries = 2 net.ipv4.tcp_syn_retries = 1 net.ipv4.tcp_fin_timeout = 1 net.ipv4.tcp_keepalive_time = 30 net.ipv4.tcp_keepalive_probes = 6 net.ipv4.tcp_keepalive_intvl = 5 net.ipv4.tcp_timestamps = 0 fs.aio-max-nr = 1048576 net.ipv4.conf.all.rp_filter = 2 net.ipv4.conf.default.rp_filter = 2
讓配置生效:
sysctl -p
8.配置grid和oracle使用者的環境變數
節點1 配置grid
[grid@rac1:/home/grid]$cat .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH PS1="[`whoami`@`hostname`:"'$PWD]$' export PS1 umask 022 alias sqlplus="rlwrap sqlplus" export TMP=/tmp export export TMPDIR=$TMP export ORACLE_HOSTNAME=rac1 ORACLE_SID=+ASM1; export ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM ORACLE_BASE=/u01/app/grid; export ORACLE_BASE ORACLE_HOME=/u01/app/19c/grid; export ORACLE_HOME NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin; export PATH THREADS_FLAG=native; export THREADS_FLAG if [ $USER = "oracle" ] || [ $USER = "grid" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi [grid@rac1:/home/grid]$
節點2 一樣,只需要更改以下2行
export ORACLE_HOSTNAME=rac2 ORACLE_SID=+ASM2; export ORACLE_SID
節點1配置oracle
[oracle@rac1:/home/oracle]$cat .bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH PS1="[`whoami`@`hostname`:"'$PWD]$' alias sqlplus="rlwrap sqlplus" alias rman="rlwrap rman" export PS1 export TMP=/tmp export export TMPDIR=$TMP export ORACLE_HOSTNAME=rac1 export ORACLE_UNQNAME=prodpri ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/19c/db_1; export ORACLE_HOME ORACLE_SID=prod1; export ORACLE_SID ORACLE_TERM=xterm; export ORACLE_TERM NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;export NLS_LANG PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/19c/db_1/bin:$ORACLE_HOME/bin; export PATH THREADS_FLAG=native; export THREADS_FLAG if [ $USER = "oracle" ] || [ $USER = "grid" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi
節點2一樣,需要更改2行
export ORACLE_HOSTNAME=rac2 ORACLE_SID=prod2; export ORACLE_SID
9. 安裝配置iscsi
yum install iscsi-initiator-utils* -y 檢查是否開機啟動 systemctl list-unit-files | grep iscsi 如果不是,則這樣設定 systemctl enable iscsid.service systemctl enable iscsi.service
啟動iscsi服務
systemctl restart iscsi systemctl restart iscsid 發現儲存上的iscsi目標 iscsiadm -m discovery -t st -p 10.8.98.100:3260 登陸目標 iscsiadm -m node --loginall=all
察看iscsi資訊,是不是2條鏈路
iscsiadm -m session
[root@rac1 ~]# iscsiadm -m session tcp: [1] 10.8.98.100:3260,1 iqn.2006-01.com.openfiler:tsn.c97222275d9c (non-flash) tcp: [2] 10.8.98.101:3260,1 iqn.2006-01.com.openfiler:tsn.c97222275d9c (non-flash) [root@rac1 ~]#
ls -l /dev/disk/by-path/
因為我們是手動發現的iscsi,所以如果重啟則會消失,所以將iscsi目標寫入iscsi配置檔案中
vi /etc/iscsi/initiatorname.iscsi
InitiatorName=
iqn.2006-01.com.openfiler:tsn.c97222275d9c
重啟iscsi服務
systemctl restart iscsi systemctl restart iscsid
重新整理新增加iscsi 儲存目標
iscsiadm -m session -R
察看iscsi通道
cat /proc/scsi/scsi
刪除/登出target連線
iscsiadm -m node --logoutall=all
10.安裝多路徑
yum install device-mapper*
檢查device-mapper有沒有安裝
rpm -qa | grep device-mapper
安裝未安裝的rpm包
設定maltipath開機啟動
[root@rac1 ntp]# systemctl list-unit-files | grep multipath
multipathd.service enabled
把multipath模組加入核心
modprobe dm-multipath
modprobe dm-round-robin
/sbin/mpathconf -help
/sbin/mpathconf --enable
啟動服務
systemctl restart multipathd
配置multipath -ll
[root@rac1 ~]# multipath -ll mpathe (14f504e46494c45526e494c786a632d69584c502d6e6c4e44) dm-6 OPNFILER,VIRTUAL-DISK size=20G features='0' hwhandler='0' wp=rw |-+- policy='service-time 0' prio=1 status=active | `- 3:0:0:4 sdk 8:160 active ready running `-+- policy='service-time 0' prio=1 status=enabled `- 4:0:0:4 sdj 8:144 active ready running mpathd (14f504e46494c45526c4c31396b682d344342732d7149316d) dm-5 OPNFILER,VIRTUAL-DISK size=20G features='0' hwhandler='0' wp=rw |-+- policy='service-time 0' prio=1 status=active | `- 3:0:0:3 sdi 8:128 active ready running `-+- policy='service-time 0' prio=1 status=enabled `- 4:0:0:3 sdh 8:112 active ready running mpathc (14f504e46494c45524562586d37472d656533512d4463437a) dm-4 OPNFILER,VIRTUAL-DISK size=1.0G features='0' hwhandler='0' wp=rw |-+- policy='service-time 0' prio=1 status=active | `- 3:0:0:2 sdg 8:96 active ready running `-+- policy='service-time 0' prio=1 status=enabled `- 4:0:0:2 sdf 8:80 active ready running mpathb (14f504e46494c45524e32653170322d6a7743732d566b394f) dm-3 OPNFILER,VIRTUAL-DISK size=1.0G features='0' hwhandler='0' wp=rw |-+- policy='service-time 0' prio=1 status=active | `- 3:0:0:1 sde 8:64 active ready running `-+- policy='service-time 0' prio=1 status=enabled `- 4:0:0:1 sdd 8:48 active ready running mpatha (14f504e46494c455278764265447a2d306571342d57524461) dm-2 OPNFILER,VIRTUAL-DISK size=1.0G features='0' hwhandler='0' wp=rw |-+- policy='service-time 0' prio=1 status=active | `- 3:0:0:0 sdc 8:32 active ready running `-+- policy='service-time 0' prio=1 status=enabled `- 4:0:0:0 sdb 8:16 active ready running mpathh (14f504e46494c45526d474e7946522d576f5a782d6d33756b) dm-9 OPNFILER,VIRTUAL-DISK size=10G features='0' hwhandler='0' wp=rw |-+- policy='service-time 0' prio=1 status=active | `- 3:0:0:7 sdp 8:240 active ready running `-+- policy='service-time 0' prio=1 status=enabled `- 4:0:0:7 sdq 65:0 active ready running mpathg (14f504e46494c455278336e304d762d36574b782d7a675463) dm-8 OPNFILER,VIRTUAL-DISK size=30G features='0' hwhandler='0' wp=rw |-+- policy='service-time 0' prio=1 status=active | `- 3:0:0:6 sdn 8:208 active ready running `-+- policy='service-time 0' prio=1 status=enabled `- 4:0:0:6 sdo 8:224 active ready running mpathf (14f504e46494c4552306e664a52432d4c3564582d75473136) dm-7 OPNFILER,VIRTUAL-DISK size=20G features='0' hwhandler='0' wp=rw |-+- policy='service-time 0' prio=1 status=active | `- 3:0:0:5 sdl 8:176 active ready running `-+- policy='service-time 0' prio=1 status=enabled `- 4:0:0:5 sdm 8:192 active ready running [root@rac1 ~]#
根據上面的磁碟大小以及wwid號
統計以及規劃如下
14f504e46494c455278764265447a2d306571342d57524461 1g asmvote01 14f504e46494c45524e32653170322d6a7743732d566b394f 1g asmvote02 14f504e46494c45524562586d37472d656533512d4463437a 1g asmvote03 14f504e46494c45526c4c31396b682d344342732d7149316d 20g asmdata01 14f504e46494c45526e494c786a632d69584c502d6e6c4e44 20g asmdata02 14f504e46494c4552306e664a52432d4c3564582d75473136 20g asmdata03 14f504e46494c455278336e304d762d36574b782d7a675463 30g asmmgmt01 14f504e46494c45526d474e7946522d576f5a782d6d33756b 10g asmfra01
還有兩個命令可以查詢uuid
multipath -v3
more /etc/multipath/wwids
根據以上得到的資料修改多路徑的配置檔案
備份配置檔案模板
[root@rac1 ~]# cp /etc/multipath.conf /etc/multipath.conf.bak2021
根據上面的規劃,改後的配置檔案如下
cat /etc/multipath.conf
defaults { user_friendly_names yes find_multipaths yes } blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" devnode "^hd[a-z]" #我這裡sda是本地硬碟,所以加黑名單 devnode "^sda" } multipaths { multipath { wwid 14f504e46494c455278764265447a2d306571342d57524461 alias asmvote01 path_grouping_policy multibus path_selector "round-robin 0" failback immediate } multipath { wwid 14f504e46494c45524e32653170322d6a7743732d566b394f alias asmvote02 path_grouping_policy multibus path_selector "round-robin 0" failback immediate } multipath { wwid 14f504e46494c45524562586d37472d656533512d4463437a alias asmvote03 path_grouping_policy multibus path_selector "round-robin 0" failback immediate } multipath { wwid 14f504e46494c45526c4c31396b682d344342732d7149316d alias asmdata01 path_grouping_policy multibus path_selector "round-robin 0" failback immediate } multipath { wwid 14f504e46494c45526e494c786a632d69584c502d6e6c4e44 alias asmdata02 path_grouping_policy multibus path_selector "round-robin 0" failback immediate } multipath { wwid 14f504e46494c4552306e664a52432d4c3564582d75473136 alias asmdata03 path_grouping_policy multibus path_selector "round-robin 0" failback immediate } multipath { wwid 14f504e46494c455278336e304d762d36574b782d7a675463 alias asmmgmt01 path_grouping_policy multibus path_selector "round-robin 0" failback immediate } multipath { wwid 14f504e46494c45526d474e7946522d576f5a782d6d33756b alias asmfra01 path_grouping_policy multibus path_selector "round-robin 0" failback immediate } } devices { device { vendor "openfiler " product "virtual disk" path_grouping_policy multibus path_checker readsector0 path_selector "round-robin 0" hardware_handler "0" } }
節點2同理
刪除現有多路徑
multipath -F
格式化多路徑
multipath -v2
啟動服務
systemctl restart multipathd
倆節點
multipath -ll
[root@rac1 ~]# multipath -ll asmmgmt01 (14f504e46494c455278336e304d762d36574b782d7a675463) dm-8 OPNFILER,VIRTUAL-DISK size=30G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active |- 3:0:0:6 sdn 8:208 active ready running `- 4:0:0:6 sdo 8:224 active ready running asmdata03 (14f504e46494c4552306e664a52432d4c3564582d75473136) dm-7 OPNFILER,VIRTUAL-DISK size=20G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active |- 3:0:0:5 sdl 8:176 active ready running `- 4:0:0:5 sdm 8:192 active ready running asmdata02 (14f504e46494c45526e494c786a632d69584c502d6e6c4e44) dm-6 OPNFILER,VIRTUAL-DISK size=20G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active |- 3:0:0:4 sdk 8:160 active ready running `- 4:0:0:4 sdj 8:144 active ready running asmvote03 (14f504e46494c45524562586d37472d656533512d4463437a) dm-4 OPNFILER,VIRTUAL-DISK size=1.0G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active |- 3:0:0:2 sdg 8:96 active ready running `- 4:0:0:2 sdf 8:80 active ready running asmdata01 (14f504e46494c45526c4c31396b682d344342732d7149316d) dm-5 OPNFILER,VIRTUAL-DISK size=20G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active |- 3:0:0:3 sdi 8:128 active ready running `- 4:0:0:3 sdh 8:112 active ready running asmvote02 (14f504e46494c45524e32653170322d6a7743732d566b394f) dm-3 OPNFILER,VIRTUAL-DISK size=1.0G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active |- 3:0:0:1 sde 8:64 active ready running `- 4:0:0:1 sdd 8:48 active ready running asmvote01 (14f504e46494c455278764265447a2d306571342d57524461) dm-2 OPNFILER,VIRTUAL-DISK size=1.0G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active |- 3:0:0:0 sdc 8:32 active ready running `- 4:0:0:0 sdb 8:16 active ready running asmfra01 (14f504e46494c45526d474e7946522d576f5a782d6d33756b) dm-9 OPNFILER,VIRTUAL-DISK size=10G features='0' hwhandler='0' wp=rw `-+- policy='round-robin 0' prio=1 status=active |- 3:0:0:7 sdp 8:240 active ready running `- 4:0:0:7 sdq 65:0 active ready running [root@rac1 ~]#
11.配置udev
cd /usr/share/doc/device-mapper-1.02.170/
cp 12-dm-permissions.rules /etc/udev/rules.d/
[root@rac1 ~]# vi /etc/udev/rules.d/12-dm-permissions.rules
在最後新增如下
# OWNER:="root", GROUP:="root", MODE:="660" LABEL="dm_end" ENV{DM_NAME}=="asmvote01", OWNER:="grid", GROUP:="asmadmin", MODE:="660" ENV{DM_NAME}=="asmvote02", OWNER:="grid", GROUP:="asmadmin", MODE:="660" ENV{DM_NAME}=="asmvote03", OWNER:="grid", GROUP:="asmadmin", MODE:="660" ENV{DM_NAME}=="asmdata01", OWNER:="grid", GROUP:="asmadmin", MODE:="660" ENV{DM_NAME}=="asmdata02", OWNER:="grid", GROUP:="asmadmin", MODE:="660" ENV{DM_NAME}=="asmdata03", OWNER:="grid", GROUP:="asmadmin", MODE:="660" ENV{DM_NAME}=="asmmgmt01", OWNER:="grid", GROUP:="asmadmin", MODE:="660" ENV{DM_NAME}=="asmfra01", OWNER:="grid", GROUP:="asmadmin", MODE:="660"
啟動udev
[root@rac1 rules.d]# /sbin/udevadm trigger --type=devices --action=change
檢查是否正確
[root@rac1 device-mapper-1.02.170]# ll /dev/dm* brw-rw----. 1 root disk 253, 0 Sep 24 16:32 /dev/dm-0 brw-rw----. 1 root disk 253, 1 Sep 24 16:32 /dev/dm-1 brw-rw----. 1 grid asmadmin 253, 2 Sep 24 16:32 /dev/dm-2 brw-rw----. 1 grid asmadmin 253, 3 Sep 24 16:32 /dev/dm-3 brw-rw----. 1 grid asmadmin 253, 4 Sep 24 16:32 /dev/dm-4 brw-rw----. 1 grid asmadmin 253, 5 Sep 24 16:32 /dev/dm-5 brw-rw----. 1 grid asmadmin 253, 6 Sep 24 16:32 /dev/dm-6 brw-rw----. 1 grid asmadmin 253, 7 Sep 24 16:32 /dev/dm-7 brw-rw----. 1 grid asmadmin 253, 8 Sep 24 16:32 /dev/dm-8 brw-rw----. 1 grid asmadmin 253, 9 Sep 24 16:32 /dev/dm-9
不重啟,重新應用udev規則
/sbin/udevadm control --reload-rules && udevadm trigger
2節點重啟系統,檢查如上則可以了
12.安裝叢集軟體,建立asm磁碟組,安裝oracle軟體,dbca建庫(只擷取重要步驟)
[root@rac1 ~]
# yum install tigervnc*
[grid@rac1:
/home/grid
]$vncserver
LINUX.X64_193000_grid_home.zip 檔案放到grid的ORACLE_HOME 目錄(注意是grid使用者的),並解壓
[grid@rac1 grid]$ pwd /u01/app/19c/grid [grid@rac1 grid]$ ./gridSetup.sh
找到cvuqdisk包在rac倆節點安裝。
dns解析的問題,可以忽略
注意:指令碼執行順序,rac1執行第一個指令碼,rac2執行第一個指令碼,然後rac1執行第二個,rac2執行第二個
asmca圖形化介面建立asm磁碟組
將oracle安裝包放到oracle使用者的$ORACLE_HOME目錄下解壓,並圖形安裝(僅安裝軟體)
oracle使用者dbca圖形化建庫
13、確認rac安裝ok
root使用者環境變數新增grid的home目錄/u01/app/19c/grid/bin
[root@rac1 ~]# cat .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:/u01/app/19c/grid/bin export PATH [root@rac1 ~]#
[root@rac1 ~]# crsctl status resource -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.LISTENER.lsnr ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.chad ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.net1.network ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.ons ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 OFFLINE OFFLINE STABLE ora.DATADG.dg(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 ONLINE OFFLINE STABLE ora.FRADG.dg(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 ONLINE OFFLINE STABLE ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE rac1 STABLE ora.MGMTDG.dg(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 OFFLINE OFFLINE STABLE ora.MGMTLSNR 1 ONLINE ONLINE rac1 169.254.25.123 192.1 68.1.103,STABLE ora.OCRDG.dg(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 OFFLINE OFFLINE STABLE ora.asm(ora.asmgroup) 1 ONLINE ONLINE rac1 Started,STABLE 2 ONLINE ONLINE rac2 Started,STABLE 3 OFFLINE OFFLINE STABLE ora.asmnet1.asmnetwork(ora.asmgroup) 1 ONLINE ONLINE rac1 STABLE 2 ONLINE ONLINE rac2 STABLE 3 OFFLINE OFFLINE STABLE ora.cvu 1 ONLINE ONLINE rac1 STABLE ora.mgmtdb 1 ONLINE ONLINE rac1 Open,STABLE ora.prod.db 1 ONLINE ONLINE rac1 Open,HOME=/u01/app/o racle/product/19c/db _1,STABLE 2 ONLINE ONLINE rac2 Open,HOME=/u01/app/o racle/product/19c/db _1,STABLE ora.qosmserver 1 ONLINE ONLINE rac1 STABLE ora.rac1.vip 1 ONLINE ONLINE rac1 STABLE ora.rac2.vip 1 ONLINE ONLINE rac2 STABLE ora.scan1.vip 1 ONLINE ONLINE rac1 STABLE -------------------------------------------------------------------------------- [root@rac1 ~]#
覺得對你有幫助給點個贊吧,歡迎裝載。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70004783/viewspace-2791938/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- RAC11g搭建-centos7+openfiler+multipath+udevCentOSdev
- 【ASM】RAC19C因引數設定不當,asm無法啟動ASM
- 【環境搭建】RocketMQ叢集搭建MQ
- MySQL叢集搭建(1)-主備搭建MySql
- MVVM框架的搭建(二)——專案搭建MVVM框架
- Harbor 搭建
- Sentry 搭建
- 搭建HadoopHadoop
- elk 搭建
- Inception 搭建
- MYSQL搭建MySql
- ELK搭建
- 搭建genieacs
- RustDesk 搭建Rust
- Gitlab搭建Gitlab
- OJ搭建
- 從零搭建一個IdentityServer——專案搭建IDEServer
- Windows下搭建ESP-IDF環境搭建Windows
- 【Azkaban搭建】---Azkaban 3.25.0搭建細則 超實用
- 精讀《視覺化搭建思考 - 富文字搭建》視覺化
- docker 搭建 MySQLDockerMySql
- OpenVpn的搭建
- Nexus的搭建
- docker rancher搭建Docker
- JDK的搭建JDK
- 搭建Eureka Clientclient
- 環境搭建
- CentOS 搭建 GitLabCentOSGitlab
- Docker 搭建 MongoDBDockerMongoDB
- linux搭建FabricLinux
- vue 快速搭建Vue
- Redis sentinel搭建Redis
- 搭建AD域
- Linux OpenGrok搭建Linux
- 搭建微服務微服務
- 網站搭建網站
- RTL difftest搭建FFT
- 快速搭建Fx