Chinaunix首页 | 论坛 | 博客
  • 博客访问: 592736
  • 博文数量: 57
  • 博客积分: 877
  • 博客等级: 准尉
  • 技术积分: 1275
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-24 16:16
文章分类

全部博文(57)

文章存档

2014年(2)

2013年(15)

2012年(20)

2011年(20)

我的朋友

分类: Oracle

2012-04-28 10:02:23

在安装oracle rac 时候,我们安装grid 的时候,首先就要安装asmlib,安装asmlib 又要安装一大推的包,比较麻烦,在linux下其实我们可以直接采用udev,这个比安装asmlib简单快捷多了!对比这2种的性能可以参考:

 

步骤如下:

1:查看磁盘:

  

  1. [root@rac1 bin]# fdisk -l
  2. Disk /dev/sda: 53.6 GB, 53687091200 bytes
  3. 255 heads, 63 sectors/track, 6527 cylinders
  4. Units = cylinders of 16065 * 512 = 8225280 bytes
  5. Device Boot Start End Blocks Id System
  6. /dev/sda1 * 1 13 104391 83 Linux
  7. /dev/sda2 14 6527 52323705 8e Linux LVM
  8. Disk /dev/sdf: 234 MB, 234881024 bytes
  9. 8 heads, 56 sectors/track, 1024 cylinders
  10. Units = cylinders of 448 * 512 = 229376 bytes
  11. Disk /dev/sdf doesn't contain a valid partition table
  12. Disk /dev/sdg: 234 MB, 234881024 bytes
  13. 8 heads, 56 sectors/track, 1024 cylinders
  14. Units = cylinders of 448 * 512 = 229376 bytes
  15. Disk /dev/sdg doesn't contain a valid partition table
  16. Disk /dev/sdh: 234 MB, 234881024 bytes
  17. 8 heads, 56 sectors/track, 1024 cylinders
  18. Units = cylinders of 448 * 512 = 229376 bytes
  19. Disk /dev/sdh doesn't contain a valid partition table
  20. Disk /dev/sdi: 234 MB, 234881024 bytes
  21. 8 heads, 56 sectors/track, 1024 cylinders
  22. Units = cylinders of 448 * 512 = 229376 bytes
  23. Disk /dev/sdi doesn't contain a valid partition table
  24. Disk /dev/sdj: 234 MB, 234881024 bytes
  25. 8 heads, 56 sectors/track, 1024 cylinders
  26. Units = cylinders of 448 * 512 = 229376 bytes
  27. Disk /dev/sdj doesn't contain a valid partition table
  28. Disk /dev/sdk: 234 MB, 234881024 bytes
  29. 8 heads, 56 sectors/track, 1024 cylinders
  30. Units = cylinders of 448 * 512 = 229376 bytes
  31. Disk /dev/sdk doesn't contain a valid partition table
  32. Disk /dev/sdl: 1073 MB, 1073741824 bytes
  33. 34 heads, 61 sectors/track, 1011 cylinders
  34. Units = cylinders of 2074 * 512 = 1061888 bytes
  35. Disk /dev/sdl doesn't contain a valid partition table

2:获取设备标识号:


 

点击(此处)折叠或打开

  1. [root@rac1 bin]# scsi_id -g -u -s /block/sdf
  2. 14f504e46494c4500703059654c6f2d4e505a4d2d44443766
  3. [root@rac1 bin]# scsi_id -g -u -s /block/sdg
  4. 14f504e46494c45006b736a4639552d777832352d52414243
  5. [root@rac1 bin]# scsi_id -g -u -s /block/sdh
  6. 14f504e46494c45003133737652392d4c764f512d35394251
  7. [root@rac1 bin]# scsi_id -g -u -s /block/sdi
  8. 14f504e46494c45007466583253382d6a4f656d2d42593578
  9. [root@rac1 bin]# scsi_id -g -u -s /block/sdj
  10. 14f504e46494c45003073306832582d376d42742d5a506c64
  11. [root@rac1 bin]# scsi_id -g -u -s /block/sdk
  12. 14f504e46494c450064553448314a2d613977692d4338336a
  13. [root@rac1 bin]# scsi_id -g -u -s /block/sdl
  14. 14f504e46494c45003276483144522d6a7375652d5a476b67
  15. [root@rac1 bin]#
如果设备较多,可以根据需要写个脚本!

3:创建配置文件,文件要创建到/dev/udev/rules.d/ 目录下面:

  1. [root@rac1 bin]#vi 99-oracleasm.rules
  2. KERNEL=="sdf",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c4500703059654c6f2d4e505a4d2d44443766",NAME="asm-votedisk01",OWNER="grid",GROUP="oinstall",MODE="0660
  3. KERNEL=="sdg",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c45006b736a4639552d777832352d52414243",NAME="asm-votedisk02",OWNER="grid",GROUP="oinstall",MODE="0660
  4. KERNEL=="sdh",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c45003133737652392d4c764f512d35394251",NAME="asm-votedisk03",OWNER="grid",GROUP="oinstall",MODE="0660
  5. KERNEL=="sdi",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c45007466583253382d6a4f656d2d42593578",NAME="asm-votedisk04",OWNER="grid",GROUP="oinstall",MODE="0660
  6. KERNEL=="sdj",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c45003073306832582d376d42742d5a506c64",NAME="asm-ocrdisk01",OWNER="grid",GROUP="oinstall",MODE="0660
  7. KERNEL=="sdk",BUS=="scsi",PROGRAM=="/sbin/scsi_id -g -u -s %p",RESULT=="14f504e46494c450064553448314a2d613977692d4338336a",NAME="asm-ocrdisk02",OWNER="grid",GROUP="oinstall",MODE="0660
  8. 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:检查文件是否到位

点击(此处)折叠或打开

  1. [root@rac1 bin]# cd /dev/
  2. [root@rac1 dev]# ll *asm*
  3. brw-r----- 1 grid oinstall 8, 144 Apr 27 08:38 asm-ocrdisk01
  4. brw-r----- 1 grid oinstall 8, 160 Apr 27 07:45 asm-ocrdisk02
  5. brw-r----- 1 grid oinstall 8, 176 Apr 28 05:53 asm-ocrdisk03
  6. brw-r----- 1 grid oinstall 8, 80 Apr 28 05:54 asm-votedisk01
  7. brw-r----- 1 grid oinstall 8, 96 Apr 28 05:54 asm-votedisk02
  8. brw-r----- 1 grid oinstall 8, 112 Apr 28 05:54 asm-votedisk03
  9. brw-r----- 1 grid oinstall 8, 128 Apr 28 05:54 asm-votedisk04

6:再另外节点也做相同操作

7:接下来就可以可是安装 grid 了!


 



阅读(6477) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~