文檔中記載如下:
A quorum failure group is a special type of failure group and disks in these failure groups do not contain user data and are not considered when determining redundancy requirements.
CREATE DISKGROUP ocr_data NORMAL REDUNDANCY
FAILGROUP fg1 DISK '/devices/diskg1'
FAILGROUP fg2 DISK '/devices/diskg2'
QUORUM FAILGROUP fg3 DISK '/devices/diskg3'
ATTRIBUTE 'compatible.asm' = '11.2.0.0.0';
[root@tt01 dev]# su - grid
->sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Fri Jun 3 09:07:31 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
->sqlplus / as sysasm
SQL*Plus: Release 11.2.0.2.0 Production on Fri Jun 3 09:07:37 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> CREATE DISKGROUP QUO_GRP NORMAL REDUNDANCY
2 FAILGROUP fg1 DISK '/dev/sdb11'
3 FAILGROUP fg2 DISK '/dev/sdb12'
4 QUORUM FAILGROUP fg3 DISK '/dev/sdb13'
5 ATTRIBUTE 'compatible.asm' = '11.2.0.0.0';
Diskgroup created.
SQL> COLUMN NAME FOR A20
SQL> COLUMN PATH FOR A30
SQL> COLUMN TOTAL_MB FOR 9999
SQL> COLUMN FREE_MB FOR 9999
SQL> COLUMN USABLE_FILE_MB FOR 9999
SQL> select TOTAL_MB,FREE_MB,USABLE_FILE_MB,name from v$asm_diskgroup ;
TOTAL_MB FREE_MB USABLE_FILE_MB NAME
-------- ------- -------------- --------------------
964 99 99 ACFS
4777 2082 2082 DATA
580 390 195 NG
3820 3227 3227 FLASH
196 103 103 DGA
588 480 116 QUO_GRP
6 rows selected.
SQL> COLUMN NAME FOR A20
SQL> COLUMN PATH FOR A30
SQL> COLUMN TOTAL_MB FOR 9999
SQL> COLUMN FREE_MB FOR 9999
SQL> SELECT NAME,PATH, TOTAL_MB, FREE_MB FROM V$ASM_DISK WHERE GROUP_NUMBER=6;
NAME PATH TOTAL_MB FREE_MB
-------------------- ------------------------------ -------- -------
QUO_GRP_0000 /dev/sdb11 196 143
QUO_GRP_0001 /dev/sdb12 196 143
QUO_GRP_0002 /dev/sdb13 196 194
->su - oracle
Password:
->sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Fri Jun 3 09:09:50 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> create tablespace quo_tbs datafile '+quo_grp' size 10M;
Tablespace created.
->su - grid
Password:
->sqlplus / as sysasm
SQL*Plus: Release 11.2.0.2.0 Production on Fri Jun 3 09:11:41 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> COLUMN NAME FOR A20
SQL> COLUMN PATH FOR A30
SQL> COLUMN TOTAL_MB FOR 9999
SQL> COLUMN FREE_MB FOR 9999
SQL> SELECT NAME,PATH, TOTAL_MB, FREE_MB FROM V$ASM_DISK WHERE GROUP_NUMBER=6;
NAME PATH TOTAL_MB FREE_MB
-------------------- ------------------------------ -------- -------
QUO_GRP_0000 /dev/sdb11 196 83
QUO_GRP_0001 /dev/sdb12 196 83
QUO_GRP_0002 /dev/sdb13 196 194
[root@rac1 bin]# ./crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 64a6332cd1ad4fd3bfce95ca38bf18f8 (ORCL:ASMDISK1) [DATA]
實驗過程:
SQL> CREATE DISKGROUP QUO_GRP NORMAL REDUNDANCY
2 FAILGROUP fg1 DISK 'ORCL:ASMDISK3'
3 FAILGROUP fg2 DISK 'ORCL:ASMDISK4'
4 QUORUM FAILGROUP fg3 DISK 'ORCL:ASMDISK5'
5 ATTRIBUTE 'compatible.asm' = '11.2.0.0.0';
--我是通過圖形介面創建的,這裡把命令還原出來。
SQL> select a.GROUP_NUMBER,b.name group_name,a.DISK_NUMBER,a.PATH,a.TOTAL_MB, a.FREE_MB,a.failgroup_type
2 from v$asm_disk a,v$asm_diskgroup b where a.group_number=b.group_number and a.group_number=1;
[root@rac1 bin]# ./crsctl replace votedisk +DATA2
Successful addition of voting disk 64a6332cd1ad4fd3bfce95ca38bf18f8.
Successful addition of voting disk 3d3a807e0fa14ff2bf6b6609788e1d1a.
Successful addition of voting disk b030035ea4894fc0bfba8f6b76ae5513.
Successful deletion of voting disk 1e137cab54294f6bbfe173e129f744b2.
Successfully replaced voting disk group with +DATA2.
CRS-4266: Voting file(s) successfully replaced
[root@rac1 bin]# ./crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 64a6332cd1ad4fd3bfce95ca38bf18f8 (ORCL:ASMDISK5) [DATA2]
2. ONLINE 3d3a807e0fa14ff2bf6b6609788e1d1a (ORCL:ASMDISK3) [DATA2]
3. ONLINE b030035ea4894fc0bfba8f6b76ae5513 (ORCL:ASMDISK4) [DATA2]
Located 3 voting disk(s).
SQL> select a.GROUP_NUMBER,b.name group_name,a.DISK_NUMBER,a.PATH,a.TOTAL_MB, a.FREE_MB,a.failgroup_type
2 from v$asm_disk a,v$asm_diskgroup b where a.group_number=b.group_number and a.group_number=1;
SQL> select a.GROUP_NUMBER,b.name group_name,a.DISK_NUMBER,a.PATH,a.TOTAL_MB, a.FREE_MB,a.failgroup_type
2 from v$asm_disk a,v$asm_diskgroup b where a.group_number=b.group_number and a.group_number=1;
SQL> select a.GROUP_NUMBER,b.name group_name,a.DISK_NUMBER,a.PATH,a.TOTAL_MB, a.FREE_MB,a.failgroup_type
2 from v$asm_disk a,v$asm_diskgroup b where a.group_number=b.group_number and a.group_number=1;
[root@rac1 bin]# ./crsctl replace votedisk +DATA2
Successful addition of voting disk 9cbf6388cf984fa1bf2a2d4c470d8aad.
Successful deletion of voting disk 3abe394c1e8d4ff2bf08d39f75f832ce.
Successfully replaced voting disk group with +DATA2.
CRS-4266: Voting file(s) successfully replaced
SQL> select a.GROUP_NUMBER,b.name group_name,a.DISK_NUMBER,a.PATH,a.TOTAL_MB, a.FREE_MB,a.failgroup_type
2 from v$asm_disk a,v$asm_diskgroup b where a.group_number=b.group_number and a.group_number=1;
SQL> select a.GROUP_NUMBER,b.name group_name,a.DISK_NUMBER,a.PATH,a.TOTAL_MB, a.FREE_MB,a.failgroup_type
2 from v$asm_disk a,v$asm_diskgroup b where a.group_number=b.group_number and a.group_number=1;
mount時提示
SQL> alter diskgroup DATA4 mount;
alter diskgroup DATA4 mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15036: disk '/dev/sdg1' is truncated
是不是這樣的操作不支持RAC環境下...
[ 本帖最后由 jdw618 于 2011-6-3 16:10 编辑 ]作者: nokilled 时间: 2011-6-3 16:11
在节点1上创建,会自动mount.
然后再节点2上手工mount。作者: jdw618 时间: 2011-6-3 16:34
Fri Jun 03 04:25:41 2011
SQL> alter diskgroup DATA4 mount
NOTE: cache registered group DATA4 number=3 incarn=0x8911e1a7
NOTE: cache began mount (not first) of group DATA4 number=3 incarn=0x8911e1a7
NOTE: cache dismounting (clean) group 3/0x8911E1A7 (DATA4)
NOTE: dbwr not being msg'd to dismount
NOTE: lgwr not being msg'd to dismount
NOTE: cache dismounted group 3/0x8911E1A7 (DATA4)
NOTE: cache ending mount (fail) of group DATA4 number=3 incarn=0x8911e1a7
kfdp_dismount(): 42
Fri Jun 03 04:25:41 2011
kfdp_dismountBg(): 42
ERROR: diskgroup DATA4 was not mounted
NOTE: cache deleting context for group DATA4 3/-1995316825
ORA-15032: not all alterations performed
ORA-15036: disk '/dev/sdg1' is truncated
ERROR: alter diskgroup DATA4 mount作者: nokilled 时间: 2011-6-3 16:38
show parameters asm_string作者: 听海★蓝心梦 时间: 2011-6-3 16:42
学习作者: nokilled 时间: 2011-6-3 16:45
ORA-15036: disk "string" is truncated
Cause: The size of the disk, as reported by the operating system, was smaller than
the size of the disk as recorded in the disk header block on the disk.
Action: Check if the system configuration has changed.
是不是磁盘发生了改变了呢作者: jdw618 时间: 2011-6-3 16:55
這些參數都沒有問題
SQL> show parameter asm_diskstring
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring string /dev/sdg*, ORCL:ASMDISK*
期間經歷如下過程:
1、重啟所有nodes(吃飯去了)
2、(吃飯回來)重啟完後,該DG兩個nodes都無法mount,提示:
SQL> alter diskgroup DATA4 mount;
alter diskgroup DATA4 mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15036: disk '/dev/sdg1' is truncated
SQL> drop diskgroup DATA4;
drop diskgroup DATA4
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15001: diskgroup "DATA4" does not exist or is not mounted
此時是無法再重新創建DG的,因為這些磁盤還是一個DG的成員,當然可以force創建
SQL> drop diskgroup DATA4 force including contents;
A special type of failure group has been introduced in ASM 11.2, and it’s called a quorum failure
group. This type of failure group is used in the context of extended distance clusters, when the voting
files are deployed in ASM. A quorum failure group does not contain user data, and it does not count for
disk group redundancy requirements.
With stretched clusters, we need at least three voting files, one on each site plus a third that is
normally deployed via NFS. Unfortunately, the OUI doesn’t allow such a complex setup, so when
configuring the extended distance cluster, you should start with a normal configuration—two voting
disks on site A and one for site B—and add the third voting disk after the installation finishes.
Begin by exporting a file system on the NFS appliance, containing a zero-padded file to serve as the
voting disk later. The file should be the same size as the ASM disks already used to store the voting files.
This NFS export should then be concurrently mounted by the two sites. Continue by adding the new
zero-padded file as an ASM disk, marked as a quorum failure group—for this you have to change the disk
discovery string. Once the new disk is added to the disk group, ASM will automatically readjust the
voting files and include the NFS !°disk.!