Oracle Grid Infrastructure for a Standalone Server
目的:
測試Oracle Grid Infrastructure for a Standalone Server中ASM安裝在NFS。
環境:
OS:redhat 7.9
GRID:11204
操作:
NFS服務端: 192.168.100.200
NFS客戶端+Oracle:192.168.100.58
服務端
vi /etc/exports
/oracle_nfs *(rw,no_root_squash,no_all_squash,sync)
配置生效
exportfs -r
重啟NFS服務即可
service rpcbind restart ;service nfs restart
檢視 RPC 服務的註冊狀況
rpcinfo -p localhost
客戶端
檢視伺服器丟擲的共享目錄資訊
[root@mysql02 ~]# showmount -e 192.168.31.200
Export list for 192.168.31.200:
/oracle_nfs *
掛載
[root@mysql02 soft]# mount -t nfs -o rw,bg,hard,nointr,tcp,nfsvers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0 192.168.31.200:/oracle_nfs /oradata
[root@mysql02 soft]# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 471M 0 471M 0% /dev tmpfs 496M 0 496M 0% /dev/shm tmpfs 496M 7.5M 488M 2% /run tmpfs 496M 0 496M 0% /sys/fs/cgroup /dev/mapper/cjc-root 47G 18G 30G 39% / /dev/sda1 1014M 204M 811M 21% /boot tmpfs 100M 12K 100M 1% /run/user/42 tmpfs 100M 0 100M 0% /run/user/0 /dev/loop0 4.2G 4.2G 0 100% /mnt 192.168.31.200:/oracle_nfs 47G 21G 27G 45% /oradata
建立磁碟
# dd if=/dev/zero of=/oradata/disk1 bs=1M count=200 oflag=direct
配置安裝grid環境
......
啟動安裝
可以正常識別到磁碟
執行root.sh會報錯,可以打補丁,或者按如下方式處理:
執行解除安裝操作報錯:
[root@mysql02 grid]# /oracle/crs/crs/install/roothas.pl -deconfig -force -verbose Can't locate Env.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /oracle/crs/crs/install) at /oracle/crs/crs/install/crsconfig_lib.pm line 703. BEGIN failed--compilation aborted at /oracle/crs/crs/install/crsconfig_lib.pm line 703. Compilation failed in require at /oracle/crs/crs/install/roothas.pl line 166. BEGIN failed--compilation aborted at /oracle/crs/crs/install/roothas.pl line 166. [root@mysql02 grid]#
複製檔案
[root@mysql02 grid]# cp /oracle/crs/perl/lib/5.10.0/Env.pm /usr/lib64/perl5/vendor_perl/
再次執行
[root@mysql02 grid]# /oracle/crs/crs/install/roothas.pl -deconfig -force -verbose Using configuration parameter file: /oracle/crs/crs/install/crsconfig_params CRS-2613: Could not find resource 'ora.cssd'. CRS-4000: Command Stop failed, or completed with errors. CRS-2613: Could not find resource 'ora.cssd'. CRS-4000: Command Delete failed, or completed with errors. CRS-4133: Oracle High Availability Services has been stopped. Successfully deconfigured Oracle Restart stack
因為RHEL 7使用systemd而不是initd執行程式和重啟程式,而root.sh透過傳統的initd執行ohasd程式
解決辦法
在RHEL 7中ohasd需要被設定為一個服務,在執行指令碼root.sh之前。
以root使用者建立服務檔案
touch /usr/lib/systemd/system/ohas.service chmod 777 /usr/lib/systemd/system/ohas.service
將以下內容新增到新建立的ohas.service檔案中
vi /usr/lib/systemd/system/ohas.service [Unit] Description=Oracle High Availability Services After=syslog.target [Service] ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple Restart=always [Install] WantedBy=multi-user.target
以root使用者執行下面的命令
systemctl daemon-reload systemctl enable ohas.service systemctl start ohas.service
驗證
systemctl status ohas.service [root@mysql02 ~]# systemctl start ohas.service [root@mysql02 ~]# systemctl status ohas.service ● ohas.service - Oracle High Availability Services Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled; vendor preset: disabled) Active: active (running) since Sun 2022-01-02 11:41:07 CST; 3s ago Main PID: 11950 (init.ohasd) CGroup: /system.slice/ohas.service └─11950 /bin/sh /etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple Jan 02 11:41:07 mysql02 systemd[1]: Started Oracle High Availability Services. Jan 02 11:41:07 mysql02 systemd[1]: Starting Oracle High Availability Services... Jan 02 11:41:07 mysql02 su[11973]: (to grid) root on none
再次執行root.sh。
[root@mysql02 rpm]# /oracle/crs/root.sh Performing root user operation for Oracle 11g The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /oracle/crs 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. Using configuration parameter file: /oracle/crs/crs/install/crsconfig_params LOCAL ADD MODE Creating OCR keys for user 'grid', privgrp 'oinstall'.. Operation successful. LOCAL ONLY MODE Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. CRS-4664: Node mysql02 successfully pinned. Adding Clusterware entries to inittab mysql02 2022/01/02 12:02:39 /oracle/crs/cdata/mysql02/backup_20220102_120239.olr Successfully configured Oracle Grid Infrastructure for a Standalone Server
#####chenjuchao 20220102 15:20#####
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29785807/viewspace-2850402/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 12c Grid Infrastructure for a Standalone Server on Oracle Linux 7OracleASTStructServerLinux
- Apply PSU for Grid Infrastructure Standalone and DB with Oracle RestartAPPASTStructOracleREST
- 記錄下 patch Grid Infrastructure for StandaloneASTStruct
- RHEL 6.5 64位安裝ORACLE 11G R2 Grid Infrastructure for a Standalone ServerOracleASTStructServer
- Oracle Clusterware and Oracle Grid InfrastructureOracleASTStruct
- Oracle grid infrastructure 解除安裝OracleASTStruct
- Oracle Grid Infrastructure Patch Set Update 11.2.0.4.3OracleASTStruct
- Master Note for RAC Oracle Clusterware and Oracle Grid Infrastructure 1096952.ASTOracleStruct
- clone grid INfrastructure Home and clusterwareASTStruct
- 11g oracle database installation with oracle grid infrastructure on linux(文件)OracleDatabaseASTStructLinux
- How to Troubleshoot Grid Infrastructure Startup IssuesASTStruct
- oracle linux 11.2 rac grid infrastructure add scan ipOracleLinuxASTStruct
- [INS-40406] The installer detects no existing Oracle Grid Infrastructure ...OracleASTStruct
- DNS and DHCP Setup Example for Grid Infrastructure GNSDNSASTStruct
- zt_Oracle 11gR2 grid infrastructure安裝配置系列OracleASTStruct
- 如何升級Oracle Grid Infrastructure和RAC從11.2.0.3到11.2.0.4?OracleASTStruct
- 將Oracle 12c資料庫註冊到Oracle 19c Grid InfrastructureOracle資料庫ASTStruct
- 重新配置 11gR2 Grid InfrastructureASTStruct
- Database Creation on 11.2 Grid Infrastructure with Role SeparationDatabaseASTStruct
- 【MOS】Top 5 Grid Infrastructure Startup Issues (文件 ID 1368382.1)ASTStruct
- 升級Grid Infrastructure到10.2.0.2 遭遇bug 9413827ASTStruct
- 使用Virtual Infrastructure Client 管理 VMWare ServerASTStructclientServer
- How to Troubleshoot Grid Infrastructure Startup Issues [ID 1050908.1]ASTStruct
- Troubleshoot Grid Infrastructure Startup Issues (Doc ID 1050908.1)ASTStruct
- 【GRID】Grid Infrastructure 啟動的五大問題 (Doc ID 1526147.1)ASTStruct
- 【MOS】How to backup or restore OLR in 11.2/12c Grid InfrastructureRESTASTStruct
- redhat linux 11.2 rac grid infrastructure add scan ipRedhatLinuxASTStruct
- backup or restore OLR in 11.2 Grid Infrastructure (Doc ID 1193643.1)RESTASTStruct
- 【轉】How to recover from root.sh on 11.2 Grid Infrastructure FailedASTStructAI
- 聊聊兩種給Grid Infrastructure打補丁的方法(上)ASTStruct
- 聊聊兩種給Grid Infrastructure打補丁的方法(下)ASTStruct
- 【RAC】How to Troubleshoot Grid Infrastructure Startup Issues [ID 1050908.1]ASTStruct
- Deconfigure/Reconfigure(Rebuild OCR) or Deinstall Grid InfrastructureRebuildASTStruct
- 為11gR2 Grid Infrastructure增加新的public網路ASTStruct
- 重新配置與解除安裝11gR2 Grid InfrastructureASTStruct
- 重新配置與解除安裝 11gR2 Grid InfrastructureASTStruct
- 11.2.0.1 Grid Infrastructure Installation Failed at .... While Running root.shASTStructAIWhile
- 診斷 Grid Infrastructure 啟動問題 (文件 ID 1623340.1)ASTStruct