grid软件拷贝到另外的节点启动crs
环境:
OS:Centos 7
DB:19.24.0
1.节点1打包grid软件(root账号操作)
[root@rac01 grid]# pwd
/u01/grid
[root@rac01 grid]# ls
grid_base grid_home oraInventory
[root@rac01 grid]# tar -zcvpf grid_home.tar.gz ./grid_home
注意:
grid_base不需要打包;
-p选项:带上文件权限属性
2.拷贝到节点2的相应目录
[root@rac01 grid]# scp grid_home.tar.gz root@192.168.58.182:/u01/grid/
3.节点2模拟删除grid_home目录
[root@rac02 grid]# pwd
/u01/grid
[root@rac02 grid]#rm -rf grid_home
解压从节点1拷贝过来的文件
[root@rac02 grid]#tar -zxvpf grid_home.tar.gz
说明:解压也需要带上-p选项,保留原文件权限属性
4.启动节点2的crs
su - root
[root@rac02 grid]#/u01/grid/grid_home/19.3.0.0/bin/crsctl start crs
报错:
2024-08-01 21:25:12.276 : GPNP:2903945024: clsgpnp_InitCKProviders: [at clsgpnp0.c:5881] Result: (100) CLSGPNP_unknown. (:GPNP01746:)Error initializing gp
np security key provider: cred wallet (LSKP-CREDDOM_OLR-1).
2024-08-01 21:25:12.276 : GPNP:2903945024: clsgpnpkwf_initwfloc: [at clsgpnpkwf.c:657] Result: (7) CLSGPNP_IO. (:GPNP01004:)Fatal: Cannot open neither PEE
R nor PRDR GPnP wallet. No more wallets to verify GPnP configuration (profile). Check GPnP configuration: wallet(s) either missing or do not have access privileges. statres: -5, Wallet home : /u01/grid/grid_home/19.3.0.0/gpnp/rac02/.
2024-08-01 21:25:12.276 : GPNP:2903945024: clsgpnpkwf_initwfloc: [at clsgpnpkwf.c:743] Result: (66) CLSGPNP_WALLET_NONE. (:GPNP01003:)Failed to find peer wallet dir in either OCR_CRS_HOME, or ORACLE_HOME locations.
2024-08-01 21:25:12.277 : GPNP:2903945024: clsgpnp_InitCKProviders: [at clsgpnp0.c:5911] Result: (66) CLSGPNP_WALLET_NONE. (:GPNP00254:)Error initializing
gpnp security key provider: file wallet (LSKP-FSW).
解决办法:
A.将软件拷贝过来的如下目录由rac01改成rac02
[grid@rac02 rac01]$ cd /u01/grid/grid_home/19.3.0.0/gpnp
[grid@rac02 gpnp]$ ls
gpnp_bcp__2022_4_18_5137 init manifest.txt profiles rac01 seed wallets
[grid@rac02 gpnp]$ mv rac01 rac02
B.重新执行如下脚本
安装gi时候需要执行
su - root
/u01/grid/oraInventory/orainstRoot.sh
/u01/grid/grid_home/19.3.0.0/root.sh
然后重做执行启动命令
[root@rac02 grid]#/u01/grid/grid_home/19.3.0.0/bin/crsctl start crs
说明:
若grid_base目录是从其他节点拷贝过来的,启动会报如下错误:
提示找不到本地的olr
2024-08-02 02:42:31.630 : default:990191424: CRS-40005: internal error
default:990191424: Oracle Clusterware infrastructure error in CRSCTL (OS PID 13513): CLSCAL initialization failed with return value 1
default:990191424: u_set_comp_error: comptype '103' : error '29'
2024-08-02 02:42:31.779 : OCROSD:990191424: utopen:6m': failed in stat OCR file/disk /u01/grid/grid_base/crsdata/rac02/olr/rac02_19.olr, errno=2, os err str
ing=No such file or directory
2024-08-02 02:42:31.779 : OCROSD:990191424: utopen:7: failed to open any OCR file/disk, errno=2, os err string=No such file or directory
default:990191424: u_set_gbl_comp_error: comptype '101' : error '2'
2024-08-02 02:42:31.779 : OCRRAW:990191424: proprinit: Could not open raw device
2024-08-02 02:42:31.780 : default:990191424: a_init:7!: Backend init unsuccessful : [26]
2024-08-02 02:42:31.781 : CRSCTL:990191424: crsctl_main: crsctl command failed with status 1
2024-08-02 02:42:31.781 : CRSCTL:990191424: /u01/grid/grid_home/19.3.0.0/bin/crsctl.bin start crs
若节点2的olr文件有备份的话,可以拷贝过来使用
解决办法:
若是有备份的话,可以直接拷贝过来使用
创建目录
[root@rac02 olr]# su - grid
[grid@rac02 ~]$ mkdir -p /u01/grid/grid_base/crsdata/rac02/olr
带上属性拷贝
su - root
[root@rac02 olr]# cp -p /u01/grid/bak_grid_base/crsdata/rac02/olr/rac02_19.olr /u01/grid/grid_base/crsdata/rac02/olr/
然后执行如下语句(该脚本的目的是修改权限)
/u01/grid/oraInventory/orainstRoot.sh
查看olr位置
[root@rac02 grid_base]# more /etc/oracle/olr.loc
olrconfig_loc=/u01/grid/grid_base/crsdata/rac02/olr/rac02_19.olr
crs_home=/u01/grid/grid_home/19.3.0.0
平时需要对olr文件进行备份