rhel6上使用udev配置oracle asm,在Linux 6上使用UDEV解决RAC ASM存储设备名问题

我的环境是两台机器通过多路径的方式 共享一个存储。按照您提供的方法udev 帮定wwid.oracle 安装程度提示不是共享磁盘。我的操作步骤如下:

From Configuring persistent storage in Red Hat Enterprise Linux 6

1.Create /etc/scsi_id.config add

options=–whitelisted –replace-whitespace

2.Get UUID for disks you want to created ASM on

scsi_id –whitelisted –replace-whitespace –device=/dev/sda

[root@racnode2 rules.d]# multipath -ll

mpathe (36000d3100055f5000000000000000043) dm-8 COMPELNT,Compellent Vol

size=1.0T features=’1 queue_if_no_path’ hwhandler=’0′ wp=rw

`-+- policy=’round-robin 0′ prio=1 status=active

|- 1:0:3:2 sdg 8:96 active ready running

|- 2:0:2:2 sdk 8:160 active ready running

|- 1:0:2:2 sde 8:64 active ready running

`- 2:0:3:2 sdm 8:192 active ready running

mpathd (36000d3100055f5000000000000000044) dm-2 COMPELNT,Compellent Vol

size=1.5T features=’1 queue_if_no_path’ hwhandler=’0′ wp=rw

`-+- policy=’round-robin 0′ prio=1 status=active

|- 1:0:3:1 sdf 8:80 active ready running

|- 1:0:2:1 sdd 8:48 active ready running

|- 2:0:2:1 sdj 8:144 active ready running

`- 2:0:3:1 sdl 8:176 active ready running

mpatha (36000d3100055f5000000000000000042) dm-7 COMPELNT,Compellent Vol

size=5.0G features=’1 queue_if_no_path’ hwhandler=’0′ wp=rw

`-+- policy=’round-robin 0′ prio=1 status=active

|- 1:0:0:3 sdb 8:16 active ready running

|- 1:0:1:3 sdc 8:32 active ready running

|- 2:0:0:3 sdh 8:112 active ready running

`- 2:0:1:3 sdi 8:128 active ready running

[root@racnode1 rules.d]# multipath -ll

mpathe (36000d3100055f5000000000000000042) dm-2 COMPELNT,Compellent Vol

size=5.0G features=’1 queue_if_no_path’ hwhandler=’0′ wp=rw

`-+- policy=’round-robin 0′ prio=1 status=active

|- 1:0:1:3 sdc 8:32 active ready running

|- 1:0:0:3 sdb 8:16 active ready running

|- 2:0:0:3 sdh 8:112 active ready running

`- 2:0:1:3 sdi 8:128 active ready running

mpathc (36000d3100055f5000000000000000043) dm-7 COMPELNT,Compellent Vol

size=1.0T features=’1 queue_if_no_path’ hwhandler=’0′ wp=rw

`-+- policy=’round-robin 0′ prio=1 status=active

|- 1:0:2:2 sde 8:64 active ready running

|- 1:0:3:2 sdg 8:96 active ready running

|- 2:0:2:2 sdk 8:160 active ready running

`- 2:0:3:2 sdm 8:192 active ready running

mpathb (36000d3100055f5000000000000000044) dm-8 COMPELNT,Compellent Vol

size=1.5T features=’1 queue_if_no_path’ hwhandler=’0′ wp=rw

`-+- policy=’round-robin 0′ prio=1 status=active

|- 1:0:3:1 sdf 8:80 active ready running

|- 2:0:2:1 sdj 8:144 active ready running

|- 1:0:2:1 sdd 8:48 active ready running

`- 2:0:3:1 sdl 8:176 active ready running

3. Create UDEV rules file

vi /etc/udev/rules.d/99-oracle-asmdevices.rules

PROGRAM add scsi_id command, RESULT is UUID

KERNEL==”sd*”, BUS==”scsi”, PROGRAM==”/sbin/scsi_id –whitelisted –replace-whitespace –device=/dev/$name”, RESULT==”36000d3100055f5000000000000000042″,

NAME=”asmdisk1″, OWNER=”grid”, GROUP=”asmadmin”, MODE=”0660″

KERNEL==”sd*”, BUS==”scsi”, PROGRAM==”/sbin/scsi_id –whitelisted –replace-whitespace –device=/dev/$name”, RESULT==”36000d3100055f5000000000000000044″,

NAME=”asmdisk2″, OWNER=”grid”, GROUP=”asmadmin”, MODE=”0660″

KERNEL==\”sd*\”, BUS==\”scsi\”, PROGRAM==\”/sbin/scsi_id –whitelisted –replace-whitespace –device=/dev/\$name\”, RESULT==\”`/sbin/scsi_id –whitelisted –replace-

whitespace –device=/dev/sd$i`\”, NAME=\”asm-disk$i\”, OWNER=\”grid\”, GROUP=\”asmadmin\”, MODE=\”0660\””

4.udevadm command can test UDEV configuration

5.Start udev

/sbin/start_udev

6. Restart and check

ls -l /dev/asm*

[root@racnode1 dev]# ls -al

total 4

drwxr-xr-x. 18 root root 4380 Jan 28 17:41 .

dr-xr-xr-x. 30 root root 4096 Jan 29 2013 ..

brw-rw—-. 1 grid asmadmin 8, 32 Jan 29 2013 asmdisk1

brw-rw—-. 1 grid asmadmin 8, 144 Jan 29 2013 asmdisk2

[root@racnode2 dev]# ls -al

total 4

drwxr-xr-x. 18 root root 4380 Jan 29 09:42 .

dr-xr-xr-x. 30 root root 4096 Jan 29 2013 ..

brw-rw—-. 1 grid asmadmin 8, 128 Jan 29 2013 asmdisk1

brw-rw—-. 1 grid asmadmin 8, 144 Jan 29 2013 asmdisk2

Device Checks for ASM – This is a pre-check to verify if the specified devices meet the requirements for configuration through the Oracle Universal Storage Manager

Configuration Assistant.? Error:

?-?

“/dev/asmdisk1” is not shared ?- Cause:?Cause Of Problem Not Available ?- Action:?User Action Not Available

?-?

racnode2:Unable to determine the sharedness of /dev/sdd on nodes: The problem occurred on nodes: racnode2 ?- Cause:?Cause Of Problem Not Available ?- Action:?User

Action Not Available

?-?

racnode1:Unable to determine the sharedness of /dev/sdf on nodes: The problem occurred on nodes: racnode1 ?- Cause:?Cause Of Problem Not Available ?- Action:?User

Action Not Available

Check Failed on Nodes: [racnode2, ?racnode1]

Verification result of failed node: racnode2

?Details:

?-?

Unable to determine the sharedness of /dev/asmdisk2 on nodes: [racnode2, racnode1] ?- Cause:?Cause Of Problem Not Available ?- Action:?User Action Not Available

?-?

Unable to determine the sharedness of /dev/asmdisk1 on nodes: [racnode2, racnode1] ?- Cause:?Cause Of Problem Not Available ?- Action:?User Action Not Available

?-?

PRVF-9802 : Attempt to get udev info from node “racnode2” failed ?- Cause:? Attempt to read the udev permissions file failed, probably due to missing permissions

directory, missing or invalid permissions file, or permissions file not accessible to use account running the check. ?- Action:? Make sure that the udev permissions

directory is created, the udev permissions file is available, and it has correct read permissions for access by the user running the check.

Back to Top

Verification result of failed node: racnode1

?Details:

?-?

Unable to determine the sharedness of /dev/asmdisk2 on nodes: [racnode2, racnode1] ?- Cause:?Cause Of Problem Not Available ?- Action:?User Action Not Available

?-?

Unable to determine the sharedness of /dev/asmdisk1 on nodes: [racnode2, racnode1] ?- Cause:?Cause Of Problem Not Available ?- Action:?User Action Not Available

?-?

PRVF-9802 : Attempt to get udev info from node “racnode1” failed ?- Cause:? Attempt to read the udev permissions file failed, probably due to missing permissions

directory, missing or invalid permissions file, or permissions file not accessible to use account running the check. ?- Action:? Make sure that the udev permissions

directory is created, the udev permissions file is available, and it has correct read permissions for access by the user running the check.

Back to Top

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值