|
1.
rpm -ivh oracleasm-2.6.18-128.el5debug-2.0.5-1.el5.x86_64.rpm --nodeps --force
oracleasm-2.6.18-128.el5-2.0.5-1.el5
oracleasmlib-2.0.4-1.el5
oracleasm-2.6.18-128.el5debug-2.0.5-1.el5
oracleasm-2.6.18-128.el5-debuginfo-2.0.5-1.el5
oracleasm-support-2.1.7-1.el5
oracleasm-2.6.18-128.el5xen-2.0.5-1.el5
2.
[root@cvtsfcwebhost Drivers for kernel 2.6.18-128.el5]#
/etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
3.
[root@cvtsfcwebhost oraclesoft]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
4.
[root@cvtsfcwebhost oraclesoft]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [ OK ]
tail -f /var/log/oracleasm
Unable to open device "/dev/cciss/c0d1p7": Device or resource busy
卸載分區目錄
fuser -km /u01/
umount /u01/
怎么在linux下查看格式化的信息
mkfs -t ext3 /dev/cciss/c0d1p7
mount -t ext3 /dev/cciss/c0d1p7 /u01/
mount -t ext3 /dev/cciss/c0d1p1 /u05/
cvtdbtest
5.配置和啟動CSS(Cluster synchronization service)
/u01/app/oracle/product/10.2.0/db_1/bin/localconfig add
6.[root@cvtsfcwebhost /]# tail -f /var/log/oracleasm
mke2fs /dev/cciss/c0d1p1
dumpe2fs /dev/cciss/c0d1p1
fsck -b 32768 /dev/cciss/c0d1p1
mount /dev/cciss/c0d1p1 /u05/
mount /dev/cciss/c0d1p2 /u04/
7.建立ASM參數文件
vi init+ASM.ora
--------
*.asm_diskstring='ORCL:*'
*.background_dump_dest='/u01/app/oracle/admin/+ASM/bdump'
*.core_dump_dest='/u01/app/oracle/admin/+ASM/cdump'
*.instance_type='asm'
*.large_pool_size=16M
*.remote_login_passwordfile='SHARED'
*.user_dump_dest='/u01/app/oracle/admin/+ASM/udump'
8.創建asm實例密碼文件
orapwd file=$ORACLE_HOME/dbs/orapw+ASM password=oracle entries=10
9.啟動ASM實例
[oracle@cvtsfcwebhost dbs]$ export ORACLE_SID=+ASM
[oracle@cvtsfcwebhost dbs]$ sqlplus / as sysdba
SQL> startup
SQL> create spfile from pfile;
SQL> create diskgroup dgroup1 external redundancy
disk 'ORCL:VOL1','ORCL:VOL2';
SQL> select name,state from v$asm_diskgroup;
SQL> alter diskgroup dgroup1 mount;
10.創建ASM數據庫
執行dbca操作,選擇asm選項
后面的操作跟以前的file system的操作是一樣
關閉asm數據庫的步驟如下
[oracle@cvtsfcwebhost cvtdbtest]$ export ORACLE_SID=cvtdbtest
SQL> shutdown immediate
[oracle@cvtsfcwebhost ~]$ export ORACLE_SID=+ASM
SQL> shutdown immediate
啟動asm數據庫的步驟如下
[oracle@cvtsfcwebhost ~]$ export ORACLE_SID=+ASM
[oracle@cvtsfcwebhost ~]$ sqlplus / as sysdba
SQL> startup
[oracle@cvtsfcwebhost cvtdbtest]$ export ORACLE_SID=cvtdbtest
[oracle@cvtsfcwebhost cvtdbtest]$ sqlplus / as sysdba
SQL> startup
創建表空間的腳本如下:
create tablespace sntableone
datafile '+DGROUP1/cvtdbtest/datafile/sntableone.dbf' size 50m autoextend on
next 1m maxsize unlimited
extent management local autoallocate
blocksize 8k
segment space management auto
flashback on
問題點
1.[oracle@cvtsfcwebhost ~]$ emctl status dbconsole
重建em資料---emca -repos recreate
配置dbcontrol---emca -config dbcontrol db
2.cat /etc/hosts
10.161.196.39 cvtsfcwebhost
lsnrctl status
TNS-12545: Connect failed because target host or
object does not exist
3.服務器重啟報ORA-29701: unable to connect to Cluster Manager
[root@cvtsfcwebhost ~]# /u01/app/oracle/product/10.2.0/db_1/bin/localconfig delete
[root@cvtsfcwebhost ~]# /u01/app/oracle/product/10.2.0/db_1/bin/localconfig add |
|