Asm MD Backup Restore Command
Asm MD Backup Restore Command
Asm MD Backup Restore Command
piece handle=+DFILE/ORCL/BACKUPSET/2015_11_16/nnndf0_tag20151116t060442_0.263.89
5903483 tag=TAG20151116T060442 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25
Finished backup at 16-NOV-15
Starting backup at 16-NOV-15
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=11 RECID=3 STAMP=895903509
channel ORA_DISK_1: starting piece 1 at 16-NOV-15
channel ORA_DISK_1: finished piece 1 at 16-NOV-15
piece handle=+DFILE/ORCL/BACKUPSET/2015_11_16/annnf0_tag20151116t060509_0.265.89
5903509 tag=TAG20151116T060509 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 16-NOV-15
Starting Control File and SPFILE Autobackup at 16-NOV-15
piece handle=+DFILE/ORCL/AUTOBACKUP/2015_11_16/s_895903516.266.895903517 comment
=NONE
Finished Control File and SPFILE Autobackup at 16-NOV-15
SQL> column path format a40
SQL> /
NAME
-----------------------------DATA011
DATA012
DATA013
PATH
---------------------------------------ORCL:DATA011
ORCL:DATA012
ORCL:DATA013
PATH
NAME
---------------------------------------- ------ORCL:DATA011
ORCL:DATA012
ORCL:DATA013
DATA011
DATA012
DATA013
Version: 12.1.0.2.0
kfed read /dev/asm_h002 | egrep 'ausize|dsknum|dskname|grpname|fgname'
kfed read /dev/oracleasm/disks/DATA011 | egrep 'ausize|dsknum|dskname|grpname|fg
name'
[oracle@collabn2 disks]$ kfed read /dev/oracleasm/disks/DATA011 | egrep 'ausize|
dsknum|dskname|grpname|fgname'
kfdhdb.dsknum:
0 ; 0x024: 0x0000
kfdhdb.dskname:
DATA011 ; 0x028: length=7
kfdhdb.grpname:
DATA ; 0x048: length=4
kfdhdb.fgname:
DATA011 ; 0x068: length=7
kfdhdb.ausize:
1048576 ; 0x0bc: 0x00100000
pvcreate /dev/oracleasm/disks/DATA011
[root@collabn2 ~]# pvcreate /dev/oracleasm/disks/DATA011
Writing physical volume data to disk "/dev/oracleasm/disks/DATA011"
Physical volume "/dev/oracleasm/disks/DATA011" successfully created
[oracle@collabn2 disks]$ dd if=/dev/zero of=/dev/oracleasm/disks/DATA011 bs=512
count=1
1+0 records in
1+0 records out
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64
bit Production
With the Automatic Storage Management option
[oracle@collabn2 grid]$ asmcmd
ASMCMD> cd data
ASMCMD> ls -ltr
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
Type Redund Striped Time
ASMCMD> cd orcl
Sys Name
N
ASM/
N
ORCL/
ASMCMD> ls
ASMCMD> cd ..
ASMCMD> cd asm
ASMCMD> ls -ltr
WARNING:option 'r' is deprecated for 'ls'
please use 'reverse'
ASMCMD> ls
SQL> startup nomount;
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/orcl/spfileorcl.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/spfileorcl.ora
ORA-15056: additional error message
ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/spfileorcl.ora
ORA-15173: entry 'spfileorcl.ora' does not exist in directory 'orcl'
ORA-06512: at line 4
RMAN> restore controlfile from '/u01/app/oracle/s_895903516.266.895903517';
Starting restore at 16-NOV-15
using channel ORA_DISK_1
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/u01/app/oracle/product/12.1.0/dbhome_1/dbs/cntrlorcl.dbf
Finished restore at 16-NOV-15
DBID=1423683324
CREATE DISKGROUP DATA EXTERNAL REDUNDANCY DISK'/dev/oracleasm/disks/DATA011' NAM
E DATA011,'/dev/oracleasm/disks/DATA012' NAME DATA012;
'/dev/asm_h002' NAME DATA013
ATTRIBUTE 'au_size'='4M',
Hi Friends,
I want to share a situation that happened to me recently.
I closed my database running on ASM and also ASM instance successfully. I moved
my ASM disks to a new server. After the installation Oracle software (Grid Infra
structure and RDBMS) on the new server, I got the following error when I tried
to mount the DATA diskgroup.
ovmdbtest1.asyalocal.com.tr@09:52:05> asmcmd
ASMCMD> mount DATA
ORA-15032: not all alterations performed
ORA-15017: diskgroup DATA cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup
ERROR: OCIStmtExecute)
ASMCMD>
DATA (DBD
Same as;
SQL> alter diskgroup DATA mount;
alter diskgroup DATA mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15017: diskgroup DATA cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup
DATA
I think, one or more of ASM disk s header was corrupted. I checked my disks usi
ng ASMCA utility and it shows the status of 2 disks as PROVISIONED . Similarly, k
fod utility also shows the status of 2 disks as PROVISIONED .
# $GRID_HOME/bin/kfod status=TRUE asm_diskstring= /dev/raw/raw*
TRUE
disk=all dscvgroup=
; 0x000: 0x01
; 0x001: 0x82
; 0x002: KFBTYP_DISKHEAD
; 0x003: 0x01
; 0x004: blk=0
; 0x008: disk=0
; 0x00c: 0x385ae359
; 0x010: 0x00000000
; 0x014: 0x00000000
; 0x018: 0x00000000
; 0x01c: 0x00000000
length=32
kfdhdb.driver.reserved[0]:
kfdhdb.driver.reserved[1]:
kfdhdb.driver.reserved[2]:
kfdhdb.driver.reserved[3]:
kfdhdb.driver.reserved[4]:
kfdhdb.driver.reserved[5]:
kfdhdb.compat:
kfdhdb.dsknum:
kfdhdb.grptyp:
kfdhdb.hdrsts:
kfdhdb.dskname:
kfdhdb.grpname:
kfdhdb.fgname:
kfdhdb.capname:
kfdhdb.crestmp.hi:
AR=0x7dd
kfdhdb.crestmp.lo:
INS=0x3a
kfdhdb.mntstmp.hi:
R=0x7dd
kfdhdb.mntstmp.lo:
NS=0x3b
kfdhdb.secsize:
kfdhdb.blksize:
kfdhdb.ausize:
kfdhdb.mfact:
kfdhdb.dsksize:
kfdhdb.pmcnt:
kfdhdb.fstlocn:
kfdhdb.altlocn:
kfdhdb.f1b1locn:
kfdhdb.redomirrors[0]:
kfdhdb.redomirrors[1]:
kfdhdb.redomirrors[2]:
kfdhdb.redomirrors[3]:
kfdhdb.dbcompat:
kfdhdb.grpstmp.hi:
AR=0x7dd
kfdhdb.grpstmp.lo:
INS=0x3a
kfdhdb.vfstart:
kfdhdb.vfend:
kfdhdb.spfile:
kfdhdb.spfflg:
kfdhdb.ub4spare[0]:
kfdhdb.ub4spare[1]:
kfdhdb.ub4spare[2]:
kfdhdb.ub4spare[3]:
kfdhdb.ub4spare[4]:
kfdhdb.ub4spare[5]:
kfdhdb.ub4spare[6]:
kfdhdb.ub4spare[7]:
kfdhdb.ub4spare[8]:
kfdhdb.ub4spare[9]:
kfdhdb.ub4spare[10]:
kfdhdb.ub4spare[11]:
kfdhdb.ub4spare[12]:
kfdhdb.ub4spare[13]:
kfdhdb.ub4spare[14]:
kfdhdb.ub4spare[15]:
33686018
33686018
33686018
33686018
33686018
33686018
186646528
0
1
3
DATA_0000
DATA
DATA_0000
;
;
;
;
;
;
;
;
;
;
;
;
;
;
32983952 ;
0x008:
0x00c:
0x010:
0x014:
0x018:
0x01c:
0x020:
0x024:
0x026:
0x027:
0x028:
0x048:
0x068:
0x088:
0x0a8:
0x02020202
0x02020202
0x02020202
0x02020202
0x02020202
0x02020202
0x0b200000
0x0000
KFDGTP_EXTERNAL
KFDHDR_MEMBER
length=9
length=4
length=9
length=0
HOUR=0x10 DAYS=0x1c MNTH=0x2 YE
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
0x0b8:
0x0ba:
0x0bc:
0x0c0:
0x0c4:
0x0c8:
0x0cc:
0x0d0:
0x0d4:
0x0d8:
0x0da:
0x0dc:
0x0de:
0x0e0:
0x0e4:
0x0200
0x1000
0x00100000
0x0001bc80
0x0007d000
0x00000006
0x00000001
0x00000002
0x00000002
0x0000
0x0000
0x0000
0x0000
0x0a100000
HOUR=0x10 DAYS=0x1c MNTH=0x2 YE
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
0x0ec:
0x0f0:
0x0f4:
0x0f8:
0x0fc:
0x100:
0x104:
0x108:
0x10c:
0x110:
0x114:
0x118:
0x11c:
0x120:
0x124:
0x128:
0x12c:
0x130:
0x134:
0x138:
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
kfdhdb.ub4spare[16]:
kfdhdb.ub4spare[17]:
kfdhdb.ub4spare[18]:
kfdhdb.ub4spare[19]:
kfdhdb.ub4spare[20]:
kfdhdb.ub4spare[21]:
kfdhdb.ub4spare[22]:
kfdhdb.ub4spare[23]:
kfdhdb.ub4spare[24]:
kfdhdb.ub4spare[25]:
kfdhdb.ub4spare[26]:
kfdhdb.ub4spare[27]:
kfdhdb.ub4spare[28]:
kfdhdb.ub4spare[29]:
kfdhdb.ub4spare[30]:
kfdhdb.ub4spare[31]:
kfdhdb.ub4spare[32]:
kfdhdb.ub4spare[33]:
kfdhdb.ub4spare[34]:
kfdhdb.ub4spare[35]:
kfdhdb.ub4spare[36]:
kfdhdb.ub4spare[37]:
kfdhdb.ub4spare[38]:
kfdhdb.ub4spare[39]:
kfdhdb.ub4spare[40]:
kfdhdb.ub4spare[41]:
kfdhdb.ub4spare[42]:
kfdhdb.ub4spare[43]:
kfdhdb.ub4spare[44]:
kfdhdb.ub4spare[45]:
kfdhdb.ub4spare[46]:
kfdhdb.ub4spare[47]:
kfdhdb.ub4spare[48]:
kfdhdb.ub4spare[49]:
kfdhdb.ub4spare[50]:
kfdhdb.ub4spare[51]:
kfdhdb.ub4spare[52]:
kfdhdb.ub4spare[53]:
kfdhdb.acdb.aba.seq:
kfdhdb.acdb.aba.blk:
kfdhdb.acdb.ents:
kfdhdb.acdb.ub2spare:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
254613
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
43605
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
0x13c:
0x140:
0x144:
0x148:
0x14c:
0x150:
0x154:
0x158:
0x15c:
0x160:
0x164:
0x168:
0x16c:
0x170:
0x174:
0x178:
0x17c:
0x180:
0x184:
0x188:
0x18c:
0x190:
0x194:
0x198:
0x19c:
0x1a0:
0x1a4:
0x1a8:
0x1ac:
0x1b0:
0x1b4:
0x1b8:
0x1bc:
0x1c0:
0x1c4:
0x1c8:
0x1cc:
0x1d0:
0x1d4:
0x1d8:
0x1dc:
0x1de:
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x0003e295
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x0000
0xaa55
The header information was corrupted. kfed output for the disk affected shows 0x
aa55 on
kfdhdb.acdb.ub2spare field. I backed up the header information using dd command.
# dd if=/dev/raw/raw2 of=/tmp/DATA.dd bs=1M count=10
I got the allocation unit size of damaged disk.
# $GRID_HOME/bin/kfed read /dev/raw/raw2 | grep ausize
Now we can repair damaged header information.
# $GRID_HOME/bin/kfed repair /dev/raw/raw2 aus=1048576
I rechecked the header information of damaged disk using kfed utility. Now,
kfed output for the disk affected shows 0x0000 on kfdhdb.acdb.ub2spare field
; 0x000: 0x01
; 0x001: 0x82
; 0x002: KFBTYP_DISKHEAD
; 0x003: 0x01
; 0x004: blk=0
; 0x008: disk=0
; 0x00c: 0x385ae359
; 0x010: 0x00000000
; 0x014: 0x00000000
; 0x018: 0x00000000
; 0x01c: 0x00000000
length=32
; 0x008: 0x02020202
; 0x00c: 0x02020202
; 0x010: 0x02020202
; 0x014: 0x02020202
; 0x018: 0x02020202
; 0x01c: 0x02020202
; 0x020: 0x0b200000
; 0x024: 0x0000
; 0x026: KFDGTP_EXTERNAL
; 0x027: KFDHDR_MEMBER
; 0x028: length=9
; 0x048: length=4
; 0x068: length=9
; 0x088: length=0
; 0x0a8: HOUR=0x10 DAYS=0x1c MNTH=0x2 YE
; 0x0ac: USEC=0x0 MSEC=0x361 SECS=0x11 M
; 0x0b0: HOUR=0x10 DAYS=0xc MNTH=0x3 YEA
; 0x0b4: USEC=0x0 MSEC=0x239 SECS=0xd MI
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
0x0b8:
0x0ba:
0x0bc:
0x0c0:
0x0c4:
0x0c8:
0x0cc:
0x0d0:
0x0d4:
0x0d8:
0x0da:
0x0dc:
0x0de:
0x0e0:
0x0e4:
0x0200
0x1000
0x00100000
0x0001bc80
0x0007d000
0x00000006
0x00000001
0x00000002
0x00000002
0x0000
0x0000
0x0000
0x0000
0x0a100000
HOUR=0x10 DAYS=0x1c MNTH=0x2 YE
0x0ec:
0x0f0:
0x0f4:
0x0f8:
0x0fc:
0x100:
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
kfdhdb.ub4spare[2]:
kfdhdb.ub4spare[3]:
kfdhdb.ub4spare[4]:
kfdhdb.ub4spare[5]:
kfdhdb.ub4spare[6]:
kfdhdb.ub4spare[7]:
kfdhdb.ub4spare[8]:
kfdhdb.ub4spare[9]:
kfdhdb.ub4spare[10]:
kfdhdb.ub4spare[11]:
kfdhdb.ub4spare[12]:
kfdhdb.ub4spare[13]:
kfdhdb.ub4spare[14]:
kfdhdb.ub4spare[15]:
kfdhdb.ub4spare[16]:
kfdhdb.ub4spare[17]:
kfdhdb.ub4spare[18]:
kfdhdb.ub4spare[19]:
kfdhdb.ub4spare[20]:
kfdhdb.ub4spare[21]:
kfdhdb.ub4spare[22]:
kfdhdb.ub4spare[23]:
kfdhdb.ub4spare[24]:
kfdhdb.ub4spare[25]:
kfdhdb.ub4spare[26]:
kfdhdb.ub4spare[27]:
kfdhdb.ub4spare[28]:
kfdhdb.ub4spare[29]:
kfdhdb.ub4spare[30]:
kfdhdb.ub4spare[31]:
kfdhdb.ub4spare[32]:
kfdhdb.ub4spare[33]:
kfdhdb.ub4spare[34]:
kfdhdb.ub4spare[35]:
kfdhdb.ub4spare[36]:
kfdhdb.ub4spare[37]:
kfdhdb.ub4spare[38]:
kfdhdb.ub4spare[39]:
kfdhdb.ub4spare[40]:
kfdhdb.ub4spare[41]:
kfdhdb.ub4spare[42]:
kfdhdb.ub4spare[43]:
kfdhdb.ub4spare[44]:
kfdhdb.ub4spare[45]:
kfdhdb.ub4spare[46]:
kfdhdb.ub4spare[47]:
kfdhdb.ub4spare[48]:
kfdhdb.ub4spare[49]:
kfdhdb.ub4spare[50]:
kfdhdb.ub4spare[51]:
kfdhdb.ub4spare[52]:
kfdhdb.ub4spare[53]:
kfdhdb.acdb.aba.seq:
kfdhdb.acdb.aba.blk:
kfdhdb.acdb.ents:
kfdhdb.acdb.ub2spare:
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
0x104:
0x108:
0x10c:
0x110:
0x114:
0x118:
0x11c:
0x120:
0x124:
0x128:
0x12c:
0x130:
0x134:
0x138:
0x13c:
0x140:
0x144:
0x148:
0x14c:
0x150:
0x154:
0x158:
0x15c:
0x160:
0x164:
0x168:
0x16c:
0x170:
0x174:
0x178:
0x17c:
0x180:
0x184:
0x188:
0x18c:
0x190:
0x194:
0x198:
0x19c:
0x1a0:
0x1a4:
0x1a8:
0x1ac:
0x1b0:
0x1b4:
0x1b8:
0x1bc:
0x1c0:
0x1c4:
0x1c8:
0x1cc:
0x1d0:
0x1d4:
0x1d8:
0x1dc:
0x1de:
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x00000000
0x0000
0x0000
nt backup plan.
I did not take a backup of damaged ASM disk header information before. So how wa
s the recovery
process above? There is a second copy of ASM disk header information. kfed repai
rs the corrupted block from second copy.
If our second copy of the header information was corrupted also then we could r
epair the header information using backup