当前位置:  数据库>oracle

手动创建Oracle 10g ASM磁盘组

    来源: 互联网  发布时间:2017-04-12

    本文导语: 准备环境: Oracle 10g 联机文档、已经配置10g数据库软件的主机、oracleasm library rpm包、2块5GB硬盘 1、  查看本机磁盘信息 [root@shiyueasm~]# fdisk -l   Disk/dev/sda: 16.1 GB, 16106127360 bytes 255 heads,63 sectors/track, 1958 cylinders Units =cylinders of 16065 * ...

准备环境:

Oracle 10g 联机文档、已经配置10g数据库软件的主机、oracleasm library rpm包、2块5GB硬盘

1、  查看本机磁盘信息

[root@shiyueasm~]# fdisk -l

 

Disk/dev/sda: 16.1 GB, 16106127360 bytes

255 heads,63 sectors/track, 1958 cylinders

Units =cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot      Start         End      Blocks  Id  System

/dev/sda1   *        307        1958    13269690  83  Linux

/dev/sda2               1         306    2457913+  82 Linux swap

 

Partitiontable entries are not in disk order

 

Disk/dev/sdb: 10.7 GB, 10737418240 bytes

255heads, 63 sectors/track, 1305 cylinders

Units =cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot      Start         End      Blocks  Id  System

/dev/sdb1   *          1        1305    10482381  83  Linux

 

Disk/dev/sdc: 5368 MB, 5368709120 bytes

255heads, 63 sectors/track, 652 cylinders

Units =cylinders of 16065 * 512 = 8225280 bytes

 

Disk/dev/sdc doesn't contain a valid partition table

 

Disk/dev/sdd: 5368 MB, 5368709120 bytes

255heads, 63 sectors/track, 652 cylinders

Units =cylinders of 16065 * 512 = 8225280 bytes

 

Disk /dev/sdd doesn't contain a validpartition table

2、  对新添加的2块磁盘进行分区

[root@shiyueasm~]# fdisk /dev/sdc

Devicecontains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Buildinga new DOS disklabel. Changes will remain in memory only,

until youdecide to write them. After that, of course, the previous

contentwon't be recoverable.

 

Warning:invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

Command(m for help): n

Commandaction

   e  extended

   p  primary partition (1-4)

p

Partitionnumber (1-4): 1

Firstcylinder (1-652, default 1):

Usingdefault value 1

Lastcylinder or +size or +sizeM or +sizeK (1-652, default 652):

Usingdefault value 652

 

Command(m for help): w

Thepartition table has been altered!

 

Callingioctl() to re-read partition table.

Syncingdisks.

[root@shiyueasm~]# fdisk /dev/sdd

Devicecontains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Buildinga new DOS disklabel. Changes will remain in memory only,

until youdecide to write them. After that, of course, the previous

contentwon't be recoverable.

 

Warning:invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

Command(m for help): n

Commandaction

   e  extended

   p  primary partition (1-4)

p

Partitionnumber (1-4): 1

Firstcylinder (1-652, default 1):

Usingdefault value 1

Lastcylinder or +size or +sizeM or +sizeK (1-652, default 652):

Usingdefault value 652

 

Command(m for help): w

Thepartition table has been altered!

 

Callingioctl() to re-read partition table.

Syncing disks.

 

3、  上传 oracle asmlibrary rpm包并对上传的包进行安装

[root@shiyueasmu01]# cd asm rpm for rhel4.0/

[root@shiyueasmasm rpm for rhel4.0]# ll

total 236

-rw-r--r--  1 root root 129218 Apr 29  2010oracleasm-2.6.9-42.ELsmp-2.0.3-1.i686.rpm

-rw-r--r--  1 root root 13105 Apr 29  2010oracleasmlib-2.0.4-1.el4.i386.rpm

-rw-r--r--  1 root root 82542 Apr 29  2010oracleasm-support-2.1.3-1.el4.i386.rpm

[root@shiyueasmasm rpm for rhel4.0]# rpm -ivh *

warning:oracleasmlib-2.0.4-1.el4.i386.rpm: V3 DSA signature: NOKEY, key ID b38a8516

Preparing...               ########################################### [100%]

   1:oracleasm-support     ########################################### [ 33%]

  2:oracleasm-2.6.9-42.ELsm########################################### [67%]

   3:oracleasmlib          ########################################### [100%]

 

4、  配置ASM驱动

[root@shiyueasm~]# /etc/init.d/oracleasm configure

Configuringthe Oracle ASM library driver.

 

This willconfigure the on-boot properties of the Oracle ASM library

driver.  The following questions will determinewhether the driver is

loaded onboot and what permissions it will have. The current values

will beshown in brackets ('[]').  Hitting without typing an

answerwill keep that current value.  Ctrl-Cwill abort.

 

Defaultuser to own the driver interface []: oracle

Defaultgroup to own the driver interface []: oinstall

StartOracle ASM library driver on boot (y/n) [n]: y

Scan forOracle ASM disks on boot (y/n) [y]:

WritingOracle ASM library driver configuration: done

Initializingthe Oracle ASMLib driver: [  OK  ]

Scanning the system for Oracle ASMLibdisks: [  OK  ]

5、  创建ASM磁盘组

[root@shiyueasm~]# /etc/init.d/oracleasm createdisk VOL01 '/dev/sdc1'

Markingdisk "VOL02" as an ASM disk: [ OK  ]

[root@shiyueasm~]# /etc/init.d/oracleasm createdisk VOL02 '/dev/sdd1'

Marking disk "VOL01" as anASM disk: [  OK  ]

6、  手动创建磁盘组参数文件

[oracle@shiyueasm~]$ cd $ORACLE_HOME/dbs

[oracle@shiyueasmdbs]$ ll

total 48

-rw-r--r--  1 oracle oinstall   934 May 26 10:52 db.sql

-rw-rw----  1 oracle oinstall  1544 May 26 10:32 hc_shiyue.dat

-rw-r-----  1 oracle oinstall 12920 May  3  2001initdw.ora

-rw-r-----  1 oracle oinstall  8385 Sep 11 1998 init.ora

-rw-r--r--  1 oracle oinstall   996 May 26 10:31 initshiyue.ora

-rw-rw----  1 oracle oinstall    24 May 26 10:52 lkSHIYUE

-rw-r-----  1 oracle oinstall  1536 May 26 10:32 orapwshiyue

[oracle@shiyueasm dbs]$ viinit+ASM.ora

asm_diskstring=''

background_dump_dest=/u01/admin/shiyueasm/bdump

core_dump_dest=/u01/admin/shiyueasm/cdump

user_dump_dest=/u01/admin/shiyueasm/udump

instance_type='asm'

large_pool_size=20m

remote_login_passwordfile='shared'

7、  创建相关目录

[oracle@shiyueasm~]$ mkdir -p /u01/admin/shiyueasm/bdump

[oracle@shiyueasm~]$ mkdir -p /u01/admin/shiyueasm/cdump

[oracle@shiyueasm ~]$ mkdir -p/u01/admin/shiyueasm/udump

8、  切换至ASM实例

[oracle@shiyueasm ~]$ export ORACLE_SID=+ASM


    
 
 
 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • 如何手动调整网卡的half duplex & full duplex ?如何手动调整网卡的10/100M速度?
  • shell 脚本 date 手动执行 和 放在init.d中自动执行的时间不一样
  • FileUpload 控件禁止手动输入
  • Linux打开的文件描述符必须手动close吗
  • 如何手动清除一个对象
  • 请问,怎么手动启动Apache?? 在线等候
  • 关于shell脚本手动运行和自动运行的区别
  • 手动改写了lilo.conf,启动时无法进入linux了,怎么解决?
  • 如何手动控制wu-ftp的启动(100分)
  • 用什么命令可以知道,哪些软件包是自己手动安装的?
  • 2000下怎样手动更改JSWDK 的缺省IP和 缺省端口?
  • 在安装linux7.2时忘了选择FTP,怎样手动安装FTP?
  • 机子的内存需要手动配置吗,请指教!
  • 如何在linux shell 下启动/停止samba共享服务,如何手动配置?
  • 不能识别猫,如何手动配置?
  • 问一个crontab中不能运行手动可以运行的问题
  • linux中手动启动进程
  • 红帽企业Linux.5.4的手动安装
  • 如何在redhat系统中手动断开一个TCP连接
  • shell手动正常 crontab不正常


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3