热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

OracleASMforlinxas4x8664创建过程

Oracle ASM for linx as 4 x86-64 创建过程 1、划分区 Disk /dev/sdb: 5368 MB, 5368709120 bytes


Oracle ASM for linx as 4 x86-64 创建过程


1、划分区




Disk /dev/sdb: 5368 MB, 5368709120 bytes


255 heads, 63 sectors/track, 652 cylinders


Units = cylinders of 16065 * 512 = 8225280 bytes




Device Boot      Start         End      Blocks   Id  System


/dev/sdb1               1         499     4008186   83  Linux


/dev/sdb2             500         585      690795   83  Linux


/dev/sdb3             586         622      297202+  83  Linux


/dev/sdb4             623         652      240975   83  Linux




其中以下分区用于创建ASM盘  


/dev/sdb2


/dev/sdb3


/dev/sdb4




2、下载和内核相关的asm rpm包,其网址为


http://www.oracle.com/technology/tech/linux/asmlib/index.html




当前内核为


[root@dbsvr /]# uname -a


Linux dbsvr 2.6.9-42.EL #1 Wed Jul 12 23:15:20 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux




[root@dbsvr admin]# more /etc/issue


Red Hat Enterprise Linux AS release 4 (Nahant Update 4)


Kernel \r on an \m




下载asm包的版本为


[root@dbsvr tmp]# rpm -qa|grep asm


oracleasm-support-2.1.3-1.el4


oracleasm-2.6.9-42.EL-debuginfo-2.0.5-1.el4


oracleasmlib-2.0.4-1.el4


oracleasm-2.6.9-42.EL-2.0.5-1.el4




3、安装rpm包


其安装顺序为


[root@dbsvr tmp]# rpm -ivh oracleasm-support-2.1.3-1.el4.x86_64.rpm


Preparing...                ########################################### [100%]


1:oracleasm-support      ########################################### [100%]


[root@dbsvr tmp]# rpm -ivh  oracleasm-2.6.9-42.EL-2.0.5-1.el4.x86_64.rpm


Preparing...                ########################################### [100%]


1:oracleasm-2.6.9-42.EL  ########################################### [100%]


[root@dbsvr tmp]# rpm -ivh oracleasm-2.6.9-42.EL-debuginfo-2.0.5-1.el4.x86_64.rpm


Preparing...                ########################################### [100%]


1:oracleasm-2.6.9-42.EL-d########################################### [100%]


[root@dbsvr tmp]# rpm -ivh  oracleasmlib-2.0.4-1.el4.x86_64.rpm


Preparing...                ########################################### [100%]


1:oracleasmlib           ########################################### [100%]




4、配置asm lib




[root@dbsvr tmp]# /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 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: [FAILED]




晕,出问题了,尝试将SELINUX设置disabled


[root@dbsvr tmp]#  vi /etc/sysconfig/selinux




# This file controls the state of SELinux on the system.


# SELINUX= can take one of these three values:


#       enforcing - SELinux security policy is enforced.


#       permissive - SELinux prints warnings instead of enforcing.


#       disabled - SELinux is fully disabled.


SELINUX=disabled


# SELINUXTYPE= type of policy in use. Possible values are:


#       targeted - Only targeted network daemons are protected.


#       strict - Full SELinux protection.


SELINUXTYPE=targeted




[root@dbsvr tmp]#  setenforce 0


[root@dbsvr tmp]#  /usr/sbin/sestatus


SELinux status:         enabled


SELinuxfs mount:        /selinux


Current mode:           permissive


Mode from config file:  disabled


Policy version:         18


Policy from config file:targeted




Policy booleans:


allow_syslog_to_console inactive


allow_ypbind            inactive


dhcpd_disable_trans     inactive


httpd_builtin_scripting active


httpd_disable_trans     inactive


httpd_enable_cgi        active


httpd_enable_homedirs   active


httpd_ssi_exec          active


httpd_tty_comm          inactive


httpd_unified           active


mysqld_disable_trans    inactive


named_disable_trans     inactive


named_write_master_zonesinactive


nscd_disable_trans      inactive


ntpd_disable_trans      inactive


pegasus_disable_trans   inactive


portmap_disable_trans   inactive


postgresql_disable_transinactive


snmpd_disable_trans     inactive


squid_disable_trans     inactive


syslogd_disable_trans   inactive


use_nfs_home_dirs       inactive


use_samba_home_dirs     inactive


use_syslogng            inactive


winbind_disable_trans   inactive


ypbind_disable_trans    inactive




[root@dbsvr tmp]# reboot




Broadcast message from root (pts/2) (Sun Aug 23 17:01:10 2009):




The system is going down for reboot NOW!


[root@dbsvr tmp]# /usr/sbin/sestatus


SELinux status:         disabled




[root@dbsvr tmp]# /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 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) [y]:


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


Writing Oracle ASM library driver configuration: done


Initializing the Oracle ASMLib driver: [  OK  ]


Scanning the system for Oracle ASMLib disks: [  OK  ]




可以利用 /etc/init.d/oracleasm 的 'enable' 和 'disable' 选项来启用或禁用自动启动。




[root@dbsvr tmp]# /etc/init.d/oracleasm disable


Writing Oracle ASM library driver configuration: done


Dropping Oracle ASMLib disks: [  OK  ]


Shutting down the Oracle ASMLib driver: [  OK  ]




[root@dbsvr tmp]# /etc/init.d/oracleasm enable


Writing Oracle ASM library driver configuration: done


Initializing the Oracle ASMLib driver: [  OK  ]


Scanning the system for Oracle ASMLib disks: [  OK  ]




5、对磁盘组的操作




1)创建asm磁盘组




[root@dbsvr tmp]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb2


Marking disk "VOL1" as an ASM disk: [  OK  ]


[root@dbsvr tmp]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdb3


Marking disk "VOL2" as an ASM disk: [  OK  ]


[root@dbsvr tmp]# /etc/init.d/oracleasm createdisk VOL3 /dev/sdb4


Marking disk "VOL3" as an ASM disk: [  OK  ]




注意:磁盘名称是 ASCII 大写字母、数字和下划线。它们必须以字母开始。




2)当然不再被 ASM 使用的磁盘也可以取消标记




[root@dbsvr tmp]#  /etc/init.d/oracleasm deletedisk VOL1


Removing ASM disk "VOL1": [  OK  ]




3)可以查询任意的操作系统磁盘,以了解它是否被 ASM 使用:




[root@dbsvr tmp]# /etc/init.d/oracleasm querydisk /dev/sdb2


Device "/dev/sdb2" is marked an ASM disk with the label "VOL1"


[root@dbsvr tmp]# /etc/init.d/oracleasm querydisk /dev/sdb3


Device "/dev/sdb3" is marked an ASM disk with the label "VOL2"


[root@dbsvr tmp]# /etc/init.d/oracleasm querydisk /dev/sdb4


Device "/dev/sdb4" is marked an ASM disk with the label "VOL3"




4)可以列出和查询现有的磁盘:




[root@dbsvr tmp]# /etc/init.d/oracleasm listdisks


VOL1


VOL2


VOL3




[root@dbsvr tmp]# /etc/init.d/oracleasm listdisks


VOL1


VOL2


VOL3


[root@dbsvr tmp]# /etc/init.d/oracleasm querydisk VOL1


Disk "VOL1" is a valid ASM disk






当向 RAC 设置中添加磁盘时,需要通知其他节点该磁盘的存在。在一个节点上运行 'createdisk' 命令,然后在其他每一个节点上运行 'scandisks':




[root@dbsvr tmp]# /etc/init.d/oracleasm scandisks


Scanning the system for Oracle ASMLib disks: [  OK  ]






5、利用dbca建库时,需要运行脚本,注意是root用户,但环境变量是oracle




[root@dbsvr 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.


dbsvr


CSS is active on all nodes.


Oracle CSS service is installed and running under init(1M)




建库时报ora-12547错误,需要安装如下包:




[root@dbsvr tmp]# rpm -qa|grep libaio


libaio-0.3.105-2


libaio-0.3.105-2


libaio-devel-0.3.105-2




附:ASM实例可以手工创建,也可以通过dbca创建,如手工创建


1、创建asm参数


[oracle@dbsvr dbs]$ more spfile+ASM.ora






+ASM.asm_diskgroups='ASMDISK'#Manual Mount


*.asm_diskgroups='ASMDISK'


*.background_dump_dest='/oracle/app/admin/+ASM/bdump'


*.core_dump_dest='/oracle/app/admin/+ASM/cdump'


*.instance_type='asm'


*.large_pool_size=12M


*.remote_login_passwordfile='SHARED'


*.user_dump_dest='/oracle/app/admin/+ASM/udump'






2、创建diskgroup组


SQL> ALTER DISKGROUP ALL MOUNT


Sun Aug 23 18:26:49 2009


Loaded ASM Library - Generic Linux, version 2.0.4 (KABI_V2) library for asmlib interface


Sun Aug 23 18:29:24 2009


SQL> CREATE DISKGROUP asmdisk External REDUNDANCY  DISK '/dev/sdb2' SIZE 674M ,'/dev/sdb3' SIZE 290M ,'/dev/sdb4' SIZE 235M ,'/dev/sdc1' SIZE 1913M;


Oracle ASM for linx as 4 x86-64 创建过程




推荐阅读
  • CF:3D City Model(小思维)问题解析和代码实现
    本文通过解析CF:3D City Model问题,介绍了问题的背景和要求,并给出了相应的代码实现。该问题涉及到在一个矩形的网格上建造城市的情景,每个网格单元可以作为建筑的基础,建筑由多个立方体叠加而成。文章详细讲解了问题的解决思路,并给出了相应的代码实现供读者参考。 ... [详细]
  • MyBatis多表查询与动态SQL使用
    本文介绍了MyBatis多表查询与动态SQL的使用方法,包括一对一查询和一对多查询。同时还介绍了动态SQL的使用,包括if标签、trim标签、where标签、set标签和foreach标签的用法。文章还提供了相关的配置信息和示例代码。 ... [详细]
  • 微软头条实习生分享深度学习自学指南
    本文介绍了一位微软头条实习生自学深度学习的经验分享,包括学习资源推荐、重要基础知识的学习要点等。作者强调了学好Python和数学基础的重要性,并提供了一些建议。 ... [详细]
  • 本文介绍了使用kotlin实现动画效果的方法,包括上下移动、放大缩小、旋转等功能。通过代码示例演示了如何使用ObjectAnimator和AnimatorSet来实现动画效果,并提供了实现抖动效果的代码。同时还介绍了如何使用translationY和translationX来实现上下和左右移动的效果。最后还提供了一个anim_small.xml文件的代码示例,可以用来实现放大缩小的效果。 ... [详细]
  • Spring源码解密之默认标签的解析方式分析
    本文分析了Spring源码解密中默认标签的解析方式。通过对命名空间的判断,区分默认命名空间和自定义命名空间,并采用不同的解析方式。其中,bean标签的解析最为复杂和重要。 ... [详细]
  • 向QTextEdit拖放文件的方法及实现步骤
    本文介绍了在使用QTextEdit时如何实现拖放文件的功能,包括相关的方法和实现步骤。通过重写dragEnterEvent和dropEvent函数,并结合QMimeData和QUrl等类,可以轻松实现向QTextEdit拖放文件的功能。详细的代码实现和说明可以参考本文提供的示例代码。 ... [详细]
  • 本文介绍了数据库的存储结构及其重要性,强调了关系数据库范例中将逻辑存储与物理存储分开的必要性。通过逻辑结构和物理结构的分离,可以实现对物理存储的重新组织和数据库的迁移,而应用程序不会察觉到任何更改。文章还展示了Oracle数据库的逻辑结构和物理结构,并介绍了表空间的概念和作用。 ... [详细]
  • 本文分享了一个关于在C#中使用异步代码的问题,作者在控制台中运行时代码正常工作,但在Windows窗体中却无法正常工作。作者尝试搜索局域网上的主机,但在窗体中计数器没有减少。文章提供了相关的代码和解决思路。 ... [详细]
  • 知识图谱——机器大脑中的知识库
    本文介绍了知识图谱在机器大脑中的应用,以及搜索引擎在知识图谱方面的发展。以谷歌知识图谱为例,说明了知识图谱的智能化特点。通过搜索引擎用户可以获取更加智能化的答案,如搜索关键词"Marie Curie",会得到居里夫人的详细信息以及与之相关的历史人物。知识图谱的出现引起了搜索引擎行业的变革,不仅美国的微软必应,中国的百度、搜狗等搜索引擎公司也纷纷推出了自己的知识图谱。 ... [详细]
  • 本文介绍了作者在开发过程中遇到的问题,即播放框架内容安全策略设置不起作用的错误。作者通过使用编译时依赖注入的方式解决了这个问题,并分享了解决方案。文章详细描述了问题的出现情况、错误输出内容以及解决方案的具体步骤。如果你也遇到了类似的问题,本文可能对你有一定的参考价值。 ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • 本文介绍了三种方法来实现在Win7系统中显示桌面的快捷方式,包括使用任务栏快速启动栏、运行命令和自己创建快捷方式的方法。具体操作步骤详细说明,并提供了保存图标的路径,方便以后使用。 ... [详细]
  • Java学习笔记之面向对象编程(OOP)
    本文介绍了Java学习笔记中的面向对象编程(OOP)内容,包括OOP的三大特性(封装、继承、多态)和五大原则(单一职责原则、开放封闭原则、里式替换原则、依赖倒置原则)。通过学习OOP,可以提高代码复用性、拓展性和安全性。 ... [详细]
  • 在Xamarin XAML语言中如何在页面级别构建ControlTemplate控件模板
    本文介绍了在Xamarin XAML语言中如何在页面级别构建ControlTemplate控件模板的方法和步骤,包括将ResourceDictionary添加到页面中以及在ResourceDictionary中实现模板的构建。通过本文的阅读,读者可以了解到在Xamarin XAML语言中构建控件模板的具体操作步骤和语法形式。 ... [详细]
  • 预备知识可参考我整理的博客Windows编程之线程:https:www.cnblogs.comZhuSenlinp16662075.htmlWindows编程之线程同步:https ... [详细]
author-avatar
万源佳威5
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有