Oracle 11g RAC安装与配置for Linux(9)

2020-02-20 15:11

Number 1 2 * 实例数 2 1 1 分区大小 (MB) 逻辑卷名与用途 120 120 110 250 5 USERS表空间: dbname_raw_120m 每实例6个在线日志文件:dbname_redon_m_raw_120m 控制文件: dbname_control[1|2]_raw_110m TEMP表空间: dbname_temp_raw_250m 服务器参数文件(SPFILE): dbname_spfile_raw_5m

Raw Logical Volumes for Oracle Cluster Ready Services (CRS) 1 100 Oracle Cluster Registry: ora_ocr_raw_100m 注:仅需为群集建立,多个数据库可共享 1 20 Oracle CRS voting disk: ora_vote_raw_20m 导入卷组到其它节点

1. 检查物理卷的PVID

# /usr/sbin/lspv 2. vary off卷组

# /usr/sbin/varyoffvg VGname 3. 导入卷组在每个节点

# /usr/sbin/importvg -y VGname -V MajorNumber PhysicalVolume 4. 配置权限

Oracle Database files:

# chown oracle:dba /dev/rdbname* # chmod 660 /dev/rdbname* Oracle CRS files:

# chown oracle:dba /dev/rora_vote_raw_20m # chmod 660 /dev/rora_vote_raw_20m # chown root:dba /dev/rora_ocr_raw_100m # chmod 640 /dev/rora_ocr_raw_100m 5. 在所有节点上激活卷组为并发模式

# /usr/sbin/varyonvg -c VGname

? 使DBCA能识别每个数据文件对应的RAW设备 ? 设置ORACLE_BASE

Bourne, Bash or Korn shell:

$ ORACLE_BASE=/u01/app/oracle ; export ORACLE_BASE C shell:

$ setenv ORACLE_BASE /u01/app/oracle

? 配置RAW磁盘设备,不使用HP ServiceGuard Extension

? 数据库文件所需RAW设备列表

Number 1 1 Number of instances 1 1 1 Size (MB) 500 Purpose and Sample Alternative Device File Name SYSTEM tablespace: dbname_system_raw_500m 300 + (Number of SYSAUX tablespace: instances * 250) dbname_sysaux_raw_800m 500 UNDOTBSn tablespace (One tablespace for each instance, where n is the number of the instance): dbname_undotbsn_raw_500m TEMP tablespace: dbname_temp_raw_250m EXAMPLE tablespace: dbname_example_raw_160m USERS tablespace: dbname_users_raw_120m Two online redo log files for each instance (where n is the number of the instance and m is the log number, 1 or 2): dbname_redon_m_raw_120m First and second control files: dbname_control{1|2}_raw_110m Server parameter file (SPFILE): dbname_spfile_raw_5m Password file: dbname_pwdfile_raw_5m 250 160 120 2 * number of 120 instances 2 1 1 110 5 5 8. 为ASM配置磁盘

? 识别ASM存储需求

? 决定datafile和recovery file是否使用ASM;

? 选择ASM冗余级别,外部冗余、正常冗余,高度冗余; ? 决定datafile和recovery file所需的全部磁盘空间; Redundancy Level External Normal High Minimum Number of Disks 1 2 3 Datafiles 1.15 GB 2.3 GB 3.45 GB Recovery FIles 2.3 GB 4.6 GB 6.9 GB Both 3.45 GB 6.9 GB 10.35 GB ? 如果安装RAC,那么ASM需要额外的空间存储元数据 15 + (2 * number_of_disks) + (126 * number_of_Automatic_Storage_Management_instances)

? 使用上面的公式计算,单位为MB

? 如果使用新的ASM磁盘组,那么确保

? 出于性能考虑ASM磁盘组中的磁盘应该大小一致

? 出于性能考虑一个单个的物理磁盘不要指定多于一个分区 ? Oracle推荐直接使用物理磁盘

9. 使用已存在的ASM磁盘组

? 可以使用DBCA进行ASM组与磁盘管理;

? 如果使用非交互模式安装那么不能建立新的磁盘组,但是能增加磁盘到已存

在的磁盘组;

? 检查是否存在磁盘组或磁盘组是否有足够的空间

? 检查ASM实例是否在磁盘中配置:more /etc/oratab

例:+ASM1:oracle_home_path

? 连接ASM实例并启动它(如果需要)

? export ORACLE_SID=+asm1

? export ORACLE_HOME=oracle home ? sqlplus /nolog ? conn /as sysdba ? startup

? 查看ASM存在的磁盘组,冗余级别,空间

? SELECT name,type,total_mb,free_mb FROM V$ASM_DISKGROUP; ? 如果需要为磁盘组增加磁盘设备

10. 为ASM配置磁盘

?

? ? ?

确认磁盘可用:/usr/sbin/lsdev –Cc disk 如果磁盘不存在则安装:/usr/sbin/chfmgr 检查磁盘是否已经使用:/usr/sbin/lspv

如果需要的磁盘没有PVID,使用如下命令建立 # /usr/sbin/chdev -l hdiskn -a pv=yes ? 在每个节点改变磁盘权限

? chown oracle:dba /dev/rdsk/cxtydz ? chmod 660 /dev/rdsk/cxtydz 使用asmtool工具 Option -add Description Adds or changes stamps. You must specify the hard disk, partition, and new stamp name. If the disk is a raw device or has an existing Automatic Storage Management stamp, then you must specify the -force option. Example asmtool -add [-force] \\Device\\Harddisk1\\Partition1 ORCLDISKASM0 \\Device\\Harddisk2\\Partition1 ORCLDISKASM2... -addprefix Adds or changes stamps using a common prefix asmtool -addprefix ORCLDISKASM [-force] to generate stamps automatically. The stamps are \\Device\\Harddisk1\\Partition1

Option Description Example generated by concatenating a number with the \\Device\\Harddisk2\\Partition1... prefix specified. If the disk is a raw device or has an existing Automatic Storage Management stamp, then you must specify the -force option. -list List available disks. The stamp, windows device asmtool -list [-force] name, and disk size in megabytes are shown. Some disks may be file systems, and cannot be stamped. If the disk is a raw device or has an existing ASM stamp, then you must specify the -force option. Removes existing stamps from disks. asmtool -delete ORCLDISKASM0 ORCLDISKASM1... -delete 11. 为数据库文件在RAW上配置磁盘

? 标识分区并配置RAW设备,考虑到每个文件必须使用一个磁盘,oracle建议

为每个磁盘分配合适的大小;

Number 1 1 Number of instances Size (MB) 500 Purpose and Sample Alternative Device File Name SYSTEM tablespace: dbname_system_raw_500m 300 + (Number of SYSAUX tablespace: instances * 250) dbname_sysaux_raw_800m 500 UNDOTBSn tablespace (One tablespace for each instance, where n is the number of the instance): dbname_undotbsn_raw_500m TEMP tablespace: dbname_temp_raw_250m EXAMPLE tablespace: dbname_example_raw_160m USERS tablespace: dbname_users_raw_120m Two online redo log files for each instance (where n is the number of the instance and m is the log number, 1 or 2): dbname_redon_m_raw_120m First and second control files: dbname_control{1|2}_raw_110m Server parameter file (SPFILE): dbname_spfile_raw_5m Password file: dbname_pwdfile_raw_5m 1 1 1 250 160 120 2 * number of instances 120 2 1 1 110 5 5 ? 选择RAW选择一个与数据库相关的名字,不能超过4个字符

? ? ? ?

在所有节点上确认磁盘设备被识别:/usr/sbin/lspv 如果磁盘不存在则安装:/usr/sbin/cfgmgr 检查磁盘是否已经使用:/sbin/lspv 在每个节点和每个设备上配置权限 OCR:

# chown root:oinstall /dev/rdsk/cxtydz # chmod 640 /dev/rdsk/cxtydz

Oracle Clusterware voting disk or database files: # chown oracle:dba /dev/rdsk/cxtydz # chmod 660 /dev/rdsk/cxtydz

? 如果数据库文件使用RAW,那么建立RAW设备映射文件

? 设置ORACLE_BASE环境变量: Bourne, Bash, or Korn shell:

$ ORACLE_BASE=/u01/app/oracle ; export ORACLE_BASE C shell:

% setenv ORACLE_BASE /u01/app/oracle ? 在ORACLE_BASE下建立子目录: # mkdir -p $ORACLE_BASE/oradata/dbname

# chown -R oracle:oinstall $ORACLE_BASE/oradata # chmod -R 775 $ORACLE_BASE/oradata

? 使用文本编辑器建立dbname_raw.conf式与要求如下:

database_object_identifier=device_file_name

对RAC数据库至少为每个实例指定一个UNDO标空间数据文件(undotbsn),两个重做日志文件(redon_1,redon_2)

两个控制文件(control1,control2) 例:

system=/dev/rdsk/c2t1d1 sysaux=/dev/rdsk/c2t1d2 example=/dev/rdsk/c2t1d3 users=/dev/rdsk/c2t1d4 temp=/dev/rdsk/c2t1d5 undotbs1=/dev/rdsk/c2t1d6 undotbs2=/dev/rdsk/c2t1d7 redo1_1=/dev/rdsk/c2t1d8 redo1_2=/dev/rdsk/c2t1d9 redo2_1=/dev/rdsk/c2t1d10 redo2_2=/dev/rdsk/c2t1d11 control1=/dev/rdsk/c2t1d12 control2=/dev/rdsk/c2t1d13

spfile=/dev/rdsk/dbname_spfile_raw_5m pwdfile=/dev/rdsk/dbname_pwdfile_raw_5m

? 安装Oracle群集件是必须手工配置OCR和voting disk的磁盘设备 ? 建立RAW设备映射文件


Oracle 11g RAC安装与配置for Linux(9).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:《组织行为学》练习题库参考答案

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: