#pvcreate /dev/sdb{5,6,7} /dev/sdc{5,6,7} /dev/sdd{5,6,7}
#vgcreate asmg1 /dev/sdb5 /dev/sdc5 /dev/sdd5
#vgcreate asmg2 /dev/sdb6 /dev/sdc6 /dev/sdd6
#vgcreate asmg2 /dev/sdb7 /dev/sdc7 /dev/sdd7
#lvcreate -L 1000M -n lv1 asmg1
#lvremore lv1 asmg1 (这个是删除的)
1.#/usr/bin/raw -qa
2.#vi /etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/asmg/system01.dbf
/dev/raw/raw2 /dev/asmg/users01.dbf
/dev/raw/raw3 /dev/asmg/temp01.dbf
/dev/raw/raw4 /dev/asmg/undotbs01.dbf
/dev/raw/raw5 /dev/asmg/control01.ctl
/dev/raw/raw6 /dev/asmg/control02.ctl
/dev/raw/raw7 /dev/asmg/control03.ctl
/dev/raw/raw8 /dev/asmg/redo01.log
/dev/raw/raw9 /dev/asmg/redo02.log
/dev/raw/raw10 /dev/asmg/redo03.log
/dev/raw/raw11 /dev/asmg/sysaux01.dbf
/dev/raw/raw12 /dev/asmg/spfileoracle.ora
2.1.# raw /dev/raw/raw1 /dev/asmg/system01.dbf
# raw /dev/raw/raw2 /dev/asmg/users01.dbf
# raw /dev/raw/raw3 /dev/asmg/temp01.dbf
# raw /dev/raw/raw4 /dev/asmg/undotbs01.dbf
# raw /dev/raw/raw5 /dev/asmg/control01.ctl
# raw /dev/raw/raw6 /dev/asmg/control02.ctl
# raw /dev/raw/raw7 /dev/asmg/control03.ctl
# raw /dev/raw/raw8 /dev/asmg/redo01.log
# raw /dev/raw/raw9 /dev/asmg/redo02.log
# raw /dev/raw/raw10 /dev/asmg/redo03.log
# raw /dev/raw/raw11 /dev/asmg/sysaux01.dbf
# raw /dev/raw/raw12 /dev/asmg/spfileoracle.ora
2.2如果想在每次启动时都绑定到RAWn,需要做如下操作
#vi /etc/rc.d/rc.local
raw /dev/raw/raw2 /dev/asmg/users01.dbf
raw /dev/raw/raw3 /dev/asmg/temp01.dbf
raw /dev/raw/raw4 /dev/asmg/undotbs01.dbf
raw /dev/raw/raw5 /dev/asmg/control01.ctl
raw /dev/raw/raw6 /dev/asmg/control02.ctl
raw /dev/raw/raw7 /dev/asmg/control03.ctl
raw /dev/raw/raw8 /dev/asmg/redo01.log
raw /dev/raw/raw9 /dev/asmg/redo02.log
raw /dev/raw/raw10 /dev/asmg/redo03.log
raw /dev/raw/raw11 /dev/asmg/sysaux01.dbf
raw /dev/raw/raw12 /dev/asmg/spfileoracle.ora
chown oracle:dba /dev/raw/*
chmod 660 /dev/raw/*
3.# /sbin/service rawdevices restart
4.# chown oracle:dba /dev/raw/*
# chmod 660 /dev/raw/*
# chown oracle:dba /dev/asmg/* /这个是设置lvm分区的权限不然就会提示没有权限
4.1# vi /etc/udev/permissions.d/50-udev.permissions
# raw devices
ram*:root:disk:0660
#raw/*:root:disk:0660
raw/*:oracle:dba:0660
5.#vi .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/app
6. # mkdir -p /oracle/ruankodb/oradata/ruanko
# chown -R oracle:oinstall $ORACLE_BASE/oradata
# chmod -R 775 $ORACLE_BASE/oradata
#su - oracle
$cd /oracle/ruankodb/oradata/ruanko
$ln -s /dev/raw/raw3 /oracle/ruanko/oradata/ruanko/control02.ctl
$ln -s /dev/raw/raw4 /oracle/ruanko/oradata/ruanko/control03.ctl
$ln -s /dev/raw/raw5 /oracle/ruanko/oradata/ruanko/redo01.log
$ln -s /dev/raw/raw6 /oracle/ruanko/oradata/ruanko/redo02.log
$ln -s /dev/raw/raw7 /oracle/ruanko/oradata/ruanko/redo03.log
$ln -s /dev/raw/raw8 /oracle/ruanko/oradata/ruanko/system01.dbf
$ln -s /dev/raw/raw9 /oracle/ruanko/oradata/ruanko/sysaux01.dbf
$ln -s /dev/raw/raw10 /oracle/ruanko/oradata/ruanko/undotbs01.dbf
$ln -s /dev/raw/raw11 /oracle/ruanko/oradata/ruanko/temp01.dbf
$ln -s /dev/raw/raw12 /oracle/ruanko/oradata/ruanko/control04.ctl
$ln -s /dev/raw/raw13 /oracle/ruanko/oradata/ruanko/control05.ctl
$ln -s /dev/raw/raw14 /oracle/ruanko/oradata/ruanko/control06.ctl
$ln -s /dev/raw/raw15 /oracle/ruanko/oradata/ruanko/ruankosystem.dbf
$ln -s /dev/raw/raw16 /oracle/ruanko/oradata/ruanko/ruankotest.dbf
$ln -s /dev/raw/raw17 /oracle/ruanko/oradata/ruanko/coe.dbf
7.#cd $ORACLE_BASE/oradata/ruanko
[oracle]$vi dbname_raw.conf
system=/oracle/ruankodb/oradata/RUANKO/system01.dbf
users =/oracle/ruankodb/oradata/RUANKO/users01.dbf
temp=/oracle/ruankodb/oradata/RUANKO/temp01.dbf
undotbs1=/oracle/ruankodb/oradata/RUANKO/undotbs01.dbf
control1=/oracle/ruankodb/oradata/RUANKO/control01.ctl
control2=/oracle/ruankodb/oradata/RUANKO/control02.ctl
control3=/oracle/ruankodb/oradata/RUANKO/control03.ctl
control4=/oracle/ruankodb/oradata/RUANKO/control04.ctl
control5=/oracle/ruankodb/oradata/RUANKO/control05.ctl
control6=/oracle/ruankodb/oradata/RUANKO/control06.ctl
redo1_1=/oracle/ruankodb/oradata/RUANKO/redo01.log
redo1_2=/oracle/ruankodb/oradata/RUANKO/redo02.log
redo1_3=/oracle/ruankodb/oradata/RUANKO/redo03.log
sysaux=/oracle/ruankodb/oradata/RUANKO/sysaux01.dbf
ruankosystem=/oracle/ruankodb/oradata/RUANKO/ruankosystem01.dbf
spfileoracle=/oracle/ruankodb/oradata/RUANKO/spfileruanko.ora
8.#xhost +
#su - oracle
$dbca
写上SID---->next--->写上密码 --->选择第三个(Raw Devices) 选择上Speclfy Raw Devices Mapping点Browse找到自己的引导文档
还要手动增加多控制文件和redo日记文件
#vgcreate asmg1 /dev/sdb5 /dev/sdc5 /dev/sdd5
#vgcreate asmg2 /dev/sdb6 /dev/sdc6 /dev/sdd6
#vgcreate asmg2 /dev/sdb7 /dev/sdc7 /dev/sdd7
#lvcreate -L 1000M -n lv1 asmg1
#lvremore lv1 asmg1 (这个是删除的)
1.#/usr/bin/raw -qa
2.#vi /etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/asmg/system01.dbf
/dev/raw/raw2 /dev/asmg/users01.dbf
/dev/raw/raw3 /dev/asmg/temp01.dbf
/dev/raw/raw4 /dev/asmg/undotbs01.dbf
/dev/raw/raw5 /dev/asmg/control01.ctl
/dev/raw/raw6 /dev/asmg/control02.ctl
/dev/raw/raw7 /dev/asmg/control03.ctl
/dev/raw/raw8 /dev/asmg/redo01.log
/dev/raw/raw9 /dev/asmg/redo02.log
/dev/raw/raw10 /dev/asmg/redo03.log
/dev/raw/raw11 /dev/asmg/sysaux01.dbf
/dev/raw/raw12 /dev/asmg/spfileoracle.ora
2.1.# raw /dev/raw/raw1 /dev/asmg/system01.dbf
# raw /dev/raw/raw2 /dev/asmg/users01.dbf
# raw /dev/raw/raw3 /dev/asmg/temp01.dbf
# raw /dev/raw/raw4 /dev/asmg/undotbs01.dbf
# raw /dev/raw/raw5 /dev/asmg/control01.ctl
# raw /dev/raw/raw6 /dev/asmg/control02.ctl
# raw /dev/raw/raw7 /dev/asmg/control03.ctl
# raw /dev/raw/raw8 /dev/asmg/redo01.log
# raw /dev/raw/raw9 /dev/asmg/redo02.log
# raw /dev/raw/raw10 /dev/asmg/redo03.log
# raw /dev/raw/raw11 /dev/asmg/sysaux01.dbf
# raw /dev/raw/raw12 /dev/asmg/spfileoracle.ora
2.2如果想在每次启动时都绑定到RAWn,需要做如下操作
#vi /etc/rc.d/rc.local
raw /dev/raw/raw2 /dev/asmg/users01.dbf
raw /dev/raw/raw3 /dev/asmg/temp01.dbf
raw /dev/raw/raw4 /dev/asmg/undotbs01.dbf
raw /dev/raw/raw5 /dev/asmg/control01.ctl
raw /dev/raw/raw6 /dev/asmg/control02.ctl
raw /dev/raw/raw7 /dev/asmg/control03.ctl
raw /dev/raw/raw8 /dev/asmg/redo01.log
raw /dev/raw/raw9 /dev/asmg/redo02.log
raw /dev/raw/raw10 /dev/asmg/redo03.log
raw /dev/raw/raw11 /dev/asmg/sysaux01.dbf
raw /dev/raw/raw12 /dev/asmg/spfileoracle.ora
chown oracle:dba /dev/raw/*
chmod 660 /dev/raw/*
3.# /sbin/service rawdevices restart
4.# chown oracle:dba /dev/raw/*
# chmod 660 /dev/raw/*
# chown oracle:dba /dev/asmg/* /这个是设置lvm分区的权限不然就会提示没有权限
4.1# vi /etc/udev/permissions.d/50-udev.permissions
# raw devices
ram*:root:disk:0660
#raw/*:root:disk:0660
raw/*:oracle:dba:0660
5.#vi .bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/app
6. # mkdir -p /oracle/ruankodb/oradata/ruanko
# chown -R oracle:oinstall $ORACLE_BASE/oradata
# chmod -R 775 $ORACLE_BASE/oradata
#su - oracle
$cd /oracle/ruankodb/oradata/ruanko
$ln -s /dev/raw/raw3 /oracle/ruanko/oradata/ruanko/control02.ctl
$ln -s /dev/raw/raw4 /oracle/ruanko/oradata/ruanko/control03.ctl
$ln -s /dev/raw/raw5 /oracle/ruanko/oradata/ruanko/redo01.log
$ln -s /dev/raw/raw6 /oracle/ruanko/oradata/ruanko/redo02.log
$ln -s /dev/raw/raw7 /oracle/ruanko/oradata/ruanko/redo03.log
$ln -s /dev/raw/raw8 /oracle/ruanko/oradata/ruanko/system01.dbf
$ln -s /dev/raw/raw9 /oracle/ruanko/oradata/ruanko/sysaux01.dbf
$ln -s /dev/raw/raw10 /oracle/ruanko/oradata/ruanko/undotbs01.dbf
$ln -s /dev/raw/raw11 /oracle/ruanko/oradata/ruanko/temp01.dbf
$ln -s /dev/raw/raw12 /oracle/ruanko/oradata/ruanko/control04.ctl
$ln -s /dev/raw/raw13 /oracle/ruanko/oradata/ruanko/control05.ctl
$ln -s /dev/raw/raw14 /oracle/ruanko/oradata/ruanko/control06.ctl
$ln -s /dev/raw/raw15 /oracle/ruanko/oradata/ruanko/ruankosystem.dbf
$ln -s /dev/raw/raw16 /oracle/ruanko/oradata/ruanko/ruankotest.dbf
$ln -s /dev/raw/raw17 /oracle/ruanko/oradata/ruanko/coe.dbf
7.#cd $ORACLE_BASE/oradata/ruanko
[oracle]$vi dbname_raw.conf
system=/oracle/ruankodb/oradata/RUANKO/system01.dbf
users =/oracle/ruankodb/oradata/RUANKO/users01.dbf
temp=/oracle/ruankodb/oradata/RUANKO/temp01.dbf
undotbs1=/oracle/ruankodb/oradata/RUANKO/undotbs01.dbf
control1=/oracle/ruankodb/oradata/RUANKO/control01.ctl
control2=/oracle/ruankodb/oradata/RUANKO/control02.ctl
control3=/oracle/ruankodb/oradata/RUANKO/control03.ctl
control4=/oracle/ruankodb/oradata/RUANKO/control04.ctl
control5=/oracle/ruankodb/oradata/RUANKO/control05.ctl
control6=/oracle/ruankodb/oradata/RUANKO/control06.ctl
redo1_1=/oracle/ruankodb/oradata/RUANKO/redo01.log
redo1_2=/oracle/ruankodb/oradata/RUANKO/redo02.log
redo1_3=/oracle/ruankodb/oradata/RUANKO/redo03.log
sysaux=/oracle/ruankodb/oradata/RUANKO/sysaux01.dbf
ruankosystem=/oracle/ruankodb/oradata/RUANKO/ruankosystem01.dbf
spfileoracle=/oracle/ruankodb/oradata/RUANKO/spfileruanko.ora
8.#xhost +
#su - oracle
$dbca
写上SID---->next--->写上密码 --->选择第三个(Raw Devices) 选择上Speclfy Raw Devices Mapping点Browse找到自己的引导文档
还要手动增加多控制文件和redo日记文件
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16111659/viewspace-664382/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16111659/viewspace-664382/