حذف نود در محیط کلاستر(اوراکل 18c,19c)

در این متن قصد داریم نودی(RAC3) را از یک کلاستر چهار نوده حذف کنیم. خصوصیات کلاستر را در قسمت زیر مشاهده می کنید:

[grid@RAC3 ~]$ srvctl config database -d db18c

Type: RAC

Database instances: db18c1,db18c2,db18c3,db18c4

Configured nodes: RAC2,RAC3,RAC1,RAC4

[oracle@RAC3 ~]$ srvctl status database -d db18c

Instance db18c1 is running on node RAC2

Instance db18c2 is running on node RAC3

Instance db18c3 is running on node RAC1

Instance db18c4 is running on node RAC4

قبل از وارد شدن به مراحل حذف RAC3، مهمترین قدمهای حذف یک نود در محیط کلاستر را مرور می کنیم:

1.متوقف کردن سرویس(database و asm) و حذف آنها در نود مورد نظر

2.حذف نرم افزار اوراکل

3.حذف نرم افزار grid

4.بروزرسانی oraInventory

 

در ادامه با جزییات بیشتری و در طی پنج مرحله عملیات حذف نود را شرح خواهیم داد.

 

مرحله اول: در گام نخست با اتصال به نود اول، instance اجرا شده در نود سوم را حذف می کنیم این کار از طریق دستور DBCA(به صورت گرافیکی و یا silent) قابل انجام است:

[oracle@RAC1 ~]$ dbca -silent -deleteInstance -gdbName db18c -nodeName RAC3 -instanceName db18c2

Prepare for db operation

40% complete

Deleting instance

48% complete

52% complete

56% complete

60% complete

64% complete

68% complete

72% complete

76% complete

80% complete

Completing instance management.

Instance “db18c2” deleted successfully from node “RAC3”.

[oracle@RAC3 ~]$ srvctl status database -d db18c

Instance db18c1 is running on node RAC2

Instance db18c3 is running on node RAC1

Instance db18c4 is running on node RAC4

 

مرحله دوم: در این مرحله، با دستور olsnodes بررسی می کنیم تا نود سوم در وضعیت Unpinned قرار داشته باشد:

[grid@RAC3 ~]$ olsnodes -s -t

RAC2 Active  Unpinned

RAC3 Active  Unpinned

RAC1 Active  Unpinned

RAC4 Active  Unpinned

اگر این نود در وضعیت pinned قرار دارد، با دستور زیر آن را در حالت Unpinned قرار می دهیم:

[root@RAC3 ~]# cd /grid18c/home/bin/

 [root@RAC3 bin]# ./crsctl unpin css -n RAC3

CRS-4667: Node RAC3 successfully unpinned.

 

مرحله سوم: تا این مرحله هنوز سرویسهای مربوط به کلاستر در نود شماره سه(RAC3) در حال اجرا هستند:

[root@RAC3 bin]# ./crsctl status resource -t -n RAC3

 

برای متوقف کردن این resourceها و همچنین حذف آنها در این نود، دستور زیر را از طریق کاربر root اجرا می کنیم:

[root@RAC3 ~]# /grid18c/home/crs/install/rootcrs.sh -deconfig -deinstall -force

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

The log of current session can be found at:

  /grid18c/base/crsdata/RAC3/crsconfig/crsdeconfig_RAC3_2020-08-13_01-22-14PM.log

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

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

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

CRS-2673: Attempting to stop ‘ora.DATA.dg’ on ‘RAC3’

CRS-2677: Stop of ‘ora.DATA.dg’ on ‘RAC3’ succeeded

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

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

CRS-2676: Start of ‘ora.asm’ on ‘RAC4’ succeeded

CRS-2676: Start of ‘ora.OCRR.dg’ on ‘RAC4’ succeeded

CRS-2676: Start of ‘ora.DATA.dg’ on ‘RAC4’ succeeded

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

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

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

CRS-2677: Stop of ‘ora.crf’ on ‘RAC3’ succeeded

CRS-2677: Stop of ‘ora.storage’ on ‘RAC3’ succeeded

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

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

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

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

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

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

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

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

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

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

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

2020/08/13 13:24:49 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node

پس از اجرای این دستور خواهیم دید که Clusterware در این نود اصطلاحا Deconfigure شده است:

[root@RAC3 ~]# cd /grid18c/home/bin/

[root@RAC3 bin]# ./crsctl status resource -t -n RAC3

CRS-4047: No Oracle Clusterware components configured.

CRS-4000: Command Status failed, or completed with errors.

 

مرحله چهارم: در این مرحله قصد داریم همراه با بروزرسانی oraInventory، نرم افزار Grid Infrastructure(مسیر /grid18c/home)را در نود RAC3 حذف کنیم این کار با اجرای دستور  ORACLE_HOME/deinstall/deinstall -local$ انجام می شود:

[grid@RAC3 ~]$  $ORACLE_HOME/oui/bin/runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME CLUSTER_NODES={RAC3}. CRS=TRUE -local

Starting Oracle Universal Installer…

Checking swap space: must be greater than 500 MB.   Actual 32765 MB    Passed

The inventory pointer is located at /etc/oraInst.loc

‘UpdateNodeList’ was successful.

[grid@RAC3 ~]$ $ORACLE_HOME/deinstall/deinstall -local

Checking for existence of the Oracle home location /grid18c/home

Oracle Base selected for deinstall is: /grid18c/base

Checking for existence of central inventory location /grid18c/oraInventory

Checking for existence of the Oracle Grid Infrastructure home

## [END] Install check configuration ##

Network Configuration check config START

Specify all Oracle Restart enabled listeners that are to be de-configured. Enter .(dot) to deselect all. [ASMNET1LSNR_ASM,LISTENER,LISTENER_SCAN1]:.

ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y

Automatic Storage Management (ASM) instance is detected in this Oracle home /grid18c/home.

ASM Diagnostic Destination : /grid18c/base

ASM Diskgroups :

ASM diskstring : /dev/oracleasm/disks/*

Diskgroups will not be dropped

 If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify by entering ‘y’. Do you  want to modify above information (y|n) [n]: y

Database Check Configuration START

Database Check Configuration END

Oracle Grid Infrastructure Home is:

Oracle Home selected for deinstall is: /grid18c/home

Inventory Location where the Oracle home registered is: /grid18c/oraInventory

ASM instance will be de-configured from this Oracle home

Do you want to continue (y – yes, n – no)? [n]: y

ASM Clean Configuration START

ASM Clean Configuration END

De-configuring Listener configuration file…

Listener configuration file de-configured successfully.

De-configuring Naming Methods configuration file…

Naming Methods configuration file de-configured successfully.

De-configuring backup files…

Network Configuration clean config END

ASM instance was de-configured successfully from the Oracle home

Oracle Restart is stopped and de-configured successfully.

Any error messages from this session will be written to: ‘/grid18c/oraInventory/logs/deinstall_deconfig2020-08-13_01-31-41-PM.err’

## [START] Preparing for Deinstall ##

Setting LOCAL_NODE to RAC3

Setting CRS_HOME to false

Setting oracle.installer.local to true

## [END] Preparing for Deinstall ##

Setting the force flag to false

Setting the force flag to cleanup the Oracle Base

Oracle Universal Installer clean START

Detach Oracle home ‘/grid18c/home’ from the central inventory on the local node : Done

Delete directory ‘/grid18c/home’ on the local node : Done

The Oracle Base directory ‘/grid18c/base’ will not be removed on local node. The directory is not empty. User needs to manually cleanup this directory.

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END

Successfully detached Oracle home ‘/grid18c/home’ from the central inventory on the local node.

Successfully deleted directory ‘/grid18c/home’ on the local node.

Oracle Universal Installer cleanup was successful.

Review the permissions and contents of ‘/grid18c/base’ on nodes(s) ‘RAC3’.

If there are no Oracle home(s) associated with ‘/grid18c/base’, manually delete ‘/grid18c/base’ and its contents.

Oracle deinstall tool successfully cleaned up temporary directories.

############# ORACLE DEINSTALL TOOL END #############

پس از اجرای دستور فوق، grid18c/home/ هم حذف خواهد شد:

[grid@RAC3 ~]$ cd /grid18c/home

-bash: cd: /grid18c/home: No such file or directory

البته grid18c/base/ باید به صورت دستی حذف شود.

[root@RAC3 bin]# rm -rf /grid18c/base

 

مرحله پنجم: به عنوان گام پایانی قصد داریم اثراتی که از این نود در بقیه نودها برجای مانده است را از بین ببریم همانطور که دستور زیر نشان می دهد، RAC3 هنوز در نودهای دیگر شناخته شده هست البته وضعیت ان از Active به Inactive تغییر کرده است:

[grid@RAC1 ~]$ olsnodes -s -t

RAC2 Active  Unpinned

RAC3 Inactive        Unpinned

RAC1 Active  Unpinned

RAC4 Active  Unpinned

با دستور زیر، نود شماره سه را از تمامی نودهای دیگر حذف می کنیم:

[root@RAC1 ~]# /grid18c/home/bin/crsctl delete node -n RAC3

CRS-4661: Node RAC3 successfully deleted.

[root@RAC1 ~]# su – grid

[grid@RAC1 ~]$ olsnodes -s -t

RAC2 Active  Unpinned

RAC1 Active  Unpinned

RAC4 Active  Unpinned

 

[grid@RAC2 ~]$  olsnodes -s -t

RAC2 Active  Unpinned

RAC1 Active  Unpinned

RAC4 Active  Unpinned

در انتها با اجرای دستور زیر، از درستی عملیات حذف نود از کلاستر مطمئن خواهیم شد:

[grid@RAC4 ~]$  cluvfy stage -post nodedel -n RAC3

Verifying Node Removal …

  Verifying CRS Integrity …PASSED

  Verifying Clusterware Version Consistency …PASSED

Verifying Node Removal …PASSED

Post-check for node removal was successful.

CVU operation performed:      stage -post nodedel

Date:                         Aug 13, 2020 1:53:52 PM

CVU home:                     /grid18c/home/

User:                         grid

ارائه خدمات مشاوره ، پشتیبانی و نصب و راه اندازی پایگاه داده اوراکل در سراسر کشور...................... تلفن: 09128110897 ایمیل:vahidusefzadeh@gmail.com

Comment (1)

پاسخ دادن به مرتضی لغو پاسخ

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *