全手工创建asm
1、安装gi软件,注意选择只安装软件(soft only) <--如果这一步使用静默安装方式,则完全脱离图形界面
2、初始化gi
[root@dbserver ~]# /u01/app/grid/11.2.0/grid/perl/bin/perl -I/u01/app/grid/11.2.0/grid/perl/lib -I/u01/app/grid/11.2.0/grid/crs/install /u01/app/grid/11.2.0/grid/crs/install/roothas.pl
3、启动css
[grid@dbserver dbs]$ crsctl start resource ora.cssd
CRS-2672: Attempting to start 'ora.cssd' on 'dbserver'
CRS-2672: Attempting to start 'ora.diskmon' on 'dbserver'
CRS-2676: Start of 'ora.diskmon' on 'dbserver' succeeded
CRS-2676: Start of 'ora.cssd' on 'dbserver' succeeded
4、创建pfile
[grid@dbserver dbs]$ cat init+ASM.ora
INSTANCE_TYPE='ASM'
5、创建spfile
SQL> create spfile from pfile;
create spfile from pfile
*
ERROR at line 1:
ORA-29786: SIHA attribute GET failed with error [Attribute 'SPFILE' sts[200]
lsts[0]]
报错可忽略
6、注册asm
[grid@dbserver dbs]$ srvctl add asm -p /u01/app/grid/11.2.0/grid/dbs/spfile+ASM.ora
7、启动实例
[grid@dbserver dbs]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Mon Aug 12 22:32:15 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ASM instance started
Total System Global Area 1135747072 bytes
Fixed Size 2260728 bytes
Variable Size 1108320520 bytes
ASM Cache 25165824 bytes
8、创建磁盘组
SQL> create diskgroup data external REDUNDANCY disk 'ORCL:ASMDISK01','ORCL:ASMDISK02','ORCL:ASMDISK03','ORCL:ASMDISK04' ;
Diskgroup created.
9、注册监听
[grid@dbserver ~]$ srvctl add listener
[grid@dbserver ~]$ srvctl start listener
10、查看crs
[grid@dbserver ~]$ crsctl status res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE dbserver
ora.LISTENER.lsnr
ONLINE ONLINE dbserver
ora.asm
ONLINE ONLINE dbserver Started
ora.ons
OFFLINE OFFLINE dbserver
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE ONLINE dbserver
ora.diskmon
1 OFFLINE OFFLINE
ora.evmd
1 ONLINE INTERMEDIATE dbserver
收工
|