- libaio-0.3.105-2.i386.rpm
- openmotif21-2.1.30-11.RHEL4.6.i386.rpm
2、配置内核参数。使用文本编辑器将下面列出的行添加到 /etc/sysctl.conf。要使更改立即生效,请执行 /sbin/sysctl –p。
# more /etc/sysctl.conf kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 1048576 net.core.rmem_max = 1048576 net.core.wmem_default = 262144 net.core.wmem_max = 262144
修改 /etc/hosts 文件。
# more /etc/hosts 127.0.0.1 localhost 192.168.2.131 rac1 192.168.2.31 rac1-vip 10.10.10.31 rac1-priv 192.168.2.132 rac2 192.168.2.32 rac2-vip 10.10.10.32 rac2-priv
配置 hangcheck timer 内核模块。hangcheck timer 内核模块可监控系统的运行情况,并重新启动出现故障的 RAC 节点。它使用两个参数,即 hangcheck_tick(定义系统检查频率)和 hangcheck_margin(定义在重置 RAC 节点前的最大挂起延时)来确定节点是否出现故障。
在 /etc/modprobe.conf 中添加以下行,以设置 hangcheck 内核模块参数。
/etc/modprobe.conf
options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180
要立即加载模块,执行“modprobe -v hangcheck-timer”。
为 OCFS2 和 Oracle ASM 创建磁盘分区。为 OCFS2 (/dev/sdb) 和 Oracle ASM(/dev/sdc、/dev/sdd、/dev/sde)准备一组原始磁盘。
在 rac1 上,以 root 用户身份执行
# 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-512, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-512, default 512): Using default value 512 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
# fdisk /dev/sdc
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-391, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-391, default 391): Using default value 391 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
# fdisk /dev/sdd
Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-391, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-391, default 391): Using default value 391 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
# fdisk /dev/sde
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): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-261, default 261): Using default value 261 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
# 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 910 7309543+ 83 Linux /dev/sda2 911 1170 2088450 82 Linux swap /dev/sda3 1171 2610 11566800 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 安装 oracleasmlib 程序包。 从 OTN 下载 ASM 库,并以 root 用户身份安装 ASM RPM。
# rpm -Uvh oracleasmlib-2.0.2-1.i386.rpm Preparing... ########################################### [100%] 1:oracleasmlib ########################################### [100%]
在这个阶段,您应该已经安装了以下 ASM 程序包。
[root@rac1 swdl]# rpm -qa | grep oracleasm oracleasm-support-2.0.3-2 oracleasm-2.6.9-42.0.0.0.1.ELsmp-2.0.3-2 oracleasmlib-2.0.2-1为 ASM 磁盘映射原始设备。 仅当您打算使用标准 Linux I/O 创建 ASM 磁盘时,才需要原始设备映射。创建 ASM 磁盘的另一个方法是使用 Oracle 提供的 ASM 库驱动程序。稍后,您将使用 ASM 库驱动程序配置 ASM 磁盘。
执行以下任务,将原始设备映射到先前创建的共享分区。每次引导集群节点时,原始设备都必须与块设备绑定。
将以下行添加到 /etc/sysconfig/rawdevices 中。
/etc/sysconfig/rawdevices
/dev/raw/raw1 /dev/sdc1 /dev/raw/raw2 /dev/sdd1 /dev/raw/raw3 /dev/sde1要使映射立即生效,以 root 用户身份执行以下命令:
# /sbin/service rawdevices restart Assigning devices: /dev/raw/raw1 --> /dev/sdc1 /dev/raw/raw1: bound to major 8, minor 33 /dev/raw/raw2 --> /dev/sdd1 /dev/raw/raw2: bound to major 8, minor 49 /dev/raw/raw3 --> /dev/sde1 /dev/raw/raw3: bound to major 8, minor 65 done # chown oracle:dba /dev/raw/raw[1-3] # chmod 660 /dev/raw/raw[1-3] # ls -lat /dev/raw/raw* crw-rw---- 1 oracle dba 162, 3 Nov 4 07:04 /dev/raw/raw3 crw-rw---- 1 oracle dba 162, 2 Nov 4 07:04 /dev/raw/raw2 crw-rw---- 1 oracle dba 162, 1 Nov 4 07:04 /dev/raw/raw1
以 oracle 用户身份执行
rac1-> ln -sf /dev/raw/raw1 /u01/oradata/devdb/asmdisk1 rac1-> ln -sf /dev/raw/raw2 /u01/oradata/devdb/asmdisk2 rac1-> ln -sf /dev/raw/raw3 /u01/oradata/devdb/asmdisk3
修改 /etc/udev/permissions.d/50-udev.permissions。原始设备在引导时会重新映射。默认情况下,在引导时原始设备的拥有者将更改为 root 用户。如果拥有者不是 oracle 用户,则 ASM 在访问共享分区时会出现问题。在 /etc/udev/permissions.d/50-udev.permissions 中为原始行“raw/*:root:disk:0660”添加注释,然后添加一个新行“raw/*:oracle:dba:0660”。
/etc/udev/permissions.d/50-udev.permissions
# raw devices ram*:root:disk:0660 #raw/*:root:disk:0660 raw/*:oracle:dba:0660
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8334342/viewspace-374510/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8334342/viewspace-374510/