环境:
OS:Red Hat Linux As 6
准备安装在Linux as 6上安装rac,因为oracle没有提供针对as6的asmlib, 这里只能采用udev的方式实现,在/etc/udev/rules.d目录下创建了规则文件
99-oracle-asmdevices.rules,内容如下:
[root@node1 rules.d]# more 99-oracle-asmdevices.rules
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARD
DISK_VB89c8ba2c-f20b8df1", NAME="asm-crs1", OWNER="grid", GROUP="asmdba", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARD
DISK_VBd1eef806-00def761", NAME="asm-crs2", OWNER="grid", GROUP="asmdba", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARD
DISK_VB25efb5bc-25eed08b", NAME="asm-crs3", OWNER="grid", GROUP="asmdba", MODE="0660"
机器重新启动后,在节点1和节点2的/dev目录下看到了asm磁盘,说明规则文件已经生效了.
[root@node1 dev]# ls -al asm*
brw-rw----. 1 grid asmdba 8, 16 Feb 20 11:31 asm-crs1
brw-rw----. 1 grid asmdba 8, 32 Feb 20 11:31 asm-crs2
brw-rw----. 1 grid asmdba 8, 48 Feb 20 11:31 asm-crs3
[root@node2 /]# cd dev
[root@node2 dev]# ls -al asm*
brw-rw----. 1 grid asmdba 8, 16 Feb 20 11:39 asm-crs1
brw-rw----. 1 grid asmdba 8, 32 Feb 20 11:39 asm-crs2
brw-rw----. 1 grid asmdba 8, 48 Feb 20 11:39 asm-crs3
但是在两个节点上使用fdisk查看不到原来的硬盘了,奇怪了.
[root@node1 rules.d]# fdisk -l
Disk /dev/sda: 32.4 GB, 32428654592 bytes
255 heads, 63 sectors/track, 3942 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000eab1
Device Boot Start End Blocks Id System
/dev/sda1 * 1 3570 28672000 83 Linux
/dev/sda2 3570 3943 2995200 82 Linux swap / Solaris
估计是udev没有启动,于是分别在两个节点上使用如下命令启动udev.
start_udev
启动完成之后,再次查看,果然看到了原来的磁盘.
[root@node1 ~]# fdisk -l
Disk /dev/sda: 32.4 GB, 32428654592 bytes
255 heads, 63 sectors/track, 3942 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000eab1
Device Boot Start End Blocks Id System
/dev/sda1 * 1 3570 28672000 83 Linux
/dev/sda2 3570 3943 2995200 82 Linux swap / Solaris
Disk /dev/sdb: 1181 MB, 1181947904 bytes
255 heads, 63 sectors/track, 143 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdc: 1181 MB, 1181947904 bytes
255 heads, 63 sectors/track, 143 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdd: 1181 MB, 1181947904 bytes
255 heads, 63 sectors/track, 143 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
为了使udev自动生效,修改如下文件
vim /etc/rc.d/rc.local
将udev启动加入到该文件中即可.
/sbin/start_udev
-- The End --
阅读(2137) | 评论(0) | 转发(0) |