利用隐藏参数_asm_allow_only_raw_disks创建ASM环境

原创 2012年03月30日 13:46:35

[root@Oracle ~]# fdisk -l

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *         132        1044     7333672+  83  Linux
/dev/sda2               1         131     1052226   82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          56      449788+  83  Linux
/dev/sdb2              57        2489    19543072+  83  Linux

Disk /dev/sdc: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         130     1044193+  83  Linux

Disk /dev/sdd: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1         130     1044193+  83  Linux

Disk /dev/sde: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1         130     1044193+  83  Linux

Disk /dev/sdf: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1         130     1044193+  83  Linux
[root@Oracle ~]#

[root@Oracle ~]# /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 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.
        oracle
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)

[root@Oracle ~]$cd /dev
[root@Oracle ~]$chown oracle.oinstall sdc1
[root@Oracle ~]$chown oracle.oinstall sdd1
[root@Oracle ~]$chown oracle.oinstall sde1
[root@Oracle ~]$chown oracle.oinstall sdf1

[oracle@Oracle ~]$ vim /u01/app/oracle/product/10.2.0/db_1/dbs/init+ASM.ora

instance_type=asm
asm_diskstring='/dev/sd*'


~
~
<oracle/product/10.2.0/db_1/dbs/init+ASM.ora" 2L, 44C written
[oracle@Oracle dev]$ export ORACLE_SID=+ASM
[oracle@Oracle dev]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 30 12:56:40 2012

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL>

SQL> create spfile from pfile;

File created.
SQL> select path,header_status from v$asm_disk;

no rows selected
SQL> shutdown immediate
ORA-15100: invalid or missing diskgroup name


ASM instance shutdown
SQL> startup nomount
ASM instance started

Total System Global Area  125829120 bytes
Fixed Size                  2019000 bytes
Variable Size              98644296 bytes
ASM Cache                  25165824 bytes
SQL> show parameter spfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u01/app/oracle/product/10.2.0
                                                 /db_1/dbs/spfile+ASM.ora
SQL>
SQL> alter system set "_asm_allow_only_raw_disks"=false scope=spfile sid='*';

System altered.

SQL> shutdown immediate
ORA-15100: invalid or missing diskgroup name


ASM instance shutdown
SQL> startup nomount
ASM instance started

Total System Global Area  125829120 bytes
Fixed Size                  2019000 bytes
Variable Size              98644296 bytes
ASM Cache                  25165824 bytes
SQL>
SQL> select path,header_status,library,total_mb,free_mb from v$asm_disk;

PATH
--------------------------------------------------------------------------------
HEADER_STATU LIBRARY
------------ ----------------------------------------------------------------
  TOTAL_MB    FREE_MB
---------- ----------
/dev/sdf1
MEMBER       System
      1019          0

/dev/sdc1
CANDIDATE    System
      1019          0

PATH
--------------------------------------------------------------------------------
HEADER_STATU LIBRARY
------------ ----------------------------------------------------------------
  TOTAL_MB    FREE_MB
---------- ----------

/dev/sdd1
MEMBER       System
      1019          0

/dev/sde1
MEMBER       System

PATH
--------------------------------------------------------------------------------
HEADER_STATU LIBRARY
------------ ----------------------------------------------------------------
  TOTAL_MB    FREE_MB
---------- ----------
      1019          0


SQL>

SQL> create diskgroup raw_dg normal redundancy failgroup
raw1 disk
'/dev/sdf1' name raw1_disk1,
'/dev/sdc1' name raw1_disk2
failgroup
raw2 disk
'/dev/sdd1' name raw_2disk1,
'/dev/sde1' name raw2_disk2;

Diskgroup created.

SQL>
SQL> select path,header_status,library,total_mb,free_mb from v$asm_disk;

PATH
--------------------------------------------------------------------------------
HEADER_STATU LIBRARY
------------ ----------------------------------------------------------------
  TOTAL_MB    FREE_MB
---------- ----------
/dev/sdf1
MEMBER       System
      1019        989

/dev/sde1
MEMBER       System
      1019        994

PATH
--------------------------------------------------------------------------------
HEADER_STATU LIBRARY
------------ ----------------------------------------------------------------
  TOTAL_MB    FREE_MB
---------- ----------

/dev/sdd1
MEMBER       System
      1019        991

/dev/sdc1
MEMBER       System

PATH
--------------------------------------------------------------------------------
HEADER_STATU LIBRARY
------------ ----------------------------------------------------------------
  TOTAL_MB    FREE_MB
---------- ----------
      1019        996


SQL>
SQL> select name,block_size,allocation_unit_size,state,type,total_mb,free_mb,usable_file_mb from v$asm_diskgroup
  2  /

NAME                           BLOCK_SIZE ALLOCATION_UNIT_SIZE STATE
------------------------------ ---------- -------------------- -----------
TYPE     TOTAL_MB    FREE_MB USABLE_FILE_MB
------ ---------- ---------- --------------
RAW_DG                               4096              1048576 MOUNTED
NORMAL       4076       3970           1475


SQL>

6.未公开的Oracle数据库秘密笔记——隐藏参数——_ASM_ALLOW_ONLY_RAW_DISKS

欢迎转载,转载请标明出处: 6.未公开的Oracle数据库秘密笔记——隐藏参数——ASM相关 ASM本质上是一个卷管理器和供ORACLE实例专用的文件系统。包括镜像和条带化。 查看ASM相关隐藏参数:...
  • notbaron
  • notbaron
  • 2015年12月20日 22:22
  • 30330

查Oracle的隐藏参数---创建视图v$parameter

查Oracle的隐藏参数---创建视图
  • guoyJoe
  • guoyJoe
  • 2016年05月18日 20:18
  • 6004

windows下asm创建及管理过程

本人是数据库菜鸟,下面是在刚刚接触asm管理数据写下的文章,如果有什么不对或者遗漏的地方请网友们指出,本人不胜感激。 asm创建 1)删除asm: 1,停止所有的服务 2,Localconfi...
  • xionglang7
  • xionglang7
  • 2011年12月12日 21:06
  • 2773

如何建立自己的隐藏文件夹

首先我们来看看这个文件夹和其他的文件夹有什么不同 我们双击进去看 看: 里面包含一个文件夹和一个文件,这个文件夹就是我们今天教程的主角。 像这样的文件夹(后面带点的)我们在windows...
  • jiangqin115
  • jiangqin115
  • 2015年04月25日 15:27
  • 1112

如何创建ASM实例

因为为想通过dbca创建ASM和database实例,单独地建立ASM instance,将之前单实例的数据库移到RAC里面来。   由于ASM实例是工作在Oracle instance上面,因此...
  • jolly10
  • jolly10
  • 2012年09月13日 16:12
  • 673

创建ASM磁盘(三种方法)

a.配置裸设备映射,修改/etc/udev/rules.d/60-raw.rules文件 使用root帐户修改/etc/udev/rules.d/60-raw.rules 按如下方式添加磁盘 ...
  • u011616400
  • u011616400
  • 2014年10月01日 11:46
  • 3987

ASM实例参数

ASM与文件系统的参数文件转移: CREATE SPFILE = '+DATA/asmspfile.ora' FROM PFILE = '$ORACLE_HOME/dbs/asmpfile.ora'...
  • f88520402
  • f88520402
  • 2014年03月21日 16:55
  • 1365

oracle11g 创建ASM实例

今天
  • suyishuai
  • suyishuai
  • 2014年05月22日 17:16
  • 1462

ASM实例构成概述、常用参数、常用命令

# ## ASM 实例构成概述 #SGA/ CSS/ EXTENT MAP/ RBAL/ ABRn/ ASMB ASM:Automatic Storage Management, 是Oracle...
  • hzhvv
  • hzhvv
  • 2016年06月22日 16:16
  • 253

oracle12c R2 asmca创建ASM磁盘组ORA-15031解决

APPLIES TO:Oracle Database - Enterprise Edition - Version 12.1.0.2 to 12.1.0.2 [Release 12.1] Inform...
  • xqzhang8
  • xqzhang8
  • 2017年06月01日 11:40
  • 897
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:利用隐藏参数_asm_allow_only_raw_disks创建ASM环境
举报原因:
原因补充:

(最多只允许输入30个字)