ASM磁盘配置(Oracle RAC 11g)

ASM磁盘配置

1、规划需要的共享磁盘个数及大小

ASM磁盘配置(Oracle RAC 11g)_第1张图片


注解:以上代码中,”d、e、f”代表加载的共享硬盘sdd~sdf。请根据实际情况修改。 硬盘必须是新硬盘(无分区,没有被格式化),否则Grid无法安装


2、配置ASM磁盘(创建文件99-oracle-asmdevices.rules)


运行下面命令创建配置文件99-oracle-asmdevices.rules

方式一:利用脚本的方式创建99-oracle-asmdevices.rules

ASM磁盘配置(Oracle RAC 11g)_第2张图片

[root@i-5ibi1e5j rules.d]# cat a.sh

#!/bin/bash


echo "options=--whitelisted --replace-whitespace">/etc/scsi_id.config

i=1

id=''

for x in d e f

do
id=`scsi_id --whitelisted --replace-whitespace --device=/dev/sd$x`
echo "KERNEL==\"sd*\", SUBSYSTEM==\"block\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"$id\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"">>/etc/udev/rules.d/99-oracle-asmdevices.rules
let i++

done


3、启动udev




4、检查udev是否正常配置



5、测试udev设备
[root@i-5ibi1e5j dev]# udevadm info --query=all --path=/sys/block/sdd

P: /devices/platform/host6/session1/target6:0:0/6:0:0:0/block/sdd
N: asm-disk1
W: 54
S: block/8:48
S: disk/by-id/scsi-360014059e39a8b6a3014d91b07f4f2f1
S: disk/by-path/ip-172.20.28.35:3260-iscsi-iqn.2014-12.com.qingcloud.s2:sn.target0-lun-0
S: disk/by-id/wwn-0x60014059e39a8b6a3014d91b07f4f2f1
E: UDEV_LOG=3
E: DEVPATH=/devices/platform/host6/session1/target6:0:0/6:0:0:0/block/sdd
E: MAJOR=8
E: MINOR=48
E: DEVNAME=/dev/asm-disk1
E: DEVTYPE=disk
E: SUBSYSTEM=block
E: ID_SCSI=1
E: ID_VENDOR=LIO-ORG
E: ID_VENDOR_ENC=LIO-ORG\x20
E: ID_MODEL=IBLOCK
E: ID_MODEL_ENC=IBLOCK\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E: ID_REVISION=4.0
E: ID_TYPE=disk
E: ID_SERIAL_RAW=360014059e39a8b6a3014d91b07f4f2f1
E: ID_SERIAL=360014059e39a8b6a3014d91b07f4f2f1
E: ID_SERIAL_SHORT=60014059e39a8b6a3014d91b07f4f2f1
E: ID_WWN=0x60014059e39a8b6a
E: ID_WWN_VENDOR_EXTENSION=0x3014d91b07f4f2f1
E: ID_WWN_WITH_EXTENSION=0x60014059e39a8b6a3014d91b07f4f2f1
E: ID_SCSI_SERIAL=9e39a8b6-a301-4d91-b07f-4f2f1eeb33fd
E: ID_BUS=scsi
E: ID_PATH=ip-172.20.28.35:3260-iscsi-iqn.2014-12.com.qingcloud.s2:sn.target0-lun-0
E: DEVLINKS=/dev/block/8:48 /dev/disk/by-id/scsi-360014059e39a8b6a3014d91b07f4f2f1 /dev/disk/by-path/ip-172.20.28.35:3260-iscsi-iqn.2014-12.com.qingcloud.s2:sn.target0-lun-0 /dev/disk/by-id/wwn-0x60014059e39a8b6a3014d91b07f4f2f1


你可能感兴趣的:(ASM磁盘配置(Oracle RAC 11g))