ASM安装和配置
环境:
oracle版本:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
操作系统:Red Hat Enterprise Linux Server release 5.5 (Tikanga)
1、 首先安装oracle数据库软件,然后向虚拟机中添加三块2G的硬盘,重启虚拟机
2、 安装软件包:
21、查看好系统版本,本机是redhat 5linux安装数据库,内核版本如下:
[root@server3 dev]# uname -a
Linux server32.6.18-194.el5#1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux
2.2、上oracle,搜索关键字oracle asm red hat 5。去下载如下asm的三个rpm软件包
(本机器下载的是标红的三个软件包,安装包一定要下载正确的版本否则第五步会出错,导致后续配置无法进行):
acle/technetwork/topics/linux/downloads/rhel5-084877.html
Intel IA32 (x86) Architecture
Library and Tools
        oracleasm-support-2.1.3-1.el5.i386.rpm
        oracleasmlib-2.0.4-1.el5.i386.rpm
Drivers for kernel 2.6.18-194.el5
        oracleasm-2.6.18-194.el5xen-2.0.5-1.el5.i686.rpm
        oracleasm-2.6.18-194.el5debug-2.0.5-1.el5.i686.rpm
        oracleasm-2.6.18-194.el5PAE-2.0.5-1.el5.i686.rpm
        oracleasm-2.6.18-194.el5-debuginfo-2.0.5-1.el5.i686.rpm
        oracleasm-2.6.18-194.el5-2.0.5-1.el5.i686.rpm
 
2.3、安装上述的三个rpm软件包:
[root@server3 asm]# rpm -ivh *.rpm
warning: oracleasm-2.6.18-194.11.3.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
>>>>>>>>### [100%]
1:oracleasm-support>>>>>>>>### [ 33%]
2:oracleasm-2.6.18-194.el>>>>>>>### [ 67%]
3:oracleasmlib >>>>>>>>### [100%]
3、 对在1中添加进来的三个磁盘进行分区(我们添加了sdbsdcsdd。注意:这里是仅进行分区,而不需要进行格式化。
[root@server3 dev]# ls sd*
sda sda1 sda2 sdb sdc sdd
[root@server3 dev]# fdisk /dev/sdb
Command (m for help):n
Command action
  e  extended
  p  primary partition (1-4)
p
Partition number (1-4):1           
First cylinder (1-261, default 1):1 
Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):261
 
Command (m for help):w
The partition table has been altered!
 
Calling ioctl() to re-read partition table.
Syncing disks.
同样执行如下的命令,来对sdcsdd进行分区:
[root@server3 dev]# fdisk /dev/sdc
[root@server3 dev]# fdisk /dev/sdd
 
查看并确认分区的情况:
[root@server3 dev]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot    Start        End    Blocks  Id System
/dev/sda1  *          1        13    104391  83 Linux
/dev/sda2            14      2610  20860402+ 8e Linux LVM
Disk /dev/sdb: 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/sdb1              1        261    2096451  83 Linux
Disk /dev/sdc: 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/sdc1              1        261    2096451  83 Linux
Disk /dev/sdd: 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/sdd1              1        261    2096451  83 Linux
4、 配置ASM
[root@server3 asm]# /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 [ ]:oinstall
Start Oracle ASM library driver on boot (y/n) [y]:
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                    [ OK ]
Scanning the system for Oracle ASMLib disks:              [ OK ]
5、 系统添加磁盘:
[root@server3 asm]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "VOL1" as an ASM disk:                      [ OK ]
[root@server3 asm]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdc1
Marking disk "VOL2" as an ASM disk:                      [ OK ]
[root@server3 asm]# /etc/init.d/oracleasm createdisk VOL3 /dev/sdd1

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。

发表评论