在安装oracle rac 时候,我们安装grid 的时候,首先就要安装asmlib,安装asmlib 又要安装一大推的包,比较麻烦,在linux下其实我们可以直接采用udev,这个比安装asmlib简单快捷多了!对比这2种的性能可以参考:
步骤如下:
1:查看磁盘:
-
[root@rac1 bin]# fdisk -l
-
-
Disk /dev/sda: 53.6 GB, 53687091200 bytes
-
255 heads, 63 sectors/track, 6527 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 6527 52323705 8e Linux LVM
-
-
Disk /dev/sdf: 234 MB, 234881024 bytes
-
8 heads, 56 sectors/track, 1024 cylinders
-
Units = cylinders of 448 * 512 = 229376 bytes
-
-
Disk /dev/sdf doesn't contain a valid partition table
-
-
Disk /dev/sdg: 234 MB, 234881024 bytes
-
8 heads, 56 sectors/track, 1024 cylinders
-
Units = cylinders of 448 * 512 = 229376 bytes
-
-
Disk /dev/sdg doesn't contain a valid partition table
-
-
Disk /dev/sdh: 234 MB, 234881024 bytes
-
8 heads, 56 sectors/track, 1024 cylinders
-
Units = cylinders of 448 * 512 = 229376 bytes
-
-
Disk /dev/sdh doesn't contain a valid partition table
-
-
Disk /dev/sdi: 234 MB, 234881024 bytes
-
8 heads, 56 sectors/track, 1024 cylinders
-
Units = cylinders of 448 * 512 = 229376 bytes
-
-
Disk /dev/sdi doesn't contain a valid partition table
-
-
Disk /dev/sdj: 234 MB, 234881024 bytes
-
8 heads, 56 sectors/track, 1024 cylinders
-
Units = cylinders of 448 * 512 = 229376 bytes
-
-
Disk /dev/sdj doesn't contain a valid partition table
-
-
Disk /dev/sdk: 234 MB, 234881024 bytes
-
8 heads, 56 sectors/track, 1024 cylinders
-
Units = cylinders of 448 * 512 = 229376 bytes
-
-
Disk /dev/sdk doesn't contain a valid partition table
-
-
Disk /dev/sdl: 1073 MB, 1073741824 bytes
-
34 heads, 61 sectors/track, 1011 cylinders
-
Units = cylinders of 2074 * 512 = 1061888 bytes
-
-
Disk /dev/sdl doesn't contain a valid partition table
2:获取设备标识号:
-
[root@rac1 bin]# scsi_id -g -u -s /block/sdf
-
14f504e46494c4500703059654c6f2d4e505a4d2d44443766
-
[root@rac1 bin]# scsi_id -g -u -s /block/sdg
-
14f504e46494c45006b736a4639552d777832352d52414243
-
[root@rac1 bin]# scsi_id -g -u -s /block/sdh
-
14f504e46494c45003133737652392d4c764f512d35394251
-
[root@rac1 bin]# scsi_id -g -u -s /block/sdi
-
14f504e46494c45007466583253382d6a4f656d2d42593578
-
[root@rac1 bin]# scsi_id -g -u -s /block/sdj
-
14f504e46494c45003073306832582d376d42742d5a506c64
-
[root@rac1 bin]# scsi_id -g -u -s /block/sdk
-
14f504e46494c450064553448314a2d613977692d4338336a
-
[root@rac1 bin]# scsi_id -g -u -s /block/sdl
-
14f504e46494c45003276483144522d6a7375652d5a476b67
-
[root@rac1 bin]#
如果设备较多,可以根据需要写个脚本!
3:创建配置文件,文件要创建到/dev/udev/rules.d/ 目录下面:
-
[root@rac1 bin]#vi 99-oracleasm.rules
-
KERNEL=="sdf",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c4500703059654c6f2d4e505a4d2d44443766",NAME="asm-votedisk01",OWNER="grid",GROUP="oinstall",MODE="0660
-
KERNEL=="sdg",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c45006b736a4639552d777832352d52414243",NAME="asm-votedisk02",OWNER="grid",GROUP="oinstall",MODE="0660
-
KERNEL=="sdh",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c45003133737652392d4c764f512d35394251",NAME="asm-votedisk03",OWNER="grid",GROUP="oinstall",MODE="0660
-
KERNEL=="sdi",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c45007466583253382d6a4f656d2d42593578",NAME="asm-votedisk04",OWNER="grid",GROUP="oinstall",MODE="0660
-
KERNEL=="sdj",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c45003073306832582d376d42742d5a506c64",NAME="asm-ocrdisk01",OWNER="grid",GROUP="oinstall",MODE="0660
-
KERNEL=="sdk",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c450064553448314a2d613977692d4338336a",NAME="asm-ocrdisk02",OWNER="grid",GROUP="oinstall",MODE="0660
-
KERNEL=="sdl",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c45003276483144522d6a7375652d5a476b67",NAME="asm-ocrdisk03",OWNER="grid",GROUP="oinstall",MODE="0660
4:启用udev
[root@rac1 bin]# start_udev
Starting udev: [ OK ]
[root@rac1 bin]#
5:检查文件是否到位
-
[root@rac1 bin]# cd /dev/
-
[root@rac1 dev]# ll *asm*
-
brw-r----- 1 grid oinstall 8, 144 Apr 27 08:38 asm-ocrdisk01
-
brw-r----- 1 grid oinstall 8, 160 Apr 27 07:45 asm-ocrdisk02
-
brw-r----- 1 grid oinstall 8, 176 Apr 28 05:53 asm-ocrdisk03
-
brw-r----- 1 grid oinstall 8, 80 Apr 28 05:54 asm-votedisk01
-
brw-r----- 1 grid oinstall 8, 96 Apr 28 05:54 asm-votedisk02
-
brw-r----- 1 grid oinstall 8, 112 Apr 28 05:54 asm-votedisk03
-
brw-r----- 1 grid oinstall 8, 128 Apr 28 05:54 asm-votedisk04
6:再另外节点也做相同操作
7:接下来就可以可是安装 grid 了!
阅读(6477) | 评论(0) | 转发(1) |