一.检查虚拟机的相关配置:
[root@rac1 ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:E3:7D:59
inet addr:10.1.1.210 Bcast:10.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fee3:7d59/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7957 errors:0 dropped:0 overruns:0 frame:0
TX packets:1314 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:615293 (600.8 KiB) TX bytes:103970 (101.5 KiB)
Interrupt:10 Base address:0x1480
[root@rac1 ~]# ping 10.1.1.1
PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=58.8 ms
--- 10.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 58.860/58.860/58.860/0.000 ms
[root@rac1 ~]# rpm -qa |grep oracleasm
oracleasmlib-2.0.3-1.el5
oracleasm-2.6.18-128.el5-2.0.5-1.el5
oracleasm-2.6.18-128.el5debug-2.0.5-1.el5
oracleasm-support-2.1.2-1.el5
oracleasm-2.6.18-128.el5PAE-2.0.5-1.el5
oracleasm-2.6.18-128.el5xen-2.0.5-1.el5
[root@rac1 ~]# fdisk -l
Disk /dev/sda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 765 6144831 83 Linux
/dev/sda2 766 956 1534207+ 82 Linux swap / Solaris
/dev/sda3 957 1566 4899825 83 Linux
Disk /dev/sdb: 536 MB, 536870912 bytes
64 heads, 32 sectors/track, 512 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 512 524272 83 Linux
Disk /dev/sdc: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 391 3140676 83 Linux
Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 391 3140676 83 Linux
Disk /dev/sde: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sde1 1 261 2096451 83 Linux
[root@rac1 ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda1 5.7G 3.0G 2.5G 55% /
/dev/sda3 4.6G 138M 4.2G 4% /u01
tmpfs 349M 0 349M 0% /dev/shm
[root@rac1 ~]#
二.上传database安装介质
安装软件不建库
more ~/.bash_profile
PATH=$PATH:$HOME/bin
export PS1="`/bin/hostname -s`->"
export EDITOR=vim
export ORACLE_SID=up
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/b
in:/usr/X11R6/bin
umask 022
rac1->cd admin
rac1->mkdir +ASM
rac1->cd +ASM
rac1->mkdir {a,b,c,u}dump
rac1->ll
总计 16
drwxr-xr-x 2 oracle oinstall 4096 08-12 18:33 adump
drwxr-xr-x 2 oracle oinstall 4096 08-12 18:33 bdump
drwxr-xr-x 2 oracle oinstall 4096 08-12 18:33 cdump
drwxr-xr-x 2 oracle oinstall 4096 08-12 18:33 udump
rac1->pwd
/u01/app/oracle/admin/+ASM
$ORACLE_HOME/dbs
$ vi init+ASM.ora
*.asm_diskstring='ORCL:VOL*'
*.background_dump_dest='/u01/app/oracle/admin/+ASM/bdump'
*.core_dump_dest='/u01/app/oracle/admin/+ASM/cdump'
*.user_dump_dest='/u01/app/oracle/admin/+ASM/udump'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='SHARED'
rac1->orapwd file=orapw+ASM password=oracle
rac1->export ORACLE_SID=+ASM
rac1->sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 12 18:39:43 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORA-29701: unable to connect to Cluster Manager
[root@rac1 ~]# cd /u01/app/oracle/product/10.2.0/db_1/bin
[root@rac1 bin]# ./localconfig delete
/etc/oracle does not exist. Creating it now.
./localconfig: line 715: /etc/init.d/init.cssd: 没有那个文件或目录
[root@rac1 bin]# ./localconfig add
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized
Adding to inittab
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
rac1->sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Aug 12 18:43:52 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ASM instance started
Total System Global Area 83886080 bytes
Fixed Size 1217836 bytes
Variable Size 57502420 bytes
ASM Cache 25165824 bytes
SQL> create spfile from pfile;
File created.
SQL> startup force
ASM instance started
Total System Global Area 83886080 bytes
Fixed Size 1217836 bytes
Variable Size 57502420 bytes
ASM Cache 25165824 bytes
ORA-15110: no diskgroups mounted
[root@rac1 soft]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
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
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@rac1 soft]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
Marking disk "VOL1" as an ASM disk: [ OK ]
[root@rac1 soft]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdd1
Marking disk "VOL2" as an ASM disk: [ OK ]
[root@rac1 soft]# /etc/init.d/oracleasm createdisk VOL3 /dev/sde1
Marking disk "VOL3" as an ASM disk: [ OK ]
[root@rac1 soft]# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
SQL> create diskgroup dg1 external redundancy disk 'ORCL:VOL1';
SQL> select NAME,TYPE,STATE from v$asm_diskgroup;
NAME TYPE STATE
------------------------------ ------ -----------
DG1 EXTERN MOUNTED
如果上述命令返回的 state是 DISMOUNTED,那么我们需要手工将挂载 diskgroup
SQL> ALTER DISKGROUP dgroup1 MOUNT;
Diskgroup altered.
SQL> show parameter asm_diskgroups
NAME TYPE VALUE
------------------------------------ ---------- ------------------------------
asm_diskgroups string DGROUP1
三、创建ASM数据库
接下来,创建ASM数据库的工作就非常的简单了。执行dbca实用程序,在第六步“storage options”部分选择“Automatic Storage Management ”,在接下来的“ASM Disk Groups”步骤中,选择之前创建的“DGROUP1”,再按照普通建库的方式完成数据库的创建就OK了。
[root@rac1 soft]# /etc/init.d/oracleasm createdisk VOL4 /dev/sdb1
Marking disk "VOL4" as an ASM disk: [ OK ]
SQL> alter diskgroup dg2 add disk 'ORCL:VOL4';
Diskgroup altered.
SQL> select NAME,TOTAL_MB,STATE from v$asm_diskgroup;
NAME TOTAL_MB STATE
------------------------------ ---------- -----------
DG1 3067 MOUNTED
DG2 5625 MOUNTED
监听状态:
rac1->lsnrctl stat
Service "+ASM" has 1 instance(s).
Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "up" has 1 instance(s).
Instance "up", status READY, has 1 handler(s) for this service...
Service "upXDB" has 1 instance(s).
Instance "up", status READY, has 1 handler(s) for this service...
Service "up_XPT" has 1 instance(s).
Instance "up", status READY, has 1 handler(s) for this service...
The command completed successfully
关闭asm实例,数据库也会自动关闭:
需要先停止数据库实例:
export ORACLE_SID=orcl
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
export ORACLE_SID=+ASM
SQL> shutdown normal
ASM diskgroups dismounted
ASM instance shutdown
SQL> ho lsnrctl stat
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-AUG-2010 21:39:06
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 12-AUG-2010 21:27:19
Uptime 0 days 0 hr. 11 min. 47 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.mycorpdomain.com)(PORT=1521)))
The listener supports no services
The command completed successfully
启动asm实例后,数据库需要再次启动
SQL> STARTUP
ASM instance started
Total System Global Area 83886080 bytes
Fixed Size 1217836 bytes
Variable Size 57502420 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> ho lsnrctl stat
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 12-AUG-2010 21:40:21
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 12-AUG-2010 21:27:19
Uptime 0 days 0 hr. 13 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac1.mycorpdomain.com)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).ol4;
Instance "+ASM", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
《Dropping Disk Groups》
SQL> alter diskgroup dg2 add disk 'ORCL:VOL4';
SQL> alter diskgroup dg2 drop disk vol4;
SQL> create diskgroup dg3 eXternal redundancy disk 'ORCL:VOL4';
SQL> drop diskgroup dg3;
《Create controlfile》
CREATE CONTROLFILE REUSE DATABASE "SAMPLE" NORESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 2
MAXDATAFILES 30
MAXINSTANCES 1
MAXLOGHISTORY 226
LOGFILE
GROUP 1 (
'+DGROUP1/db/onlinelog/group_1.258.541956457',
'+DGROUP2/db/onlinelog/group_1.256.541956473'
) SIZE 100M,
GROUP 2 (
'+DGROUP1/db/onlinelog/group_2.257.541956477',
'+DGROUP2/db/onlinelog/group_2.258.541956487'
) SIZE 100M
DATAFILE
'+DGROUP1/db/datafile/system.260.541956497',
'+DGROUP1/db/datafile/sysaux.259.541956511'
CHARACTER SET US7ASCII
;
《Adding New Redo Log Files》
DB_CREATE_ONLINE_LOG_DEST_1 = '+dgroup1'
DB_CREATE_ONLINE_LOG_DEST_2 = '+dgroup2'
ALTER DATABASE ADD LOGFILE;
eg:
SQL> alter system set db_create_online_log_dest_1='+DG1';
System altered.
SQL> alter system set db_create_online_log_dest_2='+DG2';
System altered.
SQL> ALTER database add logfile;
Database altered.
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
+DG2/up/onlinelog/group_3.263.726866059
+DG1/up/onlinelog/group_3.259.726866065
+DG2/up/onlinelog/group_2.262.726866045
+DG1/up/onlinelog/group_2.258.726866055
+DG2/up/onlinelog/group_1.261.726866037
+DG1/up/onlinelog/group_1.257.726866041
+DG1/up/onlinelog/group_4.260.726875773
+DG2/up/onlinelog/group_4.266.726875777
8 rows selected.
SQL> ALTER database add logfile;
Database altered.
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
+DG2/up/onlinelog/group_3.263.726866059
+DG1/up/onlinelog/group_3.259.726866065
+DG2/up/onlinelog/group_2.262.726866045
+DG1/up/onlinelog/group_2.258.726866055
+DG2/up/onlinelog/group_1.261.726866037
+DG1/up/onlinelog/group_1.257.726866041
+DG1/up/onlinelog/group_4.260.726875773
+DG2/up/onlinelog/group_4.266.726875777
+DG1/up/onlinelog/group_5.261.726875799
+DG2/up/onlinelog/group_5.267.726875803
10 rows selected.
《Creating a Tablespace in ASM》
SQL> ALTER SYSTEM SET DB_CREATE_FILE_DEST = '+dgroup1(my_template)';
SQL> CREATE TABLESPACE tspace3;
SQL> create tablespace tb1 datafile size 20m;
《asmcmd》
rac1->asmcmd
ASMCMD> ls
DG1/
DG2/
ASMCMD> cd +DG1
ASMCMD> ls
UP/
ASMCMD> cd UP
ASMCMD> ls
CONTROLFILE/
ONLINELOG/
ASMCMD> mkdir mydir
ASMCMD> ls
CONTROLFILE/
ONLINELOG/
mydir/
ASMCMD> cd mydir
ASMCMD> ls
ASMCMD> pwd
+DG1/UP/mydir
ASMCMD> cd ..
ASMCMD> ls
CONTROLFILE/
ONLINELOG/
mydir/
ASMCMD> rm mydir
ASMCMD> ls
CONTROLFILE/
ONLINELOG/
ASMCMD> du
Used_MB Mirror_used_MB
1192 2391
ASMCMD> find +dg2 undo*
+dg2/UP/DATAFILE/UNDOTBS1.258.726865825
ASMCMD> find +dg2 spfi
ASMCMD> find +dg2 spfil*
+dg2/UP/PARAMETERFILE/spfile.265.726866225
+dg2/UP/spfileup.ora
- ASM安装总结.zip (9.7 KB)
- 下载次数: 2
相关推荐
在安装Oracle ASM之前,必须先安装两个关键的系统包:`oracleasmlib` 和 `oracleasm-support`。这些包主要用于在Linux操作系统上支持Oracle ASM的运行。 `oracleasmlib` 是Oracle公司提供的一个库,它允许ASM直接...
安装和配置Oracle ASMLib和Kmod-OracleASM的过程通常涉及以下步骤: 1. 安装必要的包:使用`yum install`命令安装`oracleasm-support`和`kmod-oracleasm`。 2. 初始化OracleASM:运行`oracleasm initialize`命令来...
本文档将详细介绍如何在Oracle ASM环境下安全有效地进行磁盘添加操作,包括磁盘初始化、权限设置、磁盘组创建与配置、磁盘添加等关键步骤,并提供一些实用的经验分享。 #### 二、磁盘初始化 在进行任何磁盘操作之前...
Oracle ASM (Automatic Storage Management) 是 Oracle 公司推出的一种集成化的存储...不同版本的kmod-oracleasm可能带来性能优化、新特性或兼容性提升,安装和管理这些模块是部署和维护Oracle ASM环境的关键步骤之一。
Oracleasmlib 和 Oracleasm-support 是与 Oracle ASM 相关的重要组件。 Oracleasmlib 是一个用于Linux系统的库,它为 Oracle ASM 提供了一个接口,使得操作系统能够识别和管理ASM磁盘。通过Oracleasmlib,系统可以...
1. 安装kmod-oracleasm:首先,需要将该模块安装到系统中,这通常通过执行`yum install kmod-oracleasm`或`rpm -ivh kmod-oracleasm-2.0.6.rh1-3.el6.x86_64.rpm`来完成。确保系统有权限访问Oracle的yum仓库。 2. ...
压缩包子文件的文件名称列表提供了两个不同版本的kmod-oracleasm rpm包:"kmod-oracleasm-2.0.8-4.el6_6.x86_64.rpm" 和 "kmod-oracleasm-2.0.6.rh1-3.el6.x86_64.rpm"。这些文件可能代表了ASM驱动的不同更新,其中...
在Oracle ASM环境中,Oracle ASMLib (Automatic Storage Management Library) 和 oracleasm-support 包扮演着关键角色。 Oracle ASMLib 是一个专为Oracle ASM设计的设备驱动程序库,它允许ASM直接访问磁盘设备,而...
kmod-oracleasm 是一个专门为CentOS操作系统编译的内核模块,它允许操作系统与Oracle ASM进行交互,是Oracle RAC (Real Application Clusters) 在Linux环境下运行的必备组件之一。 在Oracle RAC部署中,Oracle ASM...
1. `oracleasm-support-2.1.8-1.el6.x86_64.rpm`:这个包提供了Oracle ASM的支持库,它包含了必要的工具和驱动,使得Linux内核能够识别和操作ASM卷。安装这个包是启用ASM功能的第一步,它包含了一些系统服务和命令行...
1. **oracleasm-support-2.1.7-1.SLE11.x86_64.rpm**:这是Oracle ASM的支持包,包含了ASM所需的系统工具和服务。它可能包括了ASM的诊断工具、配置助手以及与操作系统的接口,确保ASM能正确地在SUSE Linux ...
kmod-oracleasm是Oracle ASM在Linux操作系统上的内核模块,它允许系统识别并支持ASM磁盘组。这个压缩包"**kmod-oracleasm-2.0.6.rh1-2.el6.x86_64.rar**"包含了适用于Red Hat Enterprise Linux 6.4系统的Oracle ASM...
kmod-oracleasm是Oracle ASM的内核模块,确保ASM在操作系统层面的兼容性和性能。 "Oracleasm" 和 "asmlib" 都是Oracle ASM相关的组件。Oracleasm是ASM的用户空间工具集,用于与ASM内核模块交互,进行磁盘的扫描、...
1. **oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm**:这是Oracle ASM的内核模块,它负责在Linux操作系统中与ASM进行交互。该模块提供了对ASM磁盘组的识别和管理,使得ASM能够直接操作物理磁盘,创建、扩展和删除...
`/etc/init.d/oracleasm configure` 是其中的关键一步,用于配置Oracle ASM初始化服务。 首先,让我们了解Oracle ASM的核心功能。ASM为Oracle数据库提供了集成的磁盘管理解决方案,它能够自动管理磁盘空间,包括...
本文将详细介绍如何在不使用 OracleASM 包的情况下配置 ASM 磁盘。 #### 目标 本文的目标是帮助读者理解并掌握一种不依赖 OracleASM 包的手动配置 ASM 磁盘的方法,特别关注使用 udev 配置规则来确保 ASM 磁盘的...
标题"oracleasm软件包大集合"指的是这个压缩包中包含了用于安装和配置Oracle ASM的各种软件包,适用于不同的Red Hat Linux版本。在部署Oracle 11g RAC时,这些软件包将确保ASM功能在集群环境中正常工作,支持多个...
需要注意的是,在安装过程中可能会出现警告,例如关于数字签名的问题(`oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, keyID 1e5e0159`)。尽管如此,这些警告通常不会阻止安装...