ITPub博客

首页 > 数据库 > Oracle > votedisk在ASM diskgroup上的存放规律

votedisk在ASM diskgroup上的存放规律

原创 Oracle 作者:oliseh 时间:2014-10-21 23:38:07 0 删除 编辑

VotediskASM Diskgroup上的存放满足以下条件:

External redundancy: A disk group with external redundancy contains only one voting disk

Normal redundancy: A disk group with normal redundancy contains three voting disks 

High redundancy: A disk group with high redundancy contains five voting disks

By default, Oracle ASM puts each voting disk in its own failure group within the disk group and enforces the required number of failure groups and disks in the disk group as listed above

 

每块votedisk只能独占一个failgroup,也就是说对于Normal redundancydiskgroup上面要有三个votedisk就必须要有三块磁盘,而且每块磁盘必须是一个独立的failgroup,以此类推对于High redundancyDiskgroup必须要有五块磁盘。

 

对于diskgroup中既有regular disk,又有quorum disk的场景做了几个测试:

1normal redundancydiskgroup包含两个regular failgroup,一个quorum failgroup(里面有三块quorum disk)

create diskgroup datadg2 normal redundancy disk '/dev/asm-diskk','/dev/asm-diskl' quorum failgroup fg1 disk '/dev/asm-diskm','/dev/asm-diskn','/dev/asm-diskp' attribute 'compatible.asm'='11.2.0.0.0';

 

grid@ora12c1:/home/grid>crsctl replace votedisk +datadg2

Successful addition of voting disk c316684dcc224fdabfce2f7c0f07120e.

Successful addition of voting disk 15a5c7e215004f3dbfd46557be4b6515.

Successful addition of voting disk bd1ee9b50ab54f0fbf07dfac8e7a0a1f.

Successful deletion of voting disk a5a3049ff9004f68bf68ba3023b92697.

Successful deletion of voting disk 4c8f0e4d37784f62bf52d613bd6b3d31.

Successful deletion of voting disk 268ca86c8cc14f6fbfe44623a01ad900.

Successfully replaced voting disk group with +datadg2.

CRS-4266: Voting file(s) successfully replaced

grid@ora12c1:/home/grid>crsctl query css votedisk      

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   c316684dcc224fdabfce2f7c0f07120e (/dev/asm-diskm) [DATADG2]

 2. ONLINE   15a5c7e215004f3dbfd46557be4b6515 (/dev/asm-diskk) [DATADG2]

 3. ONLINE   bd1ee9b50ab54f0fbf07dfac8e7a0a1f (/dev/asm-diskl) [DATADG2]

Located 3 voting disk(s).

 

select g.name,d.FAILGROUP_TYPE,d.name,d.failgroup,d.path from v$asm_diskgroup g,v$asm_disk d where d.GROUP_NUMBER=g.group_number and g.name='DATADG2'

 

NAME       FAILGROUP_TYPE    NAME       FAILGROUP      PATH

DATADG2          QUORUM         DATADG2_0002       FG1  /dev/asm-diskm

DATADG2          REGULAR          DATADG2_0000       DATADG2_0000       /dev/asm-diskk

DATADG2          QUORUM         DATADG2_0003       FG1  /dev/asm-diskn

DATADG2          QUORUM         DATADG2_0004       FG1  /dev/asm-diskp

DATADG2          REGULAR          DATADG2_0001       DATADG2_0001       /dev/asm-diskl

结论:严格遵循一块votedisk独占一个failgroup的规律,quorum failgroup FG1虽然有三块盘但也只存放了一个votedisk

 

2normal redundancydiskgroup包含五块盘,每块盘都归于一个单独的failgroup,后三块盘分别归属于三个quorum failgroup

create diskgroup datadg2 normal redundancy disk '/dev/asm-diskk','/dev/asm-diskl' quorum failgroup fg1 disk '/dev/asm-diskm' quorum failgroup fg2 disk '/dev/asm-diskn' quorum failgroup fg3 disk '/dev/asm-diskp' attribute 'compatible.asm'='11.2.0.0.0';

 

 

grid@ora12c2:/home/grid>crsctl replace votedisk +datadg2

Successful addition of voting disk 34e0460432d44ff3bff804d46c39786c.

Successful addition of voting disk fb9abe518e1b4f69bf57e2e83226531c.

Successful addition of voting disk 3bf5057d7cc84fbdbf9c3d392190ab37.

Successful deletion of voting disk cfaa4be567514fd4bf9f3e67fe1123a3.

Successful deletion of voting disk 3c78c6d2e5514f30bf1e8d458df33117.

Successful deletion of voting disk c925fd2c5fdf4f28bfe94bdd7ae5c8fe.

Successfully replaced voting disk group with +datadg2.

CRS-4266: Voting file(s) successfully replaced

 

grid@ora12c2:/home/grid>crsctl query css votedisk      

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   34e0460432d44ff3bff804d46c39786c (/dev/asm-diskm) [DATADG2]

 2. ONLINE   fb9abe518e1b4f69bf57e2e83226531c (/dev/asm-diskn) [DATADG2]

 3. ONLINE   3bf5057d7cc84fbdbf9c3d392190ab37 (/dev/asm-diskp) [DATADG2]

Located 3 voting disk(s).

 

select g.name,d.FAILGROUP_TYPE,d.name,d.failgroup,d.path from v$asm_diskgroup g,v$asm_disk d where d.GROUP_NUMBER=g.group_number and g.name='DATADG2'

NAME       FAILGROUP_TYPE    NAME       FAILGROUP      PATH

DATADG2          QUORUM         DATADG2_0004       FG3  /dev/asm-diskp

DATADG2          REGULAR          DATADG2_0000       DATADG2_0000       /dev/asm-diskk

DATADG2          QUORUM         DATADG2_0003       FG2  /dev/asm-diskn

DATADG2          REGULAR          DATADG2_0001       DATADG2_0001       /dev/asm-diskl

DATADG2          QUORUM         DATADG2_0002       FG1  /dev/asm-diskm

 

结论:quorum diskgroup数量足够的情况下,优先存放votediskquorum diskgroup

 

3external redundancydiskgroup包含五块盘,每块盘都归于一个单独的failgroup,后三

块盘分别归属于三个quorum failgroup

create diskgroup datadg2 external redundancy disk '/dev/asm-diskk','/dev/asm-diskl' quorum disk '/dev/asm-diskm' quorum disk '/dev/asm-diskn' quorum disk '/dev/asm-diskp' attribute 'compatible.asm'='11.2.0.0.0';

 

Diskgroup created.

 

grid@ora12c2:/home/grid>crsctl query css votedisk

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   94e8c6b45a344fafbf05359e3ff50e74 (/dev/asm-diskc) [SYSDG]

 2. ONLINE   612b46359d6a4f0fbf9bc7bd5c504336 (/dev/asm-diskd) [SYSDG]

 3. ONLINE   d45d108f1d1c4ff8bfbc0d3226f609df (/dev/asm-diske) [SYSDG]

Located 3 voting disk(s).

grid@ora12c2:/home/grid>crsctl replace votedisk +datadg2

Successful addition of voting disk 9e6caec727204f78bf11af57a3139a12.

Successful deletion of voting disk 94e8c6b45a344fafbf05359e3ff50e74.

Successful deletion of voting disk 612b46359d6a4f0fbf9bc7bd5c504336.

Successful deletion of voting disk d45d108f1d1c4ff8bfbc0d3226f609df.

Successfully replaced voting disk group with +datadg2.

CRS-4266: Voting file(s) successfully replaced

grid@ora12c2:/home/grid>crsctl query css votedisk      

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   9e6caec727204f78bf11af57a3139a12 (/dev/asm-diskm) [DATADG2]

Located 1 voting disk(s).

 

select g.name,d.FAILGROUP_TYPE,d.name,d.failgroup,d.path from v$asm_diskgroup g,v$asm_disk d where d.GROUP_NUMBER=g.group_number and g.name='DATADG2'

NAME       FAILGROUP_TYPE    NAME       FAILGROUP      PATH

DATADG2          QUORUM         DATADG2_0004       DATADG2_0004       /dev/asm-diskp

DATADG2          REGULAR          DATADG2_0000       DATADG2_0000       /dev/asm-diskk

DATADG2          QUORUM         DATADG2_0003       DATADG2_0003       /dev/asm-diskn

DATADG2          REGULAR          DATADG2_0001       DATADG2_0001       /dev/asm-diskl

DATADG2          QUORUM         DATADG2_0002       DATADG2_0002       /dev/asm-diskm

 

结论:external redundancy diskgroup里只能放一块votedisk,而且优先存放在quorum failgroup

 

4normal redundancydiskgroup起初只有两个failgroup,添加votedisk失败,加入一个Failgroup后成功

create diskgroup datadg2 normal redundancy disk '/dev/asm-diskk','/dev/asm-diskl' attribute 'compatible.asm'='11.2.0.0.0';

 

Diskgroup created.

 

select g.name,d.FAILGROUP_TYPE,d.name,d.failgroup,d.path from v$asm_diskgroup g,v$asm_disk d where d.GROUP_NUMBER=g.group_number and g.name='DATADG2' and header_status='MEMBER'

 

NAME       FAILGROUP_TYPE    NAME       FAILGROUP      PATH

DATADG2          REGULAR          DATADG2_0001       DATADG2_0001       /dev/asm-diskl

DATADG2          REGULAR          DATADG2_0000       DATADG2_0000       /dev/asm-diskk

 

grid@ora12c2:/home/grid>crsctl replace votedisk +datadg2

Failed to create voting files on disk group datadg2.

Change to configuration failed, but was successfully rolled back.

CRS-4000: Command Replace failed, or completed with errors.

 

加一块盘进去:

alter diskgroup datadg2 add disk '/dev/asm-diskm';

 

select g.name,d.FAILGROUP_TYPE,d.name,d.failgroup,d.path from v$asm_diskgroup g,v$asm_disk d where d.GROUP_NUMBER=g.group_number and g.name='DATADG2' and header_status='MEMBER'

 

NAME       FAILGROUP_TYPE    NAME       FAILGROUP      PATH

DATADG2          REGULAR          DATADG2_0001       DATADG2_0001       /dev/asm-diskl

DATADG2          REGULAR          DATADG2_0000       DATADG2_0000       /dev/asm-diskk

DATADG2          REGULAR          DATADG2_0002       DATADG2_0002       /dev/asm-diskm

 

grid@ora12c2:/home/grid>crsctl replace votedisk +datadg2

Successful addition of voting disk 9e559487d7ad4f33bf6deb330d1b9bef.

Successful addition of voting disk 3f76c2dd8b044f8abf91c598c095f052.

Successful addition of voting disk b2a0b6c8499f4fecbfa967a8131831ff.

Successful deletion of voting disk c7c77baba41d4f80bf2c470ee46e78d3.

Successful deletion of voting disk 7fbbf3ca3a404f30bf49e61bfc9bd128.

Successful deletion of voting disk 34b64b122d304f7bbfafde700a26b3bf.

Successfully replaced voting disk group with +datadg2.

CRS-4266: Voting file(s) successfully replaced

grid@ora12c2:/home/grid>crsctl query css votedisk       

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   9e559487d7ad4f33bf6deb330d1b9bef (/dev/asm-diskk) [DATADG2]

 2. ONLINE   3f76c2dd8b044f8abf91c598c095f052 (/dev/asm-diskl) [DATADG2]

 3. ONLINE   b2a0b6c8499f4fecbfa967a8131831ff (/dev/asm-diskm) [DATADG2]

Located 3 voting disk(s).

 

结论:normal redundancy diskgroup要存放votedisk必须至少有三块盘

 

5 diskgroup创建后,其中的Quorum disk成员发生了删除和新增操作,votedisk就不一定存在于quorum disk

create diskgroup datadg2 normal redundancy disk '/dev/asm-diskk','/dev/asm-diskl' quorum failgroup fg1 disk '/dev/asm-diskm' quorum failgroup fg2 disk '/dev/asm-diskn' quorum failgroup fg3 disk '/votefs/votefile' attribute 'compatible.asm'='11.2.0.0.0';

 

grid@ora12c2:/home/grid>crsctl replace votedisk +datadg2

Successful addition of voting disk 0d912cf67c9a4f0fbf9a3ee6386cdcc3.

Successful addition of voting disk 3adddd94d51d4f93bfdac7f165324fe1.

Successful addition of voting disk afc8bf2bb7dc4f79bfecb3131b3eaa4b.

Successful deletion of voting disk 59cc8fe06b914fc3bf7c02b6e50c0e8b.

Successful deletion of voting disk 1db7404f909d4f93bfe06323c0eb4b52.

Successful deletion of voting disk 849b2fee61914f45bf3857cf91c43406.

Successfully replaced voting disk group with +datadg2.

CRS-4266: Voting file(s) successfully replaced

grid@ora12c2:/home/grid>crsctl query css votedisk      

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   0d912cf67c9a4f0fbf9a3ee6386cdcc3 (/dev/asm-diskm) [DATADG2]

 2. ONLINE   3adddd94d51d4f93bfdac7f165324fe1 (/dev/asm-diskn) [DATADG2]

 3. ONLINE   afc8bf2bb7dc4f79bfecb3131b3eaa4b (/votefs/votefile) [DATADG2]

Located 3 voting disk(s).

 

SQL> alter diskgroup datadg2 drop quorum disk DATADG2_0004; --删除/votefs/votefile所在的disk

 

Diskgroup altered.

 

SQL> alter diskgroup datadg2 add quorum disk '/dev/asm-diskp'; --加入一块新的quorum disk

 

Diskgroup altered.

grid@ora12c2:/home/grid>crsctl replace votedisk +datadg2

Successful addition of voting disk 59746012d6494f46bfe9aaa26529a256.

Successful addition of voting disk f6c18e0ea9024fa7bff12d4c593fbd15.

Successful addition of voting disk a636272fc5934f27bf29ce43f9cb7e65.

Successful deletion of voting disk e217f3cb7b2a4fbbbf5721024271c055.

Successful deletion of voting disk fb8f961107a14fbcbf2422e48d8897b5.

Successful deletion of voting disk 005d842a1a854fd8bfc8e615284e6347.

Successfully replaced voting disk group with +datadg2.

CRS-4266: Voting file(s) successfully replaced

grid@ora12c2:/home/grid>crsctl query css votedisk      

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   59746012d6494f46bfe9aaa26529a256 (/dev/asm-diskm) [DATADG2]

 2. ONLINE   f6c18e0ea9024fa7bff12d4c593fbd15 (/dev/asm-diskn) [DATADG2]

 3. ONLINE   a636272fc5934f27bf29ce43f9cb7e65 (/dev/asm-diskk) [DATADG2]

Located 3 voting disk(s).

 

结论:diskgroup首次创建的时候满足Votedisk优先存放quorum disk的规律,但之后若diskgroup中的quorum磁盘发生删除及新增操作后,此规律有可能不满足

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

请登录后发表评论 登录
全部评论
不仅仅专注Oracle database技术, member of SHOUG

注册时间:2014-04-06

  • 博文量
    128
  • 访问量
    1617169