2013年(350)
分类: Oracle
2013-04-25 11:03:53
接上...............
8、磁盘分区
例如:
[root@node1 ~]# 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-102, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-102, default 102):
Using default value 102
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
需要你输入的依次是"n/p/1/回车/回车/w"。
就本例而言,需要我们进行分区的有4个:sdb,sdc,sde,sdf
全分完后fdisk -l看一下,应该是这种形式:
[root@node1 ~]# fdisk -l
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 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 166 1228972+ 82 Linux swap / Solaris
/dev/sda3 167 1044 7052535 83 Linux
Disk /dev/sdb: 107 MB, 107374080 bytes
64 heads, 32 sectors/track, 102 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 102 104432 83 Linux
Disk /dev/sdc: 322 MB, 322122240 bytes
64 heads, 32 sectors/track, 307 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 307 314352 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
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
9、安装 oracleasmlib 程序包
所需的程序包可以到这里下载:
注意一定要与操作系统版本相符。
包还真不少,本着宁可无用,不能无有的原则,能下到的统统装上
俺装的包有下列:
[root@node1 rhel5]# ls -l
total 225376
-rwxr--r-- 1 oracle oinstall 410476 May 29 15:16 compat-binutils215-2.15.92.0.2-24.i386.rpm
-rwxr--r-- 1 oracle oinstall 4256 May 29 15:16 compat-libcwait-2.1-1.i386.rpm
-rwxr--r-- 1 oracle oinstall 88787 May 29 15:17 compat-libstdc++-egcs-1.1.2-1.i386.rpm
-rwxr--r-- 1 oracle oinstall 3840 May 29 15:17 compat-oracle-el5-1.0-5.i386.rpm
-rwxr--r-- 1 oracle oinstall 1079629 May 29 15:17 openmotif21-2.1.30-11.EL5.i386.rpm
-rwxr--r-- 1 oracle oinstall 122314 May 29 15:17 openmotif21-debuginfo-2.1.30-11.EL5.i386.rpm
-rwxr--r-- 1 oracle oinstall 125313 May 30 15:02 oracleasm-2.6.18-53.el5-2.0.4-1.el5.i686.rpm
-rwxr--r-- 1 oracle oinstall 126085 May 30 15:02 oracleasm-2.6.18-53.el5debug-2.0.4-1.el5.i686.rpm
-rwxr--r-- 1 oracle oinstall 125927 May 30 15:02 oracleasm-2.6.18-53.el5PAE-2.0.4-1.el5.i686.rpm
-rwxr--r-- 1 oracle oinstall 123346 May 30 15:02 oracleasm-2.6.18-53.el5xen-2.0.4-1.el5.i686.rpm
-rwxr--r-- 1 oracle oinstall 13658 May 30 15:13 oracleasmlib-2.0.3-1.el5.i386.rpm
-rwxr--r-- 1 oracle oinstall 22936 May 30 15:13 oracleasm-support-2.0.4-1.el5.i386.rpm
-rwxr--r-- 1 oracle oinstall 10662 May 29 15:17 xorg-x11-libs-compat-6.8.2-1.EL.33.0.1.i386.rpm
安装示例:
[root@node1 rhel5]# rpm -ivh compat-binutils215-2.15.92.0.2-24.i386.rpm
Preparing... ########################################### [100%]
1:compat-binutils215 ########################################### [100%]
提示,如果在安装过程中提示你缺少其它包,你可以先到操作系统安装光盘中寻找并安装所需系统包,然后再来安装下载到的包。
10、配置裸设备
由于RHEL5中取消了rawdevices,如果不想将映射命令放到rc.local中的话,我们就需要将其配置到/etc/udev/rules.d/文件夹中
修改文件
[root@node1 ~]# vi /etc/udev/rules.d/60-raw.rules
增加如下内容:
ACTION=="add", KERNEL=="/dev/sdb1",RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="17",RUN+="/bin/raw /dev/raw/raw1 %M %m"
ACTION=="add", KERNEL=="/dev/sdc1",RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="33",RUN+="/bin/raw /dev/raw/raw2 %M %m"
ACTION=="add", KERNEL=="/dev/sdd1",RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="49",RUN+="/bin/raw /dev/raw/raw3 %M %m"
ACTION=="add", KERNEL=="/dev/sde1",RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="65",RUN+="/bin/raw /dev/raw/raw4 %M %m"
KERNEL=="raw[1-4]", OWNER="", GROUP="oinstall", MODE="640"
提示:要根据你的实际情况来配置
另外关于此处的配置有一点非常奇怪,我看到red hat官方文档中关于raw.rule的示例中说KERNEL==..或ENV{MAJOR}...只需要任意配置一个就可以,但我在具体配置过程中发现百试不爽,我尝试了各种组合发现都不生效,必须二者同时配置才可以,难道是俺用的内核版本太低了?百思不得其解,如有达人已深究其内幕,望助我解惑~~~~
重启下服务:
[root@node1 ~]# start_udev
Starting udev: [ OK ]
验证一下
[root@node1 ~]# ls /dev/raw/ -l
total 0
crw-r----- 1 oracle oinstall 162, 1 Jun 6 17:57 raw1
crw-r----- 1 oracle oinstall 162, 2 Jun 6 17:57 raw2
crw-r----- 1 oracle oinstall 162, 3 Jun 6 17:57 raw3
crw-r----- 1 oracle oinstall 162, 4 Jun 6 17:57 raw4
OK,前期设置完成。En,有点儿麻烦,但运气还算不错,在这些操作上你基本不会遇到什么问题。
=============================================