افزودن نود جدید در محیط rac

زمانی که یک بانک اطلاعاتی به محیط rac منتقل می شود، ممکن است نتوان از همان ابتدا تعداد نودهای مورد نیاز برای این بانک را  به خوبی تشخیص داد به همین دلیل شاید در آینده لازم باشد تا نودی از نودهای فعلی را حذف کرد تا در هزینه صرفه جویی شود و یا اینکه تعداد نودها را بالا برد تا بتوان از مزایای آن برای سیستم استفاده کرد.

در این مطلب سعی شده تا مراحل افزودن نود در محیط اوراکل 11gR2 بیان شود. در محیط ما دو نود از قبل وجود دارد که قصد داریم نود سومی را هم به آنها اضافه کنیم.

–          در ابتدا نود جدید را آماده می کنیم(تنظیم /etc/hosts، نصب پکیج مورد نیاز نرم افزار اوراکل، شناساندن فضای مشترک نودها و ….) برای مثال:

[root@rac3 ~]# oracleasm configure -i

Configuring the Oracle ASM library driver.

Default user to own the driver interface []: oracle

Default group to own the driver interface []: oinstall

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

[root@rac3 ~]# oracleasm init

[root@rac3 ~]# oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks…

Scanning system for ASM disks…

Instantiating disk “DISK1”

Instantiating disk “DISK2”

 [root@rac3 ~]# oracleasm listdisks

DISK1

DISK2

–          برای اینکه یوزر اوراکل در نود اول، بدون پسورد وارد نود سوم شود تا بتواند اطلاعاتی را بر روی آن قرار دهد باید همانند اوراکل 10g عملیاتی را انجام داد(البته در نصب عادی rac از اوراکل 11gR2 به بعد، این کار توسط gridانجام می شود):

[root@rac3 ~]# su – oracle

[oracle@rac3 ~]$  mkdir ~/.ssh

[oracle@rac3 ~]$ chmod 700 ~/.ssh

[oracle@rac3 ~]$ /usr/bin/ssh-keygen -t rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/home/oracle/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/oracle/.ssh/id_rsa.

Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.

The key fingerprint is:

9f:5b:c6:62:02:0f:2e:62:57:59:df:18:c1:c5:29:ee oracle@rac3.localdomain

 [oracle@rac1 bin]$ cd

[oracle@rac1 ~]$ cd ~/.ssh

[oracle@rac1 .ssh]$ scp authorized_keys rac3:/home/oracle/.ssh/

The authenticity of host ‘rac3 (192.168.56.73)’ can’t be established.

RSA key fingerprint is 8e:02:15:2a:d6:0e:06:75:db:40:35:ff:3a:a4:04:2d.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added ‘rac3,192.168.56.73’ (RSA) to the list of known hosts.

oracle@rac3’s password:

authorized_keys                               100% 1888     1.8KB/s   00:00   

[oracle@rac1 .ssh]$ cd

[oracle@rac1 ~]$ ssh rac3

–          نصب grid بر روی نود جدید با استفاده از نود اول:

[oracle@rac1 bin]$ ./addNode.sh -silent “CLUSTER_NEW_NODES={rac3}”  “CLUSTER_NEW

_VIRTUAL_HOSTNAMES={rac3-vip}”

Starting Oracle Universal Installer…

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

Oracle Universal Installer, Version 11.2.0.1.0 Production

Copyright (C) 1999, 2009, Oracle. All rights reserved.

Performing tests to see whether nodes rac2,rac3 are available

……………………………………………………… 100% Done.

Home copied to new nodes

Saving inventory on nodes (Wednesday, September 16, 2015 11:14:41 AM IRDT)

.                                                               100% Done.

Save inventory complete

WARNING:A new inventory has been created on one or more nodes in this session. However, it has not yet been registered as the central inventory of this system.

To register the new inventory please run the script at ‘/u01/app/oraInventory/orainstRoot.sh’ with root privileges on nodes ‘rac3’.

If you do not register the inventory, you may not be able to update or patch the products you installed.

The following configuration scripts need to be executed as the “root” user in each cluster node.

/u01/app/oraInventory/orainstRoot.sh #On nodes rac3

/u01/app/11.2.0/grid/root.sh #On nodes rac3

To execute the configuration scripts:

  1. Open a terminal window
  2. Log in as “root”
  3. Run the scripts in each cluster node

    The Cluster Node Addition of /u01/app/11.2.0/grid was successful.

Please check ‘/tmp/silentInstall.log’ for more details.

[root@rac3 ~]# /u01/app/oraInventory/orainstRoot.sh

[root@rac3 ~]# /u01/app/11.2.0/grid/root.sh

Running Oracle 11g root.sh script…

2015-09-16 14:23:06: Parsing the host name

2015-09-16 14:23:06: Checking for super user privileges

2015-09-16 14:23:06: User has super user privileges

Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params

LOCAL ADD MODE

Creating OCR keys for user ‘root’, privgrp ‘root’..

Operation successful.

Adding daemon to inittab

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

ohasd is starting

ADVM/ACFS is not supported on oraclelinux-release-6Server-5.0.2.x86_64

CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node rac1, number 1, and is terminating

An active cluster was found during exclusive startup, restarting to join the cluster

CRS-2672: Attempting to start ‘ora.mdnsd’ on ‘rac3’

CRS-2676: Start of ‘ora.mdnsd’ on ‘rac3’ succeeded

CRS-2672: Attempting to start ‘ora.gipcd’ on ‘rac3’

CRS-2676: Start of ‘ora.gipcd’ on ‘rac3’ succeeded

CRS-2672: Attempting to start ‘ora.gpnpd’ on ‘rac3’

CRS-2676: Start of ‘ora.gpnpd’ on ‘rac3’ succeeded

CRS-2672: Attempting to start ‘ora.cssdmonitor’ on ‘rac3’

CRS-2676: Start of ‘ora.cssdmonitor’ on ‘rac3’ succeeded

CRS-2672: Attempting to start ‘ora.cssd’ on ‘rac3’

CRS-2672: Attempting to start ‘ora.diskmon’ on ‘rac3’

CRS-2676: Start of ‘ora.diskmon’ on ‘rac3’ succeeded

CRS-2676: Start of ‘ora.cssd’ on ‘rac3’ succeeded

CRS-2672: Attempting to start ‘ora.ctssd’ on ‘rac3’

CRS-2676: Start of ‘ora.ctssd’ on ‘rac3’ succeeded

CRS-2672: Attempting to start ‘ora.asm’ on ‘rac3’

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

CRS-2672: Attempting to start ‘ora.crsd’ on ‘rac3’

CRS-2676: Start of ‘ora.crsd’ on ‘rac3’ succeeded

CRS-2672: Attempting to start ‘ora.evmd’ on ‘rac3’

CRS-2676: Start of ‘ora.evmd’ on ‘rac3’ succeeded

clscfg: EXISTING configuration version 5 detected.

clscfg: version 5 is 11g Release 2.

Successfully accumulated necessary OCR keys.

Creating OCR keys for user ‘root’, privgrp ‘root’..

Operation successful.

rac3     2015/09/16 11:52:36     /u01/app/11.2.0/grid/cdata/rac3/backup_20150916_115236.olr

Preparing packages for installation…

cvuqdisk-1.0.7-1

Configure Oracle Grid Infrastructure for a Cluster … succeeded

Updating inventory properties for clusterware

Starting Oracle Universal Installer…

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

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

The inventory is located at /u01/app/oraInventory

‘UpdateNodeList’ was successful.

–          نصب از راه دور نرم افزار اوراکل بر روی نود جدید با استفاده از نود اول:

[oracle@rac1 bin]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/oui/bin/

 [oracle@rac1 bin]$ ./addNode.sh -silent “CLUSTER_NEW_NODES={rac3}”

Starting Oracle Universal Installer…

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

Oracle Universal Installer, Version 11.2.0.1.0 Production

Copyright (C) 1999, 2009, Oracle. All rights reserved.

Performing tests to see whether nodes rac2,rac3 are available

……………………………………………………… 100% Done.

Instantiation of add node scripts complete

Copying to remote nodes (Wednesday, September 16, 2015 11:57:24 AM IRDT)

…………………………………………………………………………………..

Save inventory complete

WARNING:A new inventory has been created on one or more nodes in this session. However, it has not yet been registered as the central inventory of this system.

To register the new inventory please run the script at ‘/u01/app/oraInventory/orainstRoot.sh’ with root privileges on nodes ‘rac3’.

If you do not register the inventory, you may not be able to update or patch the products you installed.

The following configuration scripts need to be executed as the “root” user in each cluster node.

/u01/app/oraInventory/orainstRoot.sh #On nodes rac3

/u01/app/oracle/product/11.2.0/dbhome_1/root.sh #On nodes rac3

To execute the configuration scripts:

  1. Open a terminal window
  2. Log in as “root”
  3. Run the scripts in each cluster node

The Cluster Node Addition of /u01/app/oracle/product/11.2.0/dbhome_1 was successful.

–          در انتها باید برای استارت بانک در نود جدید، تغییرات زیر را در بانک اعمال کرد:

SQL>  ALTER DATABASE ADD LOGFILE THREAD 3 group 5 size 50m ;

Database altered.

SQL> ALTER DATABASE ADD LOGFILE THREAD 3 group 6 size 50m ;

Database altered.

SQL>  create undo tablespace UNDOTBS3 datafile size 5m;

Tablespace created.

SQL>  alter database enable public thread 3;

Database altered.

همچنین باید اسم undotbs ساخته شده برای نود جدید، شماره و اسم instance و نیز تعداد نودهای کلاستر در پارامترهای نود جدید به خوبی تنظیم شود.

rac3.instance_number=3

rac3.instance_name=rac3

rac3.undo_tablespace= UNDOTBS3

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

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

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