مراحل Relink کردن Grid Infrastructure در محیط Cluster

انجام عملیات Relink برای نرم افزار oracle نیاز به پیش نیاز خاصی ندارد و صرفا توصیه می شود که قبل از انجام relink، دیتابیس و سرویس listener را استاپ کنیم اما relink کردن برای Grid Infrastructure کمی متفاوت است که در این متن مراحل آن را برای محیط Cluster مشاهده می کنید.

توجه: این متن برای اوراکل نسخه 12cR2 به بعد قابل استفاده می باشد.

 

مراحل relink کردن grid در محیط کلاستر

در صورتی که بدون مقدمه دستور relink را با کاربر grid اجرا کنیم، دستور با خطای زیر متوقف خواهد شد:

[grid@RAC1 ~]$ $ORACLE_HOME/bin/relink all

  The Oracle home in which you are running this relinking tool does not

have proper write permissions. Please run this relink script as the same

user who owns the Oracle home and ensure that the Oracle home has the

permissions from the original installation.

  If this is a Grid Infrastructure home, please refer to the

documentation for the proper steps to relink and apply oneoff patches.

برای جلوگیری از رخ دادن این خطا، انجام مراحل زیر پیشنهاد می شود:

مرحله 1: در ابتدا crs را در تمامی نودها متوقف می کنیم:

–Node 1:

[root@RAC1 ~]# /grid18c/home/bin/crsctl stop crs

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘RAC1’

CRS-2673: Attempting to stop ‘ora.crsd’ on ‘RAC1’

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on server ‘RAC1’

CRS-2673: Attempting to stop ‘ora.chad’ on ‘RAC1’

CRS-2673: Attempting to stop ‘ora.db18c.db’ on ‘RAC1’

CRS-2677: Stop of ‘ora.db18c.db’ on ‘RAC1’ succeeded

CRS-2673: Attempting to stop ‘ora.DATA1.dg’ on ‘RAC1’

CRS-2673: Attempting to stop ‘ora.OCR.dg’ on ‘RAC1’

CRS-2673: Attempting to stop ‘ora.LISTENER_SCAN3.lsnr’ on ‘RAC1’

CRS-2677: Stop of ‘ora.DATA1.dg’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.OCR.dg’ on ‘RAC1’ succeeded

CRS-2673: Attempting to stop ‘ora.asm’ on ‘RAC1’

CRS-2677: Stop of ‘ora.chad’ on ‘RAC2’ succeeded

CRS-2677: Stop of ‘ora.LISTENER.lsnr’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.LISTENER_SCAN3.lsnr’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.LISTENER_SCAN2.lsnr’ on ‘RAC1’ succeeded

CRS-2673: Attempting to stop ‘ora.scan3.vip’ on ‘RAC1’

CRS-2677: Stop of ‘ora.chad’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.scan3.vip’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.scan2.vip’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.asm’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.proxy_advm’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.ASMNET1LSNR_ASM.lsnr’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.mgmtdb’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.MGMTLSNR’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.RAC1.vip’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.net1.network’ on ‘RAC1’ succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on ‘RAC1’ has completed

CRS-2677: Stop of ‘ora.crsd’ on ‘RAC1’ succeeded

CRS-2673: Attempting to stop ‘ora.asm’ on ‘RAC1’

CRS-2673: Attempting to stop ‘ora.crf’ on ‘RAC1’

CRS-2673: Attempting to stop ‘ora.drivers.acfs’ on ‘RAC1’

CRS-2673: Attempting to stop ‘ora.mdnsd’ on ‘RAC1’

CRS-2677: Stop of ‘ora.drivers.acfs’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.mdnsd’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.asm’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.cluster_interconnect.haip’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.evmd’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.ctssd’ on ‘RAC1’ succeeded

CRS-2673: Attempting to stop ‘ora.cssd’ on ‘RAC1’

CRS-2677: Stop of ‘ora.cssd’ on ‘RAC1’ succeeded

CRS-2673: Attempting to stop ‘ora.gipcd’ on ‘RAC1’

CRS-2677: Stop of ‘ora.gipcd’ on ‘RAC1’ succeeded

CRS-2677: Stop of ‘ora.gpnpd’ on ‘RAC1’ succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘RAC1’ has completed

CRS-4133: Oracle High Availability Services has been stopped.

 

–Node 2:

[root@RAC2 ~]# /grid18c/home/bin/crsctl stop crs

 

مرحله 2: اسکریپت rootcrs.sh -unlock را با کاربر root اجرا می کنیم(در تمامی نودها):

–Node 1:

[root@RAC1 ~]#   /grid18c/home/crs/install/rootcrs.sh -unlock

Using configuration parameter file: /grid18c/home/crs/install/crsconfig_params

The log of current session can be found at:

  /grid18c/base/crsdata/RAC1/crsconfig/crsunlock_RAC1_2020-08-12_05-15-10PM.log

2020/08/12 17:15:10 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.

2020/08/12 17:15:23 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.

2020/08/12 17:15:23 CLSRSC-347: Successfully unlock /grid18c/home

 

–Node 2:

[root@RAC2 ~]#   /grid18c/home/crs/install/rootcrs.sh -unlock

Using configuration parameter file: /grid18c/home/crs/install/crsconfig_params

The log of current session can be found at:

  /grid18c/base/crsdata/RAC2/crsconfig/crsunlock_RAC2_2020-08-12_05-15-13PM.log

2020/08/12 17:15:14 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.

2020/08/12 17:15:27 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.

2020/08/12 17:15:27 CLSRSC-347: Successfully unlock /grid18c/home

 

مرحله 3: در این مرحله شرایط برای اجرای دستور relink all فراهم است. برای انکه درستی اجرای دستور relink را بررسی کنیم (و صرفا برای یک تست ساده)!!!، فایل config.o را که در مسیر ORACLE_HOME/rdbms/lib$ قرار دارد حذف می کنیم. با اجرای دستور relink خواهیم دید که این فایل ایجاد خواهد شد:

–Node 1:

[grid@RAC1 ~]$ rm -rf /grid18c/home/rdbms/lib/config.o

[grid@RAC1 ~]$ ls -l /grid18c/home/rdbms/lib/config.o

ls: cannot access /grid18c/home/rdbms/lib/config.o: No such file or directory

[grid@RAC1 ~]$ $ORACLE_HOME/bin/relink all

writing relink log to: /grid18c/home/install/relink_2020-08-12_17-16-05PM.log

[grid@RAC1 ~]$ ls -l /grid18c/home/rdbms/lib/config.o

-rw-r–r– 1 grid oinstall 1352 Aug 12 17:16 /grid18c/home/rdbms/lib/config.o

دستور relink را در نود دوم هم اجرا می کنیم:

–Node 1:

[root@RAC2 ~]# su – grid

 [grid@RAC2 ~]$ $ORACLE_HOME/bin/relink all

writing relink log to: /grid18c/home/install/relink_2020-08-12_17-16-31PM.log

 

مرحله 4: دو اسکریپت rootadd_rdbms.sh و rootcrs.sh –lock را در هر دو نود اجرا می کنیم(از طریق کاربر root):

–Node 1:

[root@RAC1 ~]# /grid18c/home/rdbms/install/rootadd_rdbms.sh

[root@RAC1 ~]# /grid18c/home/crs/install/rootcrs.sh -lock

Using configuration parameter file: /grid18c/home/crs/install/crsconfig_params

The log of current session can be found at:

  /grid18c/base/crsdata/RAC1/crsconfig/crslock_RAC1_2020-08-12_05-28-33PM.log

2020/08/12 17:28:36 CLSRSC-329: Replacing Clusterware entries in file ‘oracle-ohasd.service’

 

–Node 2:

[root@RAC2 ~]# /grid18c/home/rdbms/install/rootadd_rdbms.sh

[root@RAC2 ~]# /grid18c/home/crs/install/rootcrs.sh -lock

Using configuration parameter file: /grid18c/home/crs/install/crsconfig_params

The log of current session can be found at:

  /grid18c/base/crsdata/RAC2/crsconfig/crslock_RAC2_2020-08-12_05-28-40PM.log

2020/08/12 17:28:43 CLSRSC-329: Replacing Clusterware entries in file ‘oracle-ohasd.service’

 

مرحله 5: در پایان crs را در هر دو نود استارت می کنیم:

–Node 1:

[root@RAC1 ~]# /grid18c/home/bin/crsctl start crs

CRS-4123: Oracle High Availability Services has been started.

 

–Node 2:

[root@RAC2 ~]# /grid18c/home/bin/crsctl start crs

CRS-4123: Oracle High Availability Services has been started.

 

 

ارتباط با نویسنده مطلب:vahidusefzadeh@ کانال تخصصی اوراکل و لینوکس: OracleDB@

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد.