AMDU恢复ASM磁盘组数据(測)
--umount
ASMCMD> umoung -a asmdg
commands:md_backup, md_restor
lsattr, setattr
cd, cp, du, find, help, ls, lsct, lsdg, lsof, mkalias
mkdir, pwd, rm, rmalias
chdg, chkdg, dropdg, iostat, lsdsk, lsod, mkdg, mount
offline, online, rebal, remap, umount
dsget, dsset, lsop, shutdown, spbackup, spcopy, spget
spmove, spset, startup
chtmpl, lstmpl, mktmpl, rmtmpl
chgrp, chmod, chown, groups, grpmod, lsgrp, lspwusr, lsusr
mkgrp, mkusr, orapwusr, passwd, rmgrp, rmus
volcreate, voldelete, voldisable, volenable, volinfo
volresize, volset, volstat
ASMCMD> umount -f asmdg
--amdu
[oracle@rac1 amdu_2014_07_21_17_39_19]$ amdu -extract ASMDG.259
amdu_2014_07_21_17_45_08/
[oracle@rac1 amdu_2014_07_21_17_39_19]$ ll
total 4
drwxr-xr-x 2 oracle oinstall 4096 Jul 21 17:45 amdu_2014_07_21_17_45_08
[oracle@rac1 amdu_2014_07_21_17_39_19]$ cd *
[oracle@rac1 amdu_2014_07_21_17_45_08]$ ll
total 21804
-rw-r--r-- 1 oracle oinstall 22290432 Jul 21 17:45 ASMDG_259.f
-rw-r--r-- 1 oracle oinstall 4885 Jul 21 17:45 report.txt
[oracle@rac1 amdu_2014_07_21_17_45_08]$ more *txt
-*-amdu-*-
******************************* AMDU Settings ********************************
ORACLE_HOME = /orac/orahome/app/11.2.0/grid
System name: Linux
Node name: rac1
Release: 2.6.32-200.13.1.el5uek
Version: #1 SMP Wed Jul 27 20:21:26 EDT 2011
Machine: i686
amdu run: 21-JUL-14 17:45:08
Endianess: 1
----------------------------- DISK REPORT N0001 ------------------------------
Disk Path: ORCL:VOL1
Unique Disk ID:
Disk Label: VOL1
Physical Sector Size: 512 bytes
Disk Size: 10236 megabytes
Group Name: ASMDG
Disk Name: VOL1
Failure Group Name: VOL1
Disk Number: 0
Header Status: 3
Disk Creation Time: 2014/06/01 18:59:30.870000
Last Mount Time: 2014/07/08 08:28:54.180000
Compatibility Version: 0x0b200000(11020000)
Disk Sector Size: 512 bytes
Disk size in AUs: 10236 AUs
Group Redundancy: 1
Metadata Block Size: 4096 bytes
AU Size: 1048576 bytes
Stride: 113792 AUs
Group Creation Time: 2014/06/01 18:59:30.618000
File 1 Block 1 location: AU 2
OCR Present: NO
----------------------------- DISK REPORT N0002 ------------------------------
Disk Path: ORCL:VOL2
Unique Disk ID:
Disk Label: VOL2
Physical Sector Size: 512 bytes
Disk Size: 10236 megabytes
Group Name: ASMDG
Disk Name: VOL2
Failure Group Name: VOL2
Disk Number: 1
Header Status: 3
Disk Creation Time: 2014/06/01 18:59:30.870000
Last Mount Time: 2014/07/08 08:28:54.180000
Compatibility Version: 0x0b200000(11020000)
Disk Sector Size: 512 bytes
Disk size in AUs: 10236 AUs
Group Redundancy: 1
Metadata Block Size: 4096 bytes
AU Size: 1048576 bytes
Stride: 113792 AUs
Group Creation Time: 2014/06/01 18:59:30.618000
File 1 Block 1 location: AU 0
OCR Present: NO
***************** Slept for 6 seconds waiting for heartbeats *****************
************************** SCANNING DISKGROUP ASMDG **************************
Creation Time: 2014/06/01 18:59:30.618000
Disks Discovered: 2
Redundancy: 1
AU Size: 1048576 bytes
Metadata Block Size: 4096 bytes
Physical Sector Size: 512 bytes
Metadata Stride: 113792 AU
Duplicate Disk Numbers: 0
----------------------- SCANNING DISK N0001 -----------------------------
Disk N0001: 'ORCL:VOL1'
Allocated AU's: 780
Free AU's: 9456
AU's read for dump: 0
Block images saved: 0
Map lines written: 0
Heartbeats seen: 0
Corrupt metadata blocks: 0
Corrupt AT blocks: 0
---------------------------- SCANNING DISK N0002 -----------------------------
Disk N0002: 'ORCL:VOL2'
Allocated AU's: 773
Free AU's: 9463
AU's read for dump: 0
Block images saved: 0
Map lines written: 0
Heartbeats seen: 0
Corrupt metadata blocks: 0
Corrupt AT blocks: 0
------------------------ SUMMARY FOR DISKGROUP ASMDG -------------------------
Allocated AU's: 1553
Free AU's: 18919
AU's read for dump: 0
Block images saved: 0
Map lines written: 0
Heartbeats seen: 0
Corrupt metadata blocks: 0
Corrupt AT blocks: 0
************************* EXTRACTING FILE ASMDG.259 **************************
Creating file: ASMDG_259.f
Extraction wrote: 22290432 bytes
Stripe size: 1048576 bytes
Stripe columns: 1
Mirror copies: 1
Block size: 8192 bytes
File size: 2721 blocks
File type: 12
Extent size #1: 4294967295 extents of 1 AUs
Extent size #2: 0 extents of 1 AUs
Extent size #3: 0 extents of 1 AUs
Extent size #4: 4294967295 extents of 1 AUs
Creation time: 2014/06/01 19:03:04.399000
Modified time: 2014/07/21 17:00:00.000000
Data extents in file: 22
Data extents found: 22
Blocks not found: 0 blocks
******************************* END OF REPORT ********************************
[oracle@rac1 amdu_2014_07_21_17_45_08]$ rm -rf *
--mount
ASMCMD> mount asmdg
ASMCMD> lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 20472 18919 0 18919 0 N ASMDG/
[oracle@rac1 amdu_2014_07_21_17_45_08]$ amdu -extract ASMDG.259
amdu_2014_07_21_17_46_09/
AMDU-00204: Disk N0001 is in currently mounted diskgroup ASMDG
AMDU-00201: Disk N0001: 'ORCL:VOL1'
[oracle@rac1 amdu_2014_07_21_17_45_08]$ ll
total 4
drwxr-xr-x 2 oracle oinstall 4096 Jul 21 17:46 amdu_2014_07_21_17_46_09
[oracle@rac1 amdu_2014_07_21_17_45_08]$ cd *
[oracle@rac1 amdu_2014_07_21_17_46_09]$ ll
total 21804
-rw-r--r-- 1 oracle oinstall 22290432 Jul 21 17:46 ASMDG_259.f
-rw-r--r-- 1 oracle oinstall 5009 Jul 21 17:46 report.txt
[oracle@rac1 amdu_2014_07_21_17_46_09]$
听说:
asm磁盘元数据不能够损坏。不然,无法数据回复。
备份与维护
ASMCMD>
ASMCMD> md_backup /tmp/oradgbackup_20140721
Disk group metadata to be backed up: ASMDG
Current alias directory path: ASMDB/ONLINELOG
Current alias directory path: ASMDB
Current alias directory path: ASMDB/TEMPFILE
Current alias directory path: ASM/DATAFILE
Current alias directory path: ASMDB/DATAFILE
Current alias directory path: ASM/ASMPARAMETERFILE
Current alias directory path: ASMDB/PARAMETERFILE
Current alias directory path: ASM
Current alias directory path: ASMDB/CONTROLFILE
[oracle@rac1 ~]$ more /tmp/oradgbackup_20140721
@diskgroup_set = (
{
'ATTRINFO' => {
'TEMPLATE.PARAMETERFILE.MIRROR_REGION' => '0',
'TEMPLATE.TEMPFILE.REDUNDANCY' => '17',
'TEMPLATE.OCRBACKUP.REDUNDANCY' => '17',
'TEMPLATE.TEMPFILE.MIRROR_REGION' => '0',
'TEMPLATE.PARAMETERFILE.REDUNDANCY' => '17',
'SECTOR_SIZE' => '512',
'TEMPLATE.DATAGUARDCONFIG.REDUNDANCY' => '17',
'ACCESS_CONTROL.UMASK' => '066',
'TEMPLATE.ASM_STALE.STRIPE' => '0',
'TEMPLATE.ARCHIVELOG.STRIPE' => '0',
'TEMPLATE.DATAGUARDCONFIG.PRIMARY_REGION' => '0',
'TEMPLATE.OCRBACKUP.STRIPE' => '0',
'TEMPLATE.DATAFILE.STRIPE' => '0',
'AU_SIZE' => '1048576',
'TEMPLATE.ASMPARAMETERFILE.STRIPE' => '0',
'TEMPLATE.CHANGETRACKING.PRIMARY_REGION' => '0',
'TEMPLATE.CONTROLFILE.REDUNDANCY' => '17',
'TEMPLATE.FLASHFILE.STRIPE' => '0',
'TEMPLATE.BACKUPSET.PRIMARY_REGION' => '0',
'TEMPLATE.ARCHIVELOG.PRIMARY_REGION' => '0',
'TEMPLATE.CHANGETRACKING.STRIPE' => '0',
'TEMPLATE.ONLINELOG.PRIMARY_REGION' => '0',
'TEMPLATE.CHANGETRACKING.REDUNDANCY' => '17',
'TEMPLATE.BACKUPSET.STRIPE' => '0',
'TEMPLATE.OCRFILE.MIRROR_REGION' => '0',
'DISK_REPAIR_TIME' => '3.6h',
'TEMPLATE.FLASHBACK.MIRROR_REGION' => '0',
'TEMPLATE.AUTOBACKUP.REDUNDANCY' => '17',
'TEMPLATE.DUMPSET.REDUNDANCY' => '17',
'TEMPLATE.ASM_STALE.REDUNDANCY' => '17',
'TEMPLATE.DUMPSET.PRIMARY_REGION' => '0',
'TEMPLATE.DUMPSET.MIRROR_REGION' => '0',
'TEMPLATE.FLASHBACK.PRIMARY_REGION' => '0',
'TEMPLATE.CONTROLFILE.STRIPE' => '1',
'TEMPLATE.DATAFILE.REDUNDANCY' => '17',
'TEMPLATE.XTRANSPORT.REDUNDANCY' => '17',
'TEMPLATE.AUTOBACKUP.PRIMARY_REGION' => '0',
'TEMPLATE.CONTROLFILE.MIRROR_REGION' => '0',
'TEMPLATE.DATAFILE.PRIMARY_REGION' => '0',
'TEMPLATE.ASMPARAMETERFILE.REDUNDANCY' => '17',
'TEMPLATE.FLASHFILE.MIRROR_REGION' => '0',
'TEMPLATE.ASM_STALE.MIRROR_REGION' => '0',
'TEMPLATE.FLASHBACK.REDUNDANCY' => '17',
'TEMPLATE.DATAGUARDCONFIG.STRIPE' => '0',
'CELL.SMART_SCAN_CAPABLE' => 'FALSE',
'TEMPLATE_VERSION' => '186646528',
'TEMPLATE.PARAMETERFILE.STRIPE' => '0',
'TEMPLATE.DATAFILE.MIRROR_REGION' => '0',
'TEMPLATE.PARAMETERFILE.PRIMARY_REGION' => '0',
'TEMPLATE.BACKUPSET.MIRROR_REGION' => '0',
'TEMPLATE.OCRBACKUP.MIRROR_REGION' => '0',
'TEMPLATE.ONLINELOG.REDUNDANCY' => '17',
'TEMPLATE.ASMPARAMETERBAKFILE.STRIPE' => '0',
'ACCESS_CONTROL.ENABLED' => 'FALSE',
'TEMPLATE.DATAGUARDCONFIG.MIRROR_REGION' => '0',
'TEMPLATE.TEMPFILE.PRIMARY_REGION' => '0',
'COMPATIBLE.RDBMS' => '10.1.0.0.0',
'TEMPLATE.FLASHFILE.PRIMARY_REGION' => '0',
'TEMPLATE.ONLINELOG.MIRROR_REGION' => '0',
'TEMPLATE.FLASHFILE.REDUNDANCY' => '17',
'TEMPLATE.OCRBACKUP.PRIMARY_REGION' => '0',
'TEMPLATE.OCRFILE.STRIPE' => '0',
'TEMPLATE.ASM_STALE.PRIMARY_REGION' => '0',
'TEMPLATE.AUTOBACKUP.MIRROR_REGION' => '0',
'TEMPLATE.XTRANSPORT.PRIMARY_REGION' => '0',
'TEMPLATE.ASMPARAMETERBAKFILE.PRIMARY_REGION' => '0',
'TEMPLATE.DUMPSET.STRIPE' => '0',
'TEMPLATE.TEMPFILE.STRIPE' => '0',
'TEMPLATE.OCRFILE.PRIMARY_REGION' => '0',
'TEMPLATE.ONLINELOG.STRIPE' => '0',
'TEMPLATE.ARCHIVELOG.REDUNDANCY' => '17',
'TEMPLATE.OCRFILE.REDUNDANCY' => '17',
'TEMPLATE.ARCHIVELOG.MIRROR_REGION' => '0',
'TEMPLATE.ASMPARAMETERFILE.MIRROR_REGION' => '0',
'TEMPLATE.FLASHBACK.STRIPE' => '0',
'TEMPLATE.XTRANSPORT.MIRROR_REGION' => '0',
'TEMPLATE.CONTROLFILE.PRIMARY_REGION' => '0',
'TEMPLATE.BACKUPSET.REDUNDANCY' => '17',
'TEMPLATE.XTRANSPORT.STRIPE' => '0',
'TEMPLATE.ASMPARAMETERBAKFILE.REDUNDANCY' => '17',
'TEMPLATE.CHANGETRACKING.MIRROR_REGION' => '0',
'COMPATIBLE.ASM' => '11.2.0.0.0',
'TEMPLATE.ASMPARAMETERFILE.PRIMARY_REGION' => '0',
'TEMPLATE.ASMPARAMETERBAKFILE.MIRROR_REGION' => '0',
'TEMPLATE.AUTOBACKUP.STRIPE' => '0'
},
'DISKSINFO' => {
'VOL1' => {
'VOL1' => {
'TOTAL_MB' => '10236',
'FAILGROUP' => 'VOL1',
'NAME' => 'VOL1',
'DGNAME' => 'ASMDG',
'PATH' => 'ORCL:VOL1'
}
},
'VOL2' => {
'VOL2' => {
'TOTAL_MB' => '10236',
'FAILGROUP' => 'VOL2',
'NAME' => 'VOL2',
'DGNAME' => 'ASMDG',
'PATH' => 'ORCL:VOL2'
}
}
},
'DGINFO' => {
'DGTORESTORE' => 0,
'DGCOMPAT' => '11.2.0.0.0',
'DGNAME' => 'ASMDG',
'DGDBCOMPAT' => '10.1.0.0.0',
'DGTYPE' => 'EXTERN',
'DGAUSZ' => '1048576'
},
'ALIASINFO' => {
'6' => {
'DGNAME' => 'ASMDG',
'LEVEL' => 1,
'ALIASNAME' => 'ASMDB/ONLINELOG',
'REFERENCE_INDEX' => '16777534'
},
'3' => {
'DGNAME' => 'ASMDG',
'LEVEL' => 1,
'ALIASNAME' => 'ASM/DATAFILE',
'REFERENCE_INDEX' => '16777693'
},
'7' => {
'DGNAME' => 'ASMDG',
'LEVEL' => 1,
'ALIASNAME' => 'ASMDB/TEMPFILE',
'REFERENCE_INDEX' => '16777587'
},
'2' => {
'DGNAME' => 'ASMDG',
'LEVEL' => 1,
'ALIASNAME' => 'ASM/ASMPARAMETERFILE',
'REFERENCE_INDEX' => '16777322'
},
'8' => {
'DGNAME' => 'ASMDG',
'LEVEL' => 1,
'ALIASNAME' => 'ASMDB/DATAFILE',
'REFERENCE_INDEX' => '16777428'
},
'1' => {
'DGNAME' => 'ASMDG',
'LEVEL' => 0,
'ALIASNAME' => 'ASMDB',
'REFERENCE_INDEX' => '16777375'
},
'4' => {
'DGNAME' => 'ASMDG',
'LEVEL' => 1,
'ALIASNAME' => 'ASMDB/PARAMETERFILE',
'REFERENCE_INDEX' => '16777640'
},
'0' => {
'DGNAME' => 'ASMDG',
'LEVEL' => 0,
'ALIASNAME' => 'ASM',
'REFERENCE_INDEX' => '16777269'
},
'5' => {
'DGNAME' => 'ASMDG',
'LEVEL' => 1,
'ALIASNAME' => 'ASMDB/CONTROLFILE',
'REFERENCE_INDEX' => '16777481'
}
},
'TEMPLATEINFO' => {
'11' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'AUTOBACKUP',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'7' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'ONLINELOG',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'2' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'ASMPARAMETERBAKFILE',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'17' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'OCRBACKUP',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'1' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'ASM_STALE',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'18' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'ASMPARAMETERFILE',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'0' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'PARAMETERFILE',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'16' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'OCRFILE',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'13' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'CHANGETRACKING',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'6' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'ARCHIVELOG',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'3' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'DUMPSET',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'9' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'TEMPFILE',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'12' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'XTRANSPORT',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'14' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'FLASHBACK',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'15' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'DATAGUARDCONFIG',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'8' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'DATAFILE',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'4' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'FINE',
'TEMPNAME' => 'CONTROLFILE',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'10' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'BACKUPSET',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
},
'5' => {
'DGNAME' => 'ASMDG',
'STRIPE' => 'COARSE',
'TEMPNAME' => 'FLASHFILE',
'REDUNDANCY' => 'UNPROT',
'SYSTEM' => 'Y'
}
}
}
);
[oracle@rac1 ~]$
相关网址和实验 (步步为营的恢复)
http://www.xifenfei.com/2936.html
http://www.xifenfei.com/2616.html
http://www.xifenfei.com/5249.html
其它相关网址
http://www.askmaclean.com/archives/know-oracle-asm.html
http://www.killdb.com/2013/01/07/oracle-asm-剖析系列1.html