ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 存储磁盘名称不同启动集群

存储磁盘名称不同启动集群

原创 Linux操作系统 作者:oracle_mao 时间:2013-10-25 11:24:56 0 删除 编辑
当磁盘名称不一样的时候,比如一个节点叫maoa,而另一个节点上叫做mdo_a,那如果我们将asm_diskstring设置为/dev/m*的话,那集群也可以照样启动的。
实验如下:
环境:
节点1:
[grid@RAC1 ~]$ cat /etc/udev/rules.d/99-mao.rules
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=%N", RESULT=="1IET_00010001", NAME="maoa%n",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=%N", RESULT=="1IET_00010002", NAME="maob%n",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=%N", RESULT=="1IET_00010003", NAME="maoc%n",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=%N", RESULT=="1IET_00010004", NAME="maod%n",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=%N", RESULT=="1IET_00010005", NAME="maoe%n",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=%N", RESULT=="1IET_00010006", NAME="maof%n",OWNER="grid",GROUP="asmadmin",MODE="0660"
[grid@RAC1 ~]$ ll /dev/mao*
brw-rw---- 1 grid asmadmin 8,  0 Oct 25 11:03 /dev/maoa
brw-rw---- 1 grid asmadmin 8, 16 Oct 25 11:03 /dev/maob
brw-rw---- 1 grid asmadmin 8, 32 Oct 25 11:03 /dev/maoc
brw-rw---- 1 grid asmadmin 8, 48 Oct 25 11:03 /dev/maod
brw-rw---- 1 grid asmadmin 8, 64 Oct 25 11:03 /dev/maoe
brw-rw---- 1 grid asmadmin 8, 80 Oct 25 11:03 /dev/maof
节点2:
[grid@rac2 ~]$ cat /etc/udev/rules.d/99-mao.rules
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=%N", RESULT=="1IET_00010001", NAME="mdo*a%n",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=%N", RESULT=="1IET_00010002", NAME="mdo*b%n",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=%N", RESULT=="1IET_00010003", NAME="mdo*c%n",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=%N", RESULT=="1IET_00010004", NAME="mdo*d%n",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=%N", RESULT=="1IET_00010005", NAME="mdo*e%n",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=%N", RESULT=="1IET_00010006", NAME="mdo*f%n",OWNER="grid",GROUP="asmadmin",MODE="0660"
[grid@rac2 ~]$ ll /dev/mdo_*
brw-rw---- 1 grid asmadmin 8,  0 Oct 25 11:03 /dev/mdo_a
brw-rw---- 1 grid asmadmin 8, 16 Oct 25 11:03 /dev/mdo_b
brw-rw---- 1 grid asmadmin 8, 32 Oct 25 11:03 /dev/mdo_c
brw-rw---- 1 grid asmadmin 8, 48 Oct 25 11:03 /dev/mdo_d
brw-rw---- 1 grid asmadmin 8, 64 Oct 25 11:03 /dev/mdo_e
brw-rw---- 1 grid asmadmin 8, 80 Oct 25 11:02 /dev/mdo_f
更改asm_diskstring:
SQL> alter system set asm_diskstring='/dev/m*/' scope=spfile;
System altered.
将节点1和节点2的集群或者机器重启。发现2个节点的集群都可以正常被启动。
查看:
节点一:
SQL> set linesize 200
SQL> col path for a40
SQL> select name,path,state from v$asm_disk;
NAME                           PATH                                     STATE
------------------------------ ---------------------------------------- --------
DATA_DG_0002                   /dev/maof                                NORMAL
OCR_DG_0002                    /dev/maoc                                NORMAL
DATA_DG_0000                   /dev/maod                                NORMAL
DATA_DG_0001                   /dev/maoe                                NORMAL
OCR_DG_0000                    /dev/maoa                                NORMAL
OCR_DG_0001                    /dev/maob                                NORMAL
6 rows selected.
节点2:
SQL> set linesize 200
SQL> col path for a40
SQL> /
NAME                           PATH                                     STATE
------------------------------ ---------------------------------------- --------
DATA_DG_0000                   /dev/mdo_d                               NORMAL
OCR_DG_0001                    /dev/mdo_b                               NORMAL
DATA_DG_0002                   /dev/mdo_f                               NORMAL
OCR_DG_0002                    /dev/mdo_c                               NORMAL
DATA_DG_0001                   /dev/mdo_e                               NORMAL
OCR_DG_0000                    /dev/mdo_a                               NORMAL
6 rows selected.
SQL> show parameter asm
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups                       string      DATA_DG
asm_diskstring                       string      /dev/m*
asm_power_limit                      integer     1
asm_preferred_read_failure_groups    string
SQL>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24500180/viewspace-774997/,如需转载,请注明出处,否则将追究法律责任。

上一篇: count(*)小优化
请登录后发表评论 登录
全部评论

注册时间:2011-03-28

  • 博文量
    94
  • 访问量
    752976