Welcome 微信登录

首页 / 数据库 / MySQL / 裸设备创建ASM磁盘

1、首先添加3块磁盘2、安装包[root@myorcl asm]# lsOracleasm-2.6.18-348.6.1.el5-2.0.5-1.el5.i686.rpmoracleasm-2.6.18-348.6.1.el5debug-2.0.5-1.el5.i686.rpmoracleasm-2.6.18-348.6.1.el5PAE-2.0.5-1.el5.i686.rpmoracleasm-2.6.18-348.6.1.el5xen-2.0.5-1.el5.i686.rpmoracleasmlib-2.0.4-1.el5.i386.rpmoracleasm-support-2.1.8-1.el5.i386.rpm3、查看3块磁盘[root@myorcl asm]# fdisk -lDisk /dev/sdb: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdb doesn"t contain a valid partition tableDisk /dev/sdc: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdc doesn"t contain a valid partition tableDisk /dev/sdd: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/sdd doesn"t contain a valid partition table3、按照下面类似的方法创建分区root@myorcl asm]# fdisk /dev/sdcDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent won"t be recoverable.The number of cylinders for this disk is set to 2610.There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause problems with:1) software that runs at boot time (e.g., old versions of LILO)2) booting and partitioning software from other OSs(e.g., DOS FDISK, OS/2 FDISK)Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)Command (m for help): nCommand actioneextendedpprimary partition (1-4)pPartition number (1-4): 1First cylinder (1-2610, default 1):Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610):Using default value 2610Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.[root@myorcl asm]# partprobe /dev/sdb[root@myorcl asm]# partprobe /dev/sdc[root@myorcl asm]# partprobe /dev/sdd[root@myorcl asm]# vi /etc/udev/rules.d/60-raw.rules 添加ACTION=="add",KERNEL=="sdb1",RUN+="/bin/raw /dev/raw/raw100 %N"ACTION=="add",KERNEL=="sdc1",RUN+="/bin/raw /dev/raw/raw101 %N"ACTION=="add",KERNEL=="sdd1",RUN+="/bin/raw /dev/raw/raw102 %N"[root@myorcl asm]# vi /etc/udev/rules.d/90-raw.rules 添加KERNEL=="raw10*",OWNER="oracle",GROUP="dba",MODE="0660"--已raw10*的设备属于oracle。开启start_udev服务[root@myorcl asm]# start_udevStarting udev: [OK]查看权限[root@myorcl asm]# ll /dev/rawtotal 0crw-rw---- 1 oracle dba 162, 100 Jul5 07:43 raw100crw-rw---- 1 oracle dba 162, 101 Jul5 07:43 raw101crw-rw---- 1 oracle dba 162, 102 Jul5 07:43 raw1024、添加集群就绪服务[root@myorcl asm]# /u01/app/oracle/product/10.2.0/db_1/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 initializedAdding to inittabStartup 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.myorclCSS is active on all nodes.Oracle CSS service is installed and running under init(1M)[root@myorcl asm]# oracleasm configure -iConfiguring the Oracle ASM library driver.This will configure the on-boot properties of the Oracle ASM librarydriver.The following questions will determine whether the driver isloaded on boot and what permissions it will have.The current valueswill be shown in brackets ("[]").Hitting <ENTER> without typing ananswer will keep that current value.Ctrl-C will abort.Default user to own the driver interface []: oracleDefault group to own the driver interface []: oinstallStart Oracle ASM library driver on boot (y/n) [n]: yScan for Oracle ASM disks on boot (y/n) [y]: yWriting Oracle ASM library driver configuration: done5、然后通过DBCA配置[oracle@myorcl ~]$ dbca选择配置ASM 就可以看到之前的裸设备冗余机制有normal :两个磁盘组,hight:三个磁盘组,external:外部冗余:一个磁盘组然后完成,不配置其他选项6、访问实例[oracle@myorcl ~]$ export ORACLE_SID=+ASM[oracle@myorcl ~]$ sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Fri Jul 5 07:59:01 2013Copyright (c) 1982, 2005, Oracle.All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionWith the Partitioning, OLAP and Data Mining optionsSQL> select instance_name from v$instance;INSTANCE_NAME------------------------------------------------+ASM查看ASM磁盘组SQL> desc v$asm_diskgroupNameNull?Type----------------------------------------- -------- ----------------------------GROUP_NUMBERNUMBERNAMEVARCHAR2(30)SECTOR_SIZENUMBERBLOCK_SIZENUMBERALLOCATION_UNIT_SIZENUMBERSTATEVARCHAR2(11)TYPEVARCHAR2(6)TOTAL_MBNUMBERFREE_MBNUMBERREQUIRED_MIRROR_FREE_MBNUMBERUSABLE_FILE_MBNUMBEROFFLINE_DISKSNUMBERUNBALANCEDVARCHAR2(1)COMPATIBILITYVARCHAR2(60)DATABASE_COMPATIBILITYVARCHAR2(60)7、查看数据库实例是否能够使用ASM磁盘组[oracle@myorcl asm]$ export ORACLE_SID=orcl[oracle@myorcl asm]$ sqlplus / as sysdbaSQL*Plus: Release 10.2.0.1.0 - Production on Fri Jul 5 08:03:07 2013Copyright (c) 1982, 2005, Oracle.All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProductionWith the Partitioning, OLAP and Data Mining optionsSQL>SQL>SQL> select name from v$asm_diskgroup;NAME--------------------------------------------------------------------------------DB8、创建ASM实例数据库更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12Oracle网络管理Oracle闪回区满(ORA-16014)相关资讯      ASM  裸设备 
  • Oracle 11g RAC 启动时无法识别ASM  (今 15:36)
  • 监控ASM磁盘组IO吞吐量  (04月10日)
  • Win远程Linux下的ASM实例  (01月12日)
  • Oracle Linux6.7下使用udev做ASM  (07月04日)
  • ASM学习之概述  (01月12日)
  • 11G ASM磁盘组不能自动MOUNT处理  (01月12日)
本文评论 查看全部评论 (0)
表情: 姓名: 字数

版权所有©石家庄振强科技有限公司2024 冀ICP备08103738号-5 网站地图