主机环境基本上和前面文章中描述的SOLARIS10安装Oracle1106rac的环境基本完全一致,最主要的区别在于没有了VOLUMN CLUSTER MANAGER,于是这里打算使用Oracle的ASM。由于安装操作没有什么区别,所以这次安装选择了SILENT静默模式来安装RAC。
描述SILENT模式下ASM实例的创建。
Solaris10下Silent模式安装Oracle1106RAC环境(一):http://yangtingkun.itpub.net/post/468/477442
Solaris10下Silent模式安装Oracle1106RAC环境(二):http://yangtingkun.itpub.net/post/468/477443
Solaris10下Silent模式安装Oracle1106RAC环境(三):http://yangtingkun.itpub.net/post/468/477444
Solaris10下Silent模式安装Oracle1106RAC环境(四):http://yangtingkun.itpub.net/post/468/477446
Solaris10下Silent模式安装Oracle1106RAC环境(五):http://yangtingkun.itpub.net/post/468/477447
Oracle的软件安装完成后,就可以创建ASM实例了。
首先仍然是编辑RESPONSE文件,这次可以利用dbca.rsp作为模板进行修改,编辑一个my_asm.rsp文件,输入下面的参数:
[GENERAL]
RESPONSEFILE_VERSION = "11.1.0"
OPERATION_TYPE = "configureASM"
[CONFIGUREASM]
DISKLIST="/dev/rdsk/emcpower0g"
NODELIST=ser1,ser2
DISKGROUPNAME=DATA
REDUNDANCY=EXTERNAL
ASM_SYS_PASSWORD="asm"
对一些参数进行简单的说明:
DISKLIST设置ASM磁盘组可以使用的裸设备磁盘,由于当前只分配了一个大的裸设备,所以这里只设置了一个裸设备,如果设置多个裸设备,使用逗号将裸设备名称分割开。
NODELIST设置RAC的节点列表。
DISKGROUPNAME设置ASM磁盘组的名称,这里使用了默认磁盘组名称DATA。当ASM磁盘组创建成功后,Oracle中访问ASM磁盘组的方式为+DATA。
REDUNDANCY设置ASM的冗余策略。由于裸设备来自存储设备,本身已经进行了RAID,这里选择外部方式EXTERNAL。
ASM_SYS_PASSWORD设置ASM顺利的SYS用户密码。
需要额外注意NODELIST参数,这里不要在节点参数两边添加双引号或大括弧,这会导致Oracle检测节点名称时出现错误:
Failed to retrieve network listener resources required for the Real Application Clusters high availability extensions configurations
on the following nodes: [{"ser1", "ser2"}].
Do you want listeners on port 1521 with prefix LISTENER to be created on nodes [{"ser1", "ser2"}] automatically? If you would like
to configure the listener with different properties, run NetCA before continuing.
Listener creation failed with error: Failed to create a profile for listener "[LISTENER_{"SER1"]" on node "{"ser1"", "PRKC-1056 : Fa
iled to get the hostname for node {"ser1"
PRKH-1001 : HASContext Internal Error
[OCR Error(Native: getHostName:[21])]"..
It is strongly recommended to run NetCA to configure listeners before continuing. Do you want to continue with the operation?
The operation will be stopped. Re-run DBCA after successfully running NetCA.
这里直接输入ser1,ser2即可。
$ dbca -silent -responseFile /data/database/response/my_asm.rsp
Look at the log file "/data/oracle/cfgtoollogs/dbca/silent3.log" for further details.
$ more /data/oracle/cfgtoollogs/dbca/silent3.log
对应的日志没有额外的信息,说明ASM配置成功了,dbca的输出相比oui来说,人性化要差一些,不直接显示是否安装成功,而是让你自己去检查输出日志。
下面登陆ASM实例进行查看:
$ ps -ef|grep asm
oracle 7477 1 0 15:45:46 ? 0:06 asm_dia0_+ASM1
oracle 7483 1 0 15:45:47 ? 0:03 asm_lms0_+ASM1
oracle 7493 1 0 15:45:47 ? 0:00 asm_ckpt_+ASM1
oracle 7491 1 0 15:45:47 ? 0:00 asm_lgwr_+ASM1
oracle 7487 1 0 15:45:47 ? 0:00 asm_mman_+ASM1
oracle 7465 1 0 15:45:46 ? 0:02 asm_vktm_+ASM1
oracle 7469 1 0 15:45:46 ? 0:01 asm_diag_+ASM1
oracle 7481 1 0 15:45:47 ? 0:03 asm_lmd0_+ASM1
oracle 7463 1 0 15:45:46 ? 0:01 asm_pmon_+ASM1
oracle 7489 1 0 15:45:47 ? 0:00 asm_dbw0_+ASM1
oracle 7471 1 0 15:45:46 ? 0:00 asm_ping_+ASM1
oracle 7503 1 0 15:45:47 ? 0:00 asm_smon_+ASM1
oracle 7479 1 0 15:45:46 ? 0:02 asm_lmon_+ASM1
oracle 7507 1 0 15:45:47 ? 0:00 asm_gmon_+ASM1
oracle 7473 1 0 15:45:46 ? 0:00 asm_psp0_+ASM1
oracle 7505 1 0 15:45:47 ? 0:01 asm_rbal_+ASM1
oracle 7514 1 0 15:45:47 ? 0:00 asm_lck0_+ASM1
oracle 7635 1 0 15:45:56 ? 0:01 /data/oracle/product/11.1/database/bin/racgimon daemon ora.ser1.ASM1.asm
oracle 9007 24235 0 16:32:59 pts/1 0:00 grep asm
oracle 8601 1 0 16:32:19 ? 0:00 asm_pz98_+ASM1
oracle 8208 1 0 16:31:50 ? 0:00 asm_pz99_+ASM1
$ bash
bash-3.00$ export ORACLE_SID=+ASM1
bash-3.00$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.1.0.6.0 - Production on 星期二 9月 2 16:33:16 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> set pages 100 lines 120
SQL> select group_number, name, state, type, total_mb, free_mb from v$asm_diskgroup;
GROUP_NUMBER NAME STATE TYPE TOTAL_MB FREE_MB
------------ ------------------- ------------------- ------------ ---------- ----------
1 DATA MOUNTED EXTERN 963503 963402
SQL> select group_number, disk_number, mount_status, header_status, mode_status, path
2 from v$asm_disk;
GROUP_NUMBER DISK_NUMBER MOUNT_STATUS HEADER_STATUS MODE_STATUS PATH
------------ ----------- -------------- ----------------- ------------ -----------------
0 0 CLOSED CANDIDATE ONLINE /dev/rdsk/emcpower0b
0 1 CLOSED FOREIGN ONLINE /dev/rdsk/emcpower0e
1 0 CACHED MEMBER ONLINE /dev/rdsk/emcpower0g
在节点2检查ASM的配置情况:
$ ps -ef|grep asm
oracle 23504 1 0 15:47:11 ? 0:01 asm_pmon_+ASM2
oracle 23506 1 0 15:47:11 ? 0:03 asm_vktm_+ASM2
oracle 23510 1 0 15:47:11 ? 0:02 asm_diag_+ASM2
oracle 23514 1 0 15:47:12 ? 0:00 asm_psp0_+ASM2
oracle 23520 1 0 15:47:12 ? 0:03 asm_lmon_+ASM2
oracle 23512 1 0 15:47:11 ? 0:00 asm_ping_+ASM2
oracle 23598 1 0 15:47:17 ? 0:01 /data/oracle/product/11.1/database/bin/racgimon daemon ora.ser2.ASM2.asm
oracle 103 18054 0 16:42:55 pts/1 0:00 grep asm
oracle 23532 1 0 15:47:12 ? 0:00 asm_lgwr_+ASM2
oracle 23522 1 0 15:47:12 ? 0:03 asm_lmd0_+ASM2
oracle 23524 1 0 15:47:12 ? 0:04 asm_lms0_+ASM2
oracle 23518 1 0 15:47:12 ? 0:06 asm_dia0_+ASM2
oracle 23528 1 0 15:47:12 ? 0:00 asm_mman_+ASM2
oracle 23530 1 0 15:47:12 ? 0:00 asm_dbw0_+ASM2
oracle 23534 1 0 15:47:12 ? 0:00 asm_ckpt_+ASM2
oracle 23536 1 0 15:47:12 ? 0:00 asm_smon_+ASM2
oracle 23538 1 0 15:47:12 ? 0:01 asm_rbal_+ASM2
oracle 23540 1 0 15:47:12 ? 0:00 asm_gmon_+ASM2
oracle 23555 1 0 15:47:13 ? 0:00 asm_lck0_+ASM2
$ bash
bash-3.00$ export ORACLE_SID=+ASM2
bash-3.00$ sqlplus "/ as sysdba"
SQL*Plus: Release 11.1.0.6.0 - Production on 星期二 9月 2 16:43:45 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> set pages 100 lines 120
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for Solaris: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
SQL> select instance_name from v$instance;
INSTANCE_NAME
--------------------------------
+ASM2
至此,ASM的SILENT配置完成。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4227/viewspace-544612/ ,如需转载,请注明出处,否则将追究法律责任。