Chinaunix首页 | 论坛 | 博客
  • 博客访问: 104579595
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Oracle

2008-04-30 15:17:23

oracle asm store install note

PHS防clone系统终于要提供给用户用了。局方帮了一个很老的PC server来做测试数据库,只有两块80G硬盘,而且 SA告诉我做的RAID1,并且装好数据库软件。我想了一下,还是装一个ASM实例吧。
ASM是Oracle推荐提供用于管理存储的方案,优于文件系统,性能略差于裸设备。
ASM的安装过程很简单,实际就是装一个Oracle的实例,不过这个实例是ASM实例(为什么要用实例这么复杂的体系 来管理存储呢?未知...)
首先下载需要的ASM软件:
在你的linux系统下面查看内核:
uname -r
我的是:2.6.9-22.ELsmp
注意smp表示多路并发处理,意思就多核CPU。相应的asmlib也要对应smp(肯定是在编译器级有区别)。
下载文件如下:
oracleasm-2.6.9-22.ELsmp-2.0.3-1.x86_64.rpm
oracleasmlib-2.0.2-1.x86_64.rpm
oracleasm-support-2.0.3-1.x86_64.rpm
安装:
su - root
rpm -Uvh oracleasm-2.6.9-22.ELsmp-2.0.3-1.x86_64.rpm \
oracleasmlib-2.0.2-1.x86_64.rpm \
oracleasm-support-2.0.3-1.x86_64.rpm
配置ASM:
# /etc/init.d/oracleasm configure
会让你输入用 oracle
用户组 dba
然后 y y
。。。
在这个阶段有可能出现错误Loading module "oracleasm": Unable to load module "oracleasm",解决办法如下:
1. 检查EL内核和asm是否一致?
2. /lib/modules/2.6.9-22.ELsmp/kernel/drivers/addon/oracleasm是否有oracleasm.ko
如果有,修改/etc/SElinux/config:
SELINUX=enforcing -》 SELINUX=disabled
或者在xwindow里:
Applications -> System Settings -> Security Level -> Security Level Configuration -> SELinux tab
and the unclick the 'Enabled' box.
创建LV:
创建以前ASM磁盘以前,我们得在系统内为ASM划分逻辑卷来做为ASM磁盘。
这个测试机上,有50G的LVM备用/dev/sda5,命令如下(依次):
pvcreate /dev/sda5
vgcreate /dev/sda5 phsvg
lvcreate -L 25G -n ASM01 phsvg
lvcreate -L 25G -n ASM02 phsvg
最后,查看lvdisplay

[root@fmj ~]# lvdisplay
--- Logical volume ---
LV Name /dev/phsvg/asm01
VG Name phsvg
LV UUID 6OvsGS-zoO3-14bP-dOEh-KVHT-1uOS-XyxGD9
LV Write Access read/write
LV Status available
# open 2
LV Size 25.00 GB
Current LE 6400
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0

--- Logical volume ---
LV Name /dev/phsvg/asm02
VG Name phsvg
LV UUID Ey8lxV-R8Ve-Ef7T-zXLr-0ZPI-zod5-8Ok6dR
LV Write Access read/write
LV Status available
# open 2
LV Size 25.00 GB
Current LE 6400
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1

创建ASM 磁盘
# /etc/init.d/oracleasm createdisk ASM01 /dev/phsvg/asm01
Marking disk "/dev/sdb" as an ASM disk [ OK ]
# /etc/init.d/oracleasm createdisk ASM02 /dev/phsvg/asm02
Marking disk "/dev/sdc" as an ASM disk [ OK ]

如果要删除ASM 磁盘通过以下命令:
# /etc/init.d/oracleasm deletedisk ASM01

安装ASM实例:
网上我见过两种安装的顺序,1是安装好Oracle软件,手工创建Oracle实例,DB实例和ASM实例公用一个HOME,2Oracle官网上是用./runintaller图形化安装ASM软件实例,再database软件和实例,建议ASM_HOME和ORALCE_HOME分开,先ASM后Oracle。
实际上我不得不,已经安好了Oracle软件,再ASM软件+实例,再Oracle实例,两个HOME。
昨天,sa已经给我装好oracle软件。但是我还是重新运行了installer,流程如下(from oracle.com):
Create the ASM Instance

ASM runs as a separate Oracle instance which can be created and configured using the Oracle Universal Installer. Now that ASMLib is installed

and the disks are marked for use, you can create an ASM instance.

Log in as oracle and start runInstaller:

$ ./runInstaller
Select Installation Method
Select Advanced Installation
Click on Next
Specify Inventory Directory and Credentials
Inventory Directory: /u01/app/oracle/oraInventory
Operating System group name: oinstall
Click on Next
Select Installation Type
Select Enterprise Edition
Click on Next
Specify Home Details
Name: OraDB10gASM
Path: /opt/oracle/product/10.2.0/asm
Note:Oracle recommends using a different ORACLE_HOME for ASM than the ORACLE_HOME used for the database for ease of administration.
Click on Next
Product-specific Prerequisite Checks
If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the

problem before proceeding.
Click on Next
Select Configuration Option
Select Configure Automatic Storage Management (ASM)
Enter the ASM SYS password and confirm
Click on Next
Configure Automatic Storage Management
Disk Group Name: DATA
Redundancy
- High mirrors data twice.
- Normal mirrors data once. This is the default.
- External does not mirror data within ASM. This is typically used if an external RAID array is providing redundancy.
Add Disks
The disks you configured for use with ASMLib are listed as Candidate Disks. Select each disk you wish to include in the disk group.
Click on Next
Summary
A summary of the products being installed is presented.
Click on Install.
Execute Configuration Scripts
At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the

indicated scripts.
Click on OK when finished.
Configuration Assistants
The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically
End of Installation
Make note of the URLs presented in the summary, and click on Exit when ready.
Congratulations! Your new Oracle ASM Instance is up and ready for use.

顺利完成后。dbca安装实例,记得在存储的时候选择相应的ASM实例,就没有什么可说的了。
装完以后,移植了大堆的数据:
SQL> SELECT NAME FROM v$datafile;

NAME
--------------------------------------------------------------------------------
+DATA/phs/datafile/system.256.650225053
+DATA/phs/datafile/undotbs1.258.650225055
+DATA/phs/datafile/sysaux.257.650225055
+DATA/phs/datafile/users.259.650225055
+DATA/phs/datafile/phsdata.270.650225841
+DATA/phs/datafile/phsindex.271.650226911
+DATA/phs/datafile/phswebdata.272.650226929

7 rows selected
值得注意的一个问题是,目前存在两个ORACLE_HOME,在启动ASM实例的时候要注意:
export ORACLE_HOME=/opt/oracle/product/10.2.0/asm
export ORACLE_SID=+ASM
否则只会连接到一个idle的实例,又或者你在database的home启动另外一个实例。

附录:ASM实例的init+ASM.ora
+ASM.asm_diskgroups='DATA'#Manual Mount --ASM磁盘组名为DATA
*.background_dump_dest='/opt/oracle/admin/+ASM/bdump'
*.core_dump_dest='/opt/oracle/admin/+ASM/cdump'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='SHARED'
*.user_dump_dest='/opt/oracle/admin/+ASM/udump'

其它问题:
1.遇到一个老问题,vnc连接,xwindow错误。
--telnet
[root@app1 oracle]# service vncserver stop
Shutting down VNC server: 1:app [ OK ]
[root@app1 oracle]# su - oracle
[oracle@app1 ~]$ vncserver

You will require a password to access your desktops.

Password:
Verify:
xauth: creating new authority file /home/oracle/.Xauthority

New 'app1.aps.scttsc.com:1 (oracle)' desktop is app1.aps.scttsc.com:1

Creating default startup script /home/oracle/.vnc/xstartup
Starting applications specified in /home/oracle/.vnc/xstartup
Log file is /home/oracle/.vnc/app1.aps.scttsc.com:1.log
--然后用vnc连接
su - oracle
xhost +
...
./runInstaller
2.ORA-29701: unable to connect to Cluster Manager
网上说解决方法是:
那么请检查/etc/inittab 文件,看看是否有下面这行
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 如果没有请添加,如果被注释了请取消注释。
实际上我并没有遇到这个问题,而是:

[root@asm ~]# /u01/app/oracle/product/10.0.2/bin/localconfig add
/etc/oracle does not exist. Creating it now.
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.
CSS is active on these nodes.
asm
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)

3.dbca创建ASM实例的时候报不能write spfile。
解决办法:shutdown asm实例

etc/selinux/config disabled

原文:http://valen.blog.ccidnet.com/blog-htm-itemid-271585-do-showone-type-blog-uid-51502.html

阅读(589) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2008-09-29 22:53:23

[url=http://hi.aeeboo.com/iuy7178/blog/article/9244159/]曾道人[/url] [url=http://blog.ifeng.com/article/1614725.html]曾道人[/url] [url=http://blog.gutx.com/blog/iuy178/]曾道人[/url] [url=http://blog.focus.cn/myblog/21781631.html]曾道人[/url] [url=http://cid-d0e3c064c048f689.spaces.live.com/default.aspx]曾道人[/url] [url=http://www.9love.com/diaryview.do?doing=DiaryView&userid=2207244&blogid=24701]曾道人[/url] [url=http://hi.aeeboo.com/kkyymm78/blog/]曾道人[/url] [url=http://blog.ifeng.com/article/1614725.html