日期:2014-05-16  浏览次数:20459 次

Oracle ASM操作详细步骤

一.检查虚拟机的相关配置:
[root@rac1 ~]# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:0C:29:E3:7D:59  
          inet addr:10.1.1.210  Bcast:10.1.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fee3:7d59/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7957 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1314 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:615293 (600.8 KiB)  TX bytes:103970 (101.5 KiB)
          Interrupt:10 Base address:0x1480 

[root@rac1 ~]# ping 10.1.1.1
PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
64 bytes from 10.1.1.1: icmp_seq=1 ttl=64 time=58.8 ms

--- 10.1.1.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 58.860/58.860/58.860/0.000 ms

[root@rac1 ~]# rpm -qa |grep oracleasm
oracleasmlib-2.0.3-1.el5
oracleasm-2.6.18-128.el5-2.0.5-1.el5
oracleasm-2.6.18-128.el5debug-2.0.5-1.el5
oracleasm-support-2.1.2-1.el5
oracleasm-2.6.18-128.el5PAE-2.0.5-1.el5
oracleasm-2.6.18-128.el5xen-2.0.5-1.el5


[root@rac1 ~]# fdisk -l

Disk /dev/sda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         765     6144831   83  Linux
/dev/sda2             766         956     1534207+  82  Linux swap / Solaris
/dev/sda3             957        1566     4899825   83  Linux

Disk /dev/sdb: 536 MB, 536870912 bytes
64 heads, 32 sectors/track, 512 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         512      524272   83  Linux

Disk /dev/sdc: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         391     3140676   83  Linux

Disk /dev/sdd: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1         391     3140676   83  Linux

Disk /dev/sde: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1         261     2096451   83  Linux


[root@rac1 ~]# df -h
文件系统              容量  已用 可用 已用% 挂载点
/dev/sda1             5.7G  3.0G  2.5G  55% /
/dev/sda3             4.6G  138M  4.2G   4% /u01
tmpfs                 349M     0  349M   0% /dev/shm
[root@rac1 ~]# 

二.上传database安装介质

安装软件不建库
more ~/.bash_profile 
PATH=$PATH:$HOME/bin

export PS1="`/bin/hostname -s`->"
export EDITOR=vim
export ORACLE_SID=up
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/b
in:/usr/X11R6/bin
umask 022


rac1->cd admin
rac1->mkdir +ASM 
rac1->cd +ASM
rac1->mkdir {a,b,c,u}dump
rac1->ll
总计 16
drwxr-xr-x 2 oracle oinstall 4096 08-12 18:33 adump
drwxr-xr-x 2 oracle oinstall 4096 08-12 18:33 bdump
drwxr-xr-x 2 oracle oinstall 4096 08-12 18:33 cdump
drwxr-xr-x 2 oracle oinstall 4096 08-12 18:33 udump
rac1->pwd
/u01/app/oracle/admin/+ASM


$ORACLE_HOME/dbs
$ vi init+ASM.ora

*.asm_diskstring='ORCL:VOL*'
*.background_dump_dest='/u01/app/oracle/admin/+ASM/bdump'
*.core_dump_dest='/u01/app/oracle/admin/+ASM/cdump'
*.user_dump_dest='/u01/app/oracle/admin/+ASM/udump'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_pa