In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Http://www.ohsdba.cn/index.php?g=Home&m=Article&a=show&id=110
Oracle 10g introduces ASM, and in 10g version, if the disk is inaccessible due to a failure (fiber optic cable failure, controller failure, HBA card failure, or other failure), Oracle will drop the disk. In 11g, Oracle introduces a parameter disk_repair_time, which is related to "Oracle ASM Fast Mirror Resync". With this feature, when a fault occurs (except for the disk itself), within the disk_repair_time time, after the fault resolution disk is online, Oracle will synchronize the data that has not been written to the disk extent temporarily due to the fault, without having to synchronize all the data on the disk, thus avoiding performance problems. If the disk_repair_time time is exceeded and the system has not been repaired, Oracle will drop the disk. The default time is 3.6 hours, which is generally suitable for most environments. This parameter can be set according to the actual situation.
To use this feature, two conditions are met:
1. The COMPATIBLE attribute version of the disk group is at least 11.1 and above (the disk group COMPATIBLE parameters affect the disk group format, metadata, AU, etc.)
two。 The redundancy mode of the disk group is Normal or High
Note: if the disk itself fails (DG redundancy mode is Norma/High), the disk must be drop. After adding the disk, oracle will automatically reblancing. If the redundancy mode is external, when the disk fails, the disk group goes offline and the database is restored through backup. The redundancy of Exadata is at least Normal, which is through mirror at the ASM level, so the normal use of the database will not be affected by waiting for any one of the cell nodes to run downwards.
In this paper, we create a disk group db2 in 11g ASM, then offline a disk in the disk group, and observe the changes of the disk after exceeding the disk_repair_time.
ASMCMD > lsattr-G db2-l
Name Valueaccess_control.enabled FALSEaccess_control.umask 066au_size 1048576cell.smart_scan_capable FALSEcompatible.asm 11.2.0.0.0compatible.rdbms 10.1.0.0.0disk_repair_time 3.6hsector_size 512
ASMCMD > setattr-G db2 disk_repair_time 5h
ORA-15032: not all alterations performedORA-15242: could not set attribute disk_repair_timeORA-15283: ASM operation requires compatible.rdbms of 11.1.0.0.0 or higher (DBD ERROR: OCIStmtExecute) Note: the compatible parameter is at least 11.1
ASMCMD > setattr-G db2 compatible.rdbms 11.2
ASMCMD > lsattr-G db2-l
Name Valueaccess_control.enabled FALSEaccess_control.umask 066au_size 1048576cell.smart_scan_capable FALSEcompatible.asm 11.2.0.0.0compatible.rdbms 11.2disk_repair_time 3.6hsector_size 512
For testing, set disk_repair_time to 5 minutes, m for minutes and h for hours. If you do not enter units, the default is hours.
ASMCMD > setattr-G db2 disk_repair_time 5m
ASM alert backend log
SQL > / * ASMCMD * / ALTER DISKGROUP DB2 SET ATTRIBUTE 'disk_repair_time' =' 5m'SUCCESS: / * ASMCMD * / ALTER DISKGROUP DB2 SET ATTRIBUTE 'disk_repair_time' =' 5m'
ASMCMD > lsattr-G db2-l
Name Valueaccess_control.enabled FALSEaccess_control.umask 066au_size 1048576cell.smart_scan_capable FALSEcompatible.asm 11.2.0.0.0compatible.rdbms 11.2disk_repair_time 5msector_size 512ASMCMD >
View disk group information and disk head information
ASMCMD > lsdsk-G db2
Path/dev/oracleasm/disks/ASMDISK11/dev/oracleasm/disks/ASMDISK13
ASMCMD > lsdsk-G db2-- statistics
Reads Write Read_Errs Write_Errs Read_time Write_Time Bytes_Read Bytes_Written Voting_File Path 191 1068 1068 0. 965827 39.09044 1794048 4374528 N / dev/oracleasm/disks/ASMDISK11 166 1068 1.040196 38.521265 68 4032 4374528 N / dev/oracleasm/disks/ASMDISK13ASMCMD >
[oracle@ohs1 ~] $kfed read / dev/oracleasm/disks/ASMDISK11
Kfbh.endian: 1; 0x000: 0x01kfbh.hard: 130; 0x001: 0x82kfbh.type: 1; 0x002: KFBTYP_DISKHEADkfbh.datfmt: 1; 0x003: 0x01kfbh.block.blk: 0; 0x004: blk=0kfbh.block.obj: 2147483648 0x008: disk=0kfbh.check: 1549816565; 0x00c: 0x5c6052f5kfbh.fcn.base: 0; 0x010: 0x00000000kfbh.fcn.wrap: 0; 0x014: 0x00000000kfbh.spare1: 0; 0x018: 0x00000000kfbh.spare2: 0; 0x01c: 0x00000000kfdhdb.driver.provstr:ORCLDISKASMDISK11; 0x000: length=17kfdhdb.driver.reserved [0]: 1145918273 0x008: 0x444d5341kfdhdb.driver.reserved [1]: 827020105; 0x00c: 0x314b5349kfdhdb.driver.reserved [2]: 49; 0x010: 0x00000031kfdhdb.driver.reserved [3]: 0; 0x014: 0x00000000kfdhdb.driver.reserved [4]: 0; 0x018: 0x00000000kfdhdb.driver.reserved [5]: 0; 0x01c: 0x00000000kfdhdb.compat: 186646528; 0x020: 0x0b200000kfdhdb.dsknum: 0 0x024: 0x0000kfdhdb.grptyp: 2; 0x026: KFDGTP_NORMALkfdhdb.hdrsts: 3; 0x027: KFDHDR_MEMBERkfdhdb.dskname: DB2_0000; 0x028: length=8kfdhdb.grpname: DB2; 0x048: length=3kfdhdb.fgname: DB2_0000; 0x068: length=8kfdhdb.capname: 0x088: length=0kfdhdb.crestmp.hi: 33036942; 0x0a8: HOUR=0xe DAYS=0x14 MNTH=0x6 YEAR=0x7e0kfdhdb.crestmp.lo: 3147311104; 0x0ac: USEC=0x0 MSEC=0x20a SECS=0x39 MINS=0x2ekfdhdb.mntstmp.hi: 33036942; 0x0b0: HOUR=0xe DAYS=0x14 MNTH=0x6 YEAR=0x7e0kfdhdb.mntstmp.lo: 3163762688; 0x0b4: USEC=0x0 MSEC=0xcc SECS=0x9 MINS=0x2fkfdhdb.secsize: 512; 0x0b8: 0x0200kfdhdb.blksize: 4096; 0x0ba: 0x1000kfdhdb.ausize: 1048576 0x0bc: 0x00100000kfdhdb.mfact: 113792; 0x0c0: 0x0001bc80kfdhdb.dsksize: 2447; 0x0c4: 0x0000098fkfdhdb.pmcnt: 2; 0x0c8: 0x00000002kfdhdb.fstlocn: 1; 0x0cc: 0x00000001kfdhdb.altlocn: 2; 0x0d0: 0x00000002kfdhdb.f1b1locn: 2; 0x0d4: 0x00000002kfdhdb.redomirrors [0]: 0 0x0d8: 0x0000kfdhdb.redomirrors [1]: 0; 0x0da: 0x0000kfdhdb.redomirrors [2]: 0; 0x0dc: 0x0000kfdhdb.redomirrors [3]: 0; 0x0de: 0x0000kfdhdb.dbcompat: 168820736; 0x0e0: 0x0a100000kfdhdb.grpstmp.hi: 33036942; 0x0e4: HOUR=0xe DAYS=0x14 MNTH=0x6 YEAR=0x7e0kfdhdb.grpstmp.lo: 3147119616; 0x0e8: USEC=0x0 MSEC=0x14f SECS=0x39 MINS=0x2ekfdhdb.vfstart: 0 0x0ec: 0x00000000kfdhdb.vfend: 0; 0x0f0: 0x00000000kfdhdb.spfile: 0; 0x0f4: 0x00000000kfdhdb.spfflg: 0; 0x0f8: 0x00000000
[oracle@ohs1 ~] $kfed read / dev/oracleasm/disks/ASMDISK13
Kfbh.endian: 1; 0x000: 0x01kfbh.hard: 130; 0x001: 0x82kfbh.type: 1; 0x002: KFBTYP_DISKHEADkfbh.datfmt: 1; 0x003: 0x01kfbh.block.blk: 0; 0x004: blk=0kfbh.block.obj: 2147483649 0x008: disk=1kfbh.check: 1549816567; 0x00c: 0x5c6052f7kfbh.fcn.base: 0; 0x010: 0x00000000kfbh.fcn.wrap: 0; 0x014: 0x00000000kfbh.spare1: 0; 0x018: 0x00000000kfbh.spare2: 0; 0x01c: 0x00000000kfdhdb.driver.provstr:ORCLDISKASMDISK13; 0x000: length=17kfdhdb.driver.reserved [0]: 1145918273 0x008: 0x444d5341kfdhdb.driver.reserved [1]: 827020105; 0x00c: 0x314b5349kfdhdb.driver.reserved [2]: 51; 0x010: 0x00000033kfdhdb.driver.reserved [3]: 0; 0x014: 0x00000000kfdhdb.driver.reserved [4]: 0; 0x018: 0x00000000kfdhdb.driver.reserved [5]: 0; 0x01c: 0x00000000kfdhdb.compat: 186646528; 0x020: 0x0b200000kfdhdb.dsknum: 1 0x024: 0x0001kfdhdb.grptyp: 2; 0x026: KFDGTP_NORMALkfdhdb.hdrsts: 3; 0x027: KFDHDR_MEMBERkfdhdb.dskname: DB2_0001; 0x028: length=8kfdhdb.grpname: DB2; 0x048: length=3kfdhdb.fgname: DB2_0001; 0x068: length=8kfdhdb.capname: 0x088: length=0kfdhdb.crestmp.hi: 33036942; 0x0a8: HOUR=0xe DAYS=0x14 MNTH=0x6 YEAR=0x7e0kfdhdb.crestmp.lo: 3147311104; 0x0ac: USEC=0x0 MSEC=0x20a SECS=0x39 MINS=0x2ekfdhdb.mntstmp.hi: 33036942; 0x0b0: HOUR=0xe DAYS=0x14 MNTH=0x6 YEAR=0x7e0kfdhdb.mntstmp.lo: 3163762688; 0x0b4: USEC=0x0 MSEC=0xcc SECS=0x9 MINS=0x2fkfdhdb.secsize: 512; 0x0b8: 0x0200kfdhdb.blksize: 4096; 0x0ba: 0x1000kfdhdb.ausize: 1048576 0x0bc: 0x00100000kfdhdb.mfact: 113792; 0x0c0: 0x0001bc80kfdhdb.dsksize: 2447; 0x0c4: 0x0000098fkfdhdb.pmcnt: 2; 0x0c8: 0x00000002kfdhdb.fstlocn: 1; 0x0cc: 0x00000001kfdhdb.altlocn: 2; 0x0d0: 0x00000002kfdhdb.f1b1locn: 2; 0x0d4: 0x00000002kfdhdb.redomirrors [0]: 0 0x0d8: 0x0000kfdhdb.redomirrors [1]: 0; 0x0da: 0x0000kfdhdb.redomirrors [2]: 0; 0x0dc: 0x0000kfdhdb.redomirrors [3]: 0; 0x0de: 0x0000kfdhdb.dbcompat: 168820736; 0x0e0: 0x0a100000kfdhdb.grpstmp.hi: 33036942; 0x0e4: HOUR=0xe DAYS=0x14 MNTH=0x6 YEAR=0x7e0kfdhdb.grpstmp.lo: 3147119616; 0x0e8: USEC=0x0 MSEC=0x14f SECS=0x39 MINS=0x2ekfdhdb.vfstart: 0 0x0ec: 0x00000000kfdhdb.vfend: 0; 0x0f0: 0x00000000kfdhdb.spfile: 0; 0x0f4: 0x00000000kfdhdb.spfflg: 0; 0x0f8: 0x00000000ASMCMD > iostat-G db2
Group_Name Dsk_Name Reads WritesDB2 DB2_0000 1859584 5001216DB2 DB2_0001 749568 5001216ASMCMD > offline-G db2-D DB2_0001
Diskgroup altered.
ASMCMD >
You can see from the ASM alet that the disk will be drop in 5 minutes.
WARNING: Disk 1 (DB2_0001) in group 1 will be dropped in: (300) secs on ASM inst 1
Mon Jun 20 15:55:23 2016
5 minutes later, the disk is forcibly deleted by ASM (alert log)
SQL > alter diskgroup DB2 drop disk DB2_0001 force / * ASM SERVER * / NOTE: GroupBlock outside rolling migration privileged regionNOTE: requesting all-instance membership refresh for group=1Mon Jun 2016: 01:36 2016GMON updating for reconfiguration, group 1 at 26 for pid 33, osid 8507NOTE: cache closing disk 1 of grp 1: (not open) DB2_0001NOTE: group DB2: updated PST location: disk 0000 (PST copy 0) NOTE: group 1 PST updated.Mon Jun 2016: 01:36 2016NOTE: membership refresh pending for group 1/0xe0485f13 (DB2) GMON querying group 1 at 27 for pid 19 Osid 5801NOTE: cache closing disk 1 of grp 1: (not open) _ DROPPED_0001_DB2SUCCESS: refreshed membership for 1/0xe0485f13 (DB2) NOTE: starting rebalance of group 1/0xe0485f13 (DB2) at power 1SUCCESS: alter diskgroup DB2 drop disk DB2_0001 force / * ASM SERVER * / SUCCESS: PST-initiated drop disk in group 1 (3762839315) Starting background process ARB0Mon Jun 2016: 01:39 2016ARB0 started with pid=34 OS id=9355NOTE: assigning ARB0 to group 1/0xe0485f13 (DB2) with 1 parallel I/ONOTE: stopping process ARB0SUCCESS: rebalance completed for group 1/0xe0485f13 (DB2) NOTE: Attempting voting file refresh on diskgroup DB2Mon Jun 2016: 01:43 2016NOTE: GroupBlock outside rolling migration privileged regionNOTE: requesting all-instance membership refresh for group=1GMON updating for reconfiguration, group 1 at 28 for pid 34 Osid 9361NOTE: cache closing disk 1 of grp 1: (not open) _ DROPPED_0001_DB2NOTE: group DB2: updated PST location: disk 0000 (PST copy 0) NOTE: group 1 PST updated.WARNING: offline disk number 1 has references (51 AUs) NOTE: membership refresh pending for group 1/0xe0485f13 (DB2) Mon Jun 2016: 01:49 2016GMON querying group 1 at 29 for pid 19 Osid 5801NOTE: cache closing disk 1 of grp 1: (not open) _ DROPPED_0001_DB2Mon Jun 2016: 01:49 2016SUCCESS: refreshed membership for 1/0xe0485f13 (DB2) NOTE: Attempting voting file refresh on diskgroup DB2
You can see that the disk group db2 offline_disks is displayed as 1
ASMCMD > lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files NameMOUNTED NORMAL N 512 4096 1048576 2447 2394 0 1197 1 N DB2/MOUNTED EXTERN N 512 4096 1048576 4894 4786 0 4786 0 N OHSDBA/MOUNTED NORMAL N 512 4096 1048576 7341 6410 2447 1981 0 Y SYSTEMDG/ASMCMD >
After offline, read the disk header information again (found that the header information has not changed)
[oracle@ohs1 ~] $kfed read / dev/oracleasm/disks/ASMDISK13
Kfbh.endian: 1; 0x000: 0x01kfbh.hard: 130; 0x001: 0x82kfbh.type: 1; 0x002: KFBTYP_DISKHEADkfbh.datfmt: 1; 0x003: 0x01kfbh.block.blk: 0; 0x004: blk=0kfbh.block.obj: 2147483649 0x008: disk=1kfbh.check: 1549816567; 0x00c: 0x5c6052f7kfbh.fcn.base: 0; 0x010: 0x00000000kfbh.fcn.wrap: 0; 0x014: 0x00000000kfbh.spare1: 0; 0x018: 0x00000000kfbh.spare2: 0; 0x01c: 0x00000000kfdhdb.driver.provstr:ORCLDISKASMDISK13; 0x000: length=17kfdhdb.driver.reserved [0]: 1145918273 0x008: 0x444d5341kfdhdb.driver.reserved [1]: 827020105; 0x00c: 0x314b5349kfdhdb.driver.reserved [2]: 51; 0x010: 0x00000033kfdhdb.driver.reserved [3]: 0; 0x014: 0x00000000kfdhdb.driver.reserved [4]: 0; 0x018: 0x00000000kfdhdb.driver.reserved [5]: 0; 0x01c: 0x00000000kfdhdb.compat: 186646528; 0x020: 0x0b200000kfdhdb.dsknum: 1 0x024: 0x0001kfdhdb.grptyp: 2; 0x026: KFDGTP_NORMALkfdhdb.hdrsts: 3; 0x027: KFDHDR_MEMBERkfdhdb.dskname: DB2_0001; 0x028: length=8kfdhdb.grpname: DB2; 0x048: length=3kfdhdb.fgname: DB2_0001; 0x068: length=8kfdhdb.capname: 0x088: length=0kfdhdb.crestmp.hi: 33036942; 0x0a8: HOUR=0xe DAYS=0x14 MNTH=0x6 YEAR=0x7e0kfdhdb.crestmp.lo: 3147311104; 0x0ac: USEC=0x0 MSEC=0x20a SECS=0x39 MINS=0x2ekfdhdb.mntstmp.hi: 33036942; 0x0b0: HOUR=0xe DAYS=0x14 MNTH=0x6 YEAR=0x7e0kfdhdb.mntstmp.lo: 3163762688; 0x0b4: USEC=0x0 MSEC=0xcc SECS=0x9 MINS=0x2fkfdhdb.secsize: 512; 0x0b8: 0x0200kfdhdb.blksize: 4096; 0x0ba: 0x1000kfdhdb.ausize: 1048576 0x0bc: 0x00100000kfdhdb.mfact: 113792; 0x0c0: 0x0001bc80kfdhdb.dsksize: 2447; 0x0c4: 0x0000098fkfdhdb.pmcnt: 2; 0x0c8: 0x00000002kfdhdb.fstlocn: 1; 0x0cc: 0x00000001kfdhdb.altlocn: 2; 0x0d0: 0x00000002kfdhdb.f1b1locn: 2; 0x0d4: 0x00000002kfdhdb.redomirrors [0]: 0 0x0d8: 0x0000kfdhdb.redomirrors [1]: 0; 0x0da: 0x0000kfdhdb.redomirrors [2]: 0; 0x0dc: 0x0000kfdhdb.redomirrors [3]: 0; 0x0de: 0x0000kfdhdb.dbcompat: 168820736; 0x0e0: 0x0a100000kfdhdb.grpstmp.hi: 33036942; 0x0e4: HOUR=0xe DAYS=0x14 MNTH=0x6 YEAR=0x7e0kfdhdb.grpstmp.lo: 3147119616; 0x0e8: USEC=0x0 MSEC=0x14f SECS=0x39 MINS=0x2ekfdhdb.vfstart: 0 0x0ec: 0x00000000kfdhdb.vfend: 0; 0x0f0: 0x00000000kfdhdb.spfile: 0; 0x0f4: 0x00000000kfdhdb.spfflg: 0; 0x0f8: 0x00000000SQL > select name, path from v$asm_disk
NAME PATH -/ dev/oracleasm/disks/ASMDISK14 / dev/oracleasm/disks/ASMDISK13_DROPPED_0001_DB2DB2_0000 / dev/oracleasm/disks/ASMDISK11OHSDBA_0001 / dev/oracleasm/disks/ASMDISK10OHSDBA_0000 / dev/oracleasm/disks/ASMDISK9DATA_PGOLD_0004 / dev/oracleasm/disks/ASMDISK8DATA_PGOLD_0003 / dev/oracleasm/disks/ASMDISK7DATA_PGOLD_0002 / dev/oracleasm/disks/ASMDISK6DATA_PGOLD_0001 / dev/oracleasm/disks/ASMDISK5DATA _ PGOLD_0000 / dev/oracleasm/disks/ASMDISK4NAME PATH -SYSTEMDG_0002 / dev/oracleasm/disks/ASMDISK3SYSTEMDG_0001 / dev/oracleasm/disks/ASMDISK2SYSTEMDG_0000 / dev/oracleasm/disks/ASMDISK114 rows selected.SQL >
After being drop, try online disk again
ASMCMD > online-G db2-D DB2_0001
ORA-15032: not all alterations performedORA-15054: disk "DB2_0001" does not exist in diskgroup "DB2" (DBD ERROR: OCIStmtExecute) ASMCMD >
Try undrop disk, although no error was reported, but the disk still failed to withdraw successfully
[oracle@ohs1 ~] $sqlplus / as sysasm
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 2016: 50:17 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-Production
With the Real Application Clusters and Automatic Storage Management options
SQL > alter diskgroup db2 undrop disks Diskgroup altered.SQL > SQL > alter diskgroup db2 undrop disksNOTE: GroupBlock outside rolling migration privileged regionNOTE: requesting all-instance membership refresh for group=2Mon Jun 2016: 50:35 2016GMON updating for reconfiguration, group 2 at 17 for pid 28, osid 16254NOTE: cache closing disk 1 of grp 2: (not open) _ DROPPED_0001_DB2NOTE: group DB2: updated PST location: disk 0000 (PST copy 0) NOTE: group 2 PST updated.Mon Jun 2016: 50:36 2016NOTE: membership refresh pending for group 2/0xfb327d85 (DB2) GMON querying group 2 at 18 for pid 19 Osid 13443NOTE: cache closing disk 1 of grp 2: (not open) _ DROPPED_0001_DB2SUCCESS: refreshed membership for 2/0xfb327d85 (DB2) NOTE: starting rebalance of group 2/0xfb327d85 (DB2) at power 1SUCCESS: alter diskgroup db2 undrop disksStarting background process ARB0Mon Jun 2016: 50:38 2016ARB0 started with pid=29 OS id=16331NOTE: assigning ARB0 to group 2/0xfb327d85 (DB2) with 1 parallel I/ONOTE: stopping process ARB0SUCCESS: rebalance completed for group 2/0xfb327d85 (DB2) NOTE: Attempting voting file refresh on diskgroup DB2Mon Jun 2016: 50:41 2016NOTE: GroupBlock outside rolling migration privileged regionNOTE: requesting all-instance membership refresh for group=2GMON updating for reconfiguration, group 2 at 19 for pid 29 Osid 16336NOTE: cache closing disk 1 of grp 2: (not open) _ DROPPED_0001_DB2NOTE: group DB2: updated PST location: disk 0000 (PST copy 0) NOTE: group 2 PST updated.WARNING: offline disk number 1 has references (51 AUs) NOTE: membership refresh pending for group 2/0xfb327d85 (DB2) Mon Jun 2016: 50:48 2016GMON querying group 2 at 20 for pid 19 Osid 13443NOTE: cache closing disk 1 of grp 2: (not open) _ DROPPED_0001_DB2Mon Jun 2016: 50:48 2016SUCCESS: refreshed membership for 2/0xfb327d85 (DB2) NOTE: Attempting voting file refresh on diskgroup DB2
ASMCMD > lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files NameMOUNTED EXTERN N 512 4096 1048576 12235 10514 0 10514 0 N DATA_PGOLD/MOUNTED NORMAL N 512 4096 1048576 2447 2394 0 1197 1 N DB2/MOUNTED EXTERN N 512 4096 1048576 4894 4786 0 4786 0 N OHSDBA/MOUNTED NORMAL N 512 4096 1048576 7341 6410 2447 1981 0 Y SYSTEMDG/
ASMCMD >
NAME PATH / dev/oracleasm/disks/ASMDISK14 / dev/oracleasm/disks/ASMDISK13_DROPPED_0001_DB2DB2_0000 / dev/oracleasm/disks/ASMDISK11OHSDBA_0001 / dev/oracleasm/disks/ASMDISK10OHSDBA_0000 / dev/oracleasm/disks/ASMDISK9DATA_PGOLD_0004 / dev/oracleasm/disks/ASMDISK8DATA _ PGOLD_0003 / dev/oracleasm/disks/ASMDISK7DATA_PGOLD_0002 / dev/oracleasm/disks/ASMDISK6DATA_PGOLD_0001 / dev/oracleasm/disks/ASMDISK5DATA_PGOLD_0000 / dev/oracleasm/disks/ASMDISK4NAME PATH-- -SYSTEMDG_0002 / dev/oracleasm/disks/ASMDISK3SYSTEMDG_0001 / dev/oracleasm/disks/ASMDISK2SYSTEMDG_0000 / dev/oracleasm/disks/ASMDISK114 rows selected.SQL >
Because the disk header information did not change after offline was drop, an error occurred when adding the original disk again
SQL > alter diskgroup db2 add disk'/ dev/oracleasm/disks/ASMDISK13'
Alter diskgroup db2 add disk'/ dev/oracleasm/disks/ASMDISK13'*ERROR at line 1:ORA-15032: not all alterations performedORA-15033: disk'/ dev/oracleasm/disks/ASMDISK13' belongs to diskgroup "DB2"
SQL >
Clear the ASM disk header information and add the disk again
[oracle@ohs1 ~] $dd if=/dev/zero of=/dev/oracleasm/disks/ASMDISK13 bs=1024 count=1
1'0 records in1+0 records out1024 bytes (1.0 kB) copied, 0.00966501 seconds, 106 kB/s
[oracle@ohs1 ~] $kfed read / dev/oracleasm/disks/ASMDISK13
Kfbh.endian: 0; 0x000: 0x00kfbh.hard: 0; 0x001: 0x00kfbh.type: 0; 0x002: KFBTYP_INVALIDkfbh.datfmt: 0; 0x003: 0x00kfbh.block.blk: 0; 0x004: blk=0kfbh.block.obj: 0 0x008: file=0kfbh.check: 0; 0x00c: 0x00000000kfbh.fcn.base: 0; 0x010: 0x00000000kfbh.fcn.wrap: 0; 0x014: 0x00000000kfbh.spare1: 0; 0x018: 0x00000000kfbh.spare2: 0 0x01c: 0x00000000B7F60200 00000000 00000000 00000000 [.] Repeat 255 timesKFED-00322: Invalid content encountered during block traversal: [kfbtTraverseBlock] [Invalid OSM block type] [] [0]
[oracle@ohs1 ~] $sqlplus / as sysasm
SQL*Plus: Release 11.2.0.3.0 Production on Mon Jun 20 17:13:37 2016Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-ProductionWith the Real Application Clusters and Automatic Storage Management optionsSQL > alter diskgroup db2 add disk'/ dev/oracleasm/disks/ASMDISK13';Diskgroup altered.SQL > Note: after the disk is drop, the disk header does not change. If there is no problem with the disk itself, and you want to reuse the disk, you must clear the disk header before you can add it again.
Reference
Oracle ASM Fast Mirror Resync
Http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmdiskgrps.htm#OSTMG10044
Disk group attribute
Http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmdiskgrps.htm#OSTMG10045
Http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmdiskgrps.htm#OSTMG137
Http://docs.oracle.com/database/121/OSTMG/GUID-7A52077C-DCE5-44E0-BFA9-D30F485B8079.htm#GUID-1E46D1B6-F0A6-444D-A222-995069BCEF2F
Http://docs.oracle.com/database/121/HABPT/config_storage.htm#HABPT4813
=
Http://www.oratea.com/2017/05/19/disk_repair_time%E4%BB%8B%E7%BB%8D/
DISK_REPAIR_TIME introduction 1. Introduction
When the ASM disk is drop, ASM initiates rebalancing to ensure that the extent involved in the drop disk is redundant again, but ASM rebalancing is time-consuming and involves a large number of IO operations on other disks. But sometimes the disk may be temporarily offline due to maintenance or other reasons, if a short period of offline rebalance occurs, and when the disk is added back, it is a bit unacceptable. So ASM provides fast disk synchronization. During disk OFFLINE, ASM records the extent involved in the OFFLINE disk, and when the disk is restored, ASM quickly synchronizes the changed extent on the disk.
If the disk OFFLINE for a long time, this is actually risky, because in the case of NORMAL redundancy, there is only one extent involved in the OFFLINE disk, so ASM provides a disk group attribute DISK_REPAIR_NAME, indicating how long it will take for the disk on this disk group to be rebalanced by DROP,ASM. This value defaults to 3.6h.
If you have planned disk OFFLINE maintenance, 3.6 hours may not be enough, such as Exadata's Cell node upgrade, so you may need to increase this value first.
-- when the disk group is normal, the command to set this value is as follows:
SQL > ALTER DISKGROUP DATA SET ATTRIBUTE 'disk_repair_time'=' 36h'
But if the disk has been offline, how to set offline's disk for how long to drop? The orders are a little different.
two。 Determine how long after the disk is drop
-- check the countdown before the disk is dropped by drop in ASM's alert log, as follows:
WARNING: Disk 0 (DATA_CD_00_DMORLCEL08) in group 1 will be dropped in: (12960) secs on ASM inst 1
WARNING: Disk 1 (DATA_CD_01_DMORLCEL08) in group 1 will be dropped in: (12960) secs on ASM inst 1
WARNING: Disk 2 (DATA_CD_02_DMORLCEL08) in group 1 will be dropped in: (12960) secs on ASM inst 1
-- check DISK_REPAIR_NAME
SQL > column name format A30
SQL > column value format A30
SQL > select name,value from v$asm_attribute where group_number=1 and name like'% disk_repair_time%'
NAME VALUE
Disk_repair_time 3.6h
3. Extend DISK_REPAIR_TIME
If a failgroup fails and all the disks on the failgroup are already OFFLINE, you can use the following command to extend the DISK_REPAIR_TIME
SQL > ALTER DISKGROUP OFFLINE DISKS IN FAILGROUP DROP AFTER 5H
-- then check the alert log of ASM to see if it is valid, for example:
WARNING: Disk 2 (DATA_CD_02_DMORLCEL08) in group 1 will be dropped in: (18000) secs on ASM inst 1
WARNING: Disk 3 (DATA_CD_03_DMORLCEL08) in group 1 will be dropped in: (18000) secs on ASM inst 1
WARNING: Disk 4 (DATA_CD_04_DMORLCEL08) in group 1 will be dropped in: (18000) secs on ASM inst 1
WARNING: Disk 5 (DATA_CD_05_DMORLCEL08) in group 1 will be dropped in: (18000) secs on ASM inst 1
-- if there is only one disk offline, the command is as follows:
SQL > ALTER DISKGROUP OFFLINE DISK DROP AFTER 5H
-- check disk name
SQL > col path format A59
SQL > set lines 200
SQL > set pagesi 400
SQL > select path, name, header_status, mode_status, mount_status, state, failgroup from v$asm_disk order by path
4. Drop disk now
-- if the disk repair time is expected to be long, you can immediately drop the disk and start rebalancing instead of waiting for the DISK_REPAIR_TIME time to start.
If failgroup fails, the command is as follows:
ALTER DISKGROUP DROP DISKS IN FAILGROUP FORCE
If a disk fails, the command is as follows:
ALTER DISKGROUP DROP DISK FORCE
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.