ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【转】配置RAW Device磁盘组

【转】配置RAW Device磁盘组

原创 Linux操作系统 作者:shuyingxi 时间:2013-04-14 00:24:24 0 删除 编辑

主要验证了在REDHAT环境做了raw device的验证:

配置RAW Device磁盘组

目录
1 RAW device 的绑定与确认
2 修改RAW devcie 的属主,权限
3 asm_diskstring中的语法问题


##############################################################
1 RAW device 的绑定与确认
##############################################################

不的同的操作系统的操作方法存在差异

在做块设备到字符设备的绑定前,必须对新加的磁盘进行分区
fdisk -l
#/dev/sdc
#fdisk /dev/sdc

分成sdc[1-6]

以SUSE为例
1.1 编辑 raw 文件
#vi /etc/raw

raw1:sdc1
raw2:sdc2
raw3:sdc3
raw5:sdc5
raw6:sdc6

1.2 Bind the raw device
/etc/init.d/raw start|status|stop

1.3 自动启动rawdevices
#/sbin/chkconfig raw on


在REDHAT下:
1.1 vi /etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/sdc1
/dev/raw/raw2 /dev/sdc2
/dev/raw/raw3 /dev/sdc3
/dev/raw/raw5 /dev/sdc5
/dev/raw/raw6 /dev/sdc6

1.2 启动rawdevices服务
#service rawdevices start|status|stop

1.3 自动启动rawdevices
#/sbin/chkconfig rawdevices on

修改之前:

[root@dbp rules.d]# chkconfig --list rawdevices

rawdevices      0:关闭  1:关闭  2:关闭  3:启用  4:启用  5:启用  6:关闭

修改之后:

[root@dbp rules.d]# chkconfig rawdevices on

[root@dbp rules.d]#  chkconfig --list rawdevices

rawdevices      0:关闭  1:关闭  2:启用  3:启用  4:启用  5:启用  6:关闭

##############################################################

2 修改RAW devcie 的属主,权限,Oracle用户必须能够访问
##############################################################

chown oracle:dba /dev/raw/raw[1-6]
除了单文件要修改权限外,对文件所在的目录也要有访问权限

##############################################################
3 asm_diskstring中的语法问题
##############################################################

asm_diskstring='/dev/raw/raw1','/dev/raw/raw2' 分别用单引号,再用分号隔开。
alter system set asm_diskstring='/dev/raw/raw1','/dev/raw/raw2' scope=spfile;
alter system set asm_diskstring='/dev/raw/raw*' scope=spfile;

##############################################################
4  配置,使用RAW Device 磁盘组
##############################################################
1) 创建磁盘组

必须启动ASM到nomount状态
oracle>export ORACLE_SID=+ASM
oracle>sqlplus / as sysdba
SQL> startup nomount
SQL> create diskgroup test external redundancy disk '/dev/raw/raw*';

2) 在数据库中使用

ASM磁盘级在RDBMS在使用必须先注册
oracle>export ORACLE_SID=+ASM
oracle>sqlplus / as sysdba
SQL> alter system register;

oracle>export ORACLE_SID=test
oracle> sqlplus / as sysdba
SQL> create tablespace test datafile '+test/test01.dbf' size 50M;


转自 :http://space.itpub.net/10248702/viewspace-662863

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/438414/viewspace-758431/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-12-21

  • 博文量
    48
  • 访问量
    157708