标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 kfed MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2131 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 Oracle 恢复 ORACLE恢复 ORACLE数据库恢复 oracle 比特币 OSD-04016 YOUR FILES ARE ENCRYPTED 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (102)
- 数据库 (1,666)
- DB2 (22)
- MySQL (73)
- Oracle (1,528)
- Data Guard (51)
- EXADATA (8)
- GoldenGate (21)
- ORA-xxxxx (159)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (14)
- ORACLE 21C (3)
- Oracle 23ai (7)
- Oracle ASM (65)
- Oracle Bug (8)
- Oracle RAC (52)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (559)
- Oracle安装升级 (90)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (77)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- 清空redo,导致ORA-27048: skgfifi: file header information is invalid
- A_H_README_TO_RECOVER勒索恢复
- 通过alert日志分析客户自行对一个数据库恢复的来龙去脉和点评
- ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的SERVICE_NAME
- ORA-01092 ORA-00604 ORA-01558故障处理
- ORA-65088: database open should be retried
- Oracle 19c异常恢复—ORA-01209/ORA-65088
- ORA-600 16703故障再现
- 数据库启动报ORA-27102 OSD-00026 O/S-Error: (OS 1455)
- .[metro777@cock.li].Elbie勒索病毒加密数据库恢复
- 应用连接错误,初始化mysql数据库恢复
- RAC默认服务配置优先节点
- Oracle 19c RAC 替换私网操作
- 监听报TNS-12541 TNS-12560 TNS-00511错误
- drop tablespace xxx including contents恢复
- Linux 8 修改网卡名称
- 如何修改集群的公网信息(包括 VIP) (Doc ID 1674442.1)
- 如何在 oracle 集群环境下修改私网信息 (Doc ID 2103317.1)
- ORA-600 [kcvfdb_pdb_set_clean_scn: cleanckpt] 相关bug
- ORA-600 krhpfh_03-1210故障处理
标签归档:asm recovery
ADHU(ASM Disk Header Utility)—asm disk header备份恢复工具
adhu(ASM Disk Header Utility)作为oracle asm中和kfed,amdu齐名的asm三大恢复神器之一,没有被oracle大力推广(属于内部工具),随着kfed功能增强和asm disk header自动备份功能的完善,adhu oracle基本上停止的开发支持,可以用来作为10.2.0.5之前asm版本的磁盘头保护工具
adhu预览
这里可以通过shell封装的utildhu调用adhu程序,实现更加人性化和自动化操作,它含有install,check,repair三个命令参数.
[root@xff1 tmp]# su - grid xff1:/home/grid> cd /tmp/adhu/ xff1:/tmp/adhu> ls -l total 68 -rwxr-xr-x 1 grid oinstall 18902 Nov 1 2008 adhu -rw-r--r-- 1 grid oinstall 1970 Nov 1 2008 README -rwxr-xr-x 1 grid oinstall 6964 Mar 21 16:20 utildhu -rw-r--r-- 1 root root 12634 Mar 21 16:05 utildhu.zip xff1:/tmp/adhu> ./utildhu Usage: utildhu install/check/repair [device name] $utildhu install Will gather a list of member ASM disks and create the backup directory ./HeaderBackup The ./HeaderBackup directory will contain the backup header of every asm disk in this database $utildhu check Will run /tmp/adhu/adhu for every disk discovered by $utildhu install and will email recipients configured in RECIPIENTS if there are errors in the disk header It is hoped that the user will enter valid RECIPIENT email addresses, and will place this utility in $ORA_ASM_HOME $utildhu repair <device name> Will repair the device provided using the backup header blocks that have been copied previously. This does assume that you have backup header blocks in ./HeaderBackup Sample crontab entry to run a check every 5 minutes #Minute (0-59) Hour (0-23) Day of Month (1-31) Month (1-12 or Jan-Dec) Day of Week (0-6 or Sun-Sat) Command 0,5,10,15,20,25,30,35,40,45,50,55 * * * * * utildhu check Please read the README for more information
adhu install
install主要是实现utildhu.config配置文件生成和第一次asm 磁盘头备份
xff1:/tmp/adhu> ./utildhu install xff1:/tmp/adhu> ls -l total 64 -rwxr-xr-x 1 grid oinstall 18902 Nov 1 2008 adhu drwxr-xr-x 2 grid oinstall 4096 Mar 21 16:23 HeaderBackup -rw-r--r-- 1 grid oinstall 1117 Mar 21 16:23 persistent-log.utildhu -rw-r--r-- 1 grid oinstall 1970 Nov 1 2008 README -rwxr-xr-x 1 grid oinstall 6964 Mar 21 16:20 utildhu -rw-r--r-- 1 grid oinstall 243 Mar 21 16:23 utildhu.config -rw-r--r-- 1 grid oinstall 710 Mar 21 16:23 utildhu.out -rw-r--r-- 1 root root 12634 Mar 21 16:05 utildhu.zip xff1:/tmp/adhu> cd HeaderBackup/ xff1:/tmp/adhu/HeaderBackup> ls -ltr total 12 -rw-r--r-- 1 grid oinstall 4096 Mar 21 16:23 oradata1p1 -rw-r--r-- 1 grid oinstall 4096 Mar 21 16:23 oradata2p1 -rw-r--r-- 1 grid oinstall 4096 Mar 21 16:23 ocrvotep1 xff1:/tmp/adhu/HeaderBackup> more ../utildhu.config /dev/mapper/oradata1p1 /dev/mapper/oradata2p1 /dev/mapper/ocrvotep1 xff1:/tmp/adhu> more ../persistent-log.utildhu Mon Mar 21 16:23:29 CST 2016 ASM Disk Header Check Utility Installed on Devices configured are: /dev/mapper/oradata1p1 /dev/mapper/oradata2p1 /dev/mapper/ocrvotep1 ADHU: /dev/mapper/oradata1p1: Status 0x01 Mon Mar 21 16:23:29 2016 ADHU: /dev/mapper/oradata1p1: Diskgroup:DATA Disk:DATA_0000 #0 ADHU: /dev/mapper/oradata1p1: valid disk header found ADHU: /dev/mapper/oradata1p1: backup block updated ###ADHU check run at Mon Mar 21 16:23:29 CST 2016 NO ERRORS FOUND xff1:/tmp/adhu> ls -l HeaderBackup/ total 16 -rw-r--r-- 1 grid oinstall 4096 Mar 21 23:04 ocrvotep1 -rw-r--r-- 1 grid oinstall 4096 Mar 21 23:08 oradata1p1 -rw-r--r-- 1 grid oinstall 4096 Mar 21 23:08 oradata1p1.corrupt -rw-r--r-- 1 grid oinstall 4096 Mar 21 23:04 oradata2p1
adhu check
对于正常的asm disk,主要是为了生成新的磁盘头备份
xff1:/tmp/adhu> ls -l HeaderBackup/ total 16 -rw-r--r-- 1 grid oinstall 4096 Mar 21 23:04 ocrvotep1 -rw-r--r-- 1 grid oinstall 4096 Mar 21 23:08 oradata1p1 -rw-r--r-- 1 grid oinstall 4096 Mar 21 23:08 oradata1p1.corrupt -rw-r--r-- 1 grid oinstall 4096 Mar 21 23:04 oradata2p1 xff1:/tmp/adhu> ./utildhu check xff1:/tmp/adhu> ls -l HeaderBackup/ total 16 -rw-r--r-- 1 grid oinstall 4096 Mar 21 23:11 ocrvotep1 -rw-r--r-- 1 grid oinstall 4096 Mar 21 23:11 oradata1p1 -rw-r--r-- 1 grid oinstall 4096 Mar 21 23:08 oradata1p1.corrupt -rw-r--r-- 1 grid oinstall 4096 Mar 21 23:11 oradata2p1
adhu repair
repair主要是修复磁盘头,当asm 磁盘头损坏之时,可以通过这个命令实现磁盘头修复
xff1:/tmp/adhu> dd if=/dev/zero of=/dev/mapper/oradata1p1 bs=4096 count=1 1+0 records in 1+0 records out 4096 bytes (4.1 kB) copied, 0.000282838 s, 14.5 MB/s xff1:/tmp/adhu> ./utildhu check xff1:/tmp/adhu> tail -f persistent-log.utildhu ###ADHU check run at Mon Mar 21 23:04:04 CST 2016 ERRORS FOUND ADHU: /dev/mapper/oradata1p1: Status 0x08 Mon Mar 21 23:04:04 2016 ADHU: /dev/mapper/oradata1p1: Diskgroup:DATA Disk:DATA_0000 #0 ADHU: /dev/mapper/oradata1p1: corrupt disk header encountered ADHU: /dev/mapper/oradata1p1: valid backup block found ADHU: /dev/mapper/oradata1p1: CORRUPT HEADER NOT REPAIRED xff1:/tmp/adhu> kfed read /dev/mapper/oradata1p1 kfbh.endian: 0 ; 0x000: 0x00 kfbh.hard: 0 ; 0x001: 0x00 kfbh.type: 0 ; 0x002: KFBTYP_INVALID kfbh.datfmt: 0 ; 0x003: 0x00 kfbh.block.blk: 0 ; 0x004: blk=0 kfbh.block.obj: 0 ; 0x008: file=0 kfbh.check: 0 ; 0x00c: 0x00000000 kfbh.fcn.base: 0 ; 0x010: 0x00000000 kfbh.fcn.wrap: 0 ; 0x014: 0x00000000 kfbh.spare1: 0 ; 0x018: 0x00000000 kfbh.spare2: 0 ; 0x01c: 0x00000000 7F6BD9981400 00000000 00000000 00000000 00000000 [................] Repeat 255 times KFED-00322: Invalid content encountered during block traversal: [kfbtTraverseBlock][Invalid OSM block type][][0] xff1:/tmp/adhu> sqlplus / as sysasm SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 21 23:07:25 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Real Application Clusters and Automatic Storage Management options SQL> alter diskgroup data dismount; alter diskgroup data dismount * ERROR at line 1: ORA-15032: not all alterations performed ORA-15027: active use of diskgroup "DATA" precludes its dismount 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-15013: diskgroup "DATA" is already mounted SQL> alter diskgroup data dismount force; Diskgroup altered. 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-15040: diskgroup is incomplete xff1:/tmp/adhu> ./utildhu repair /dev/mapper/oradata1p1 DEVICE /dev/mapper/oradata1p1 REPAIRED AT Mon Mar 21 23:06:06 CST 2016 ADHU: /dev/mapper/oradata1p1: Status 0x04 Mon Mar 21 23:06:06 2016 ADHU: /dev/mapper/oradata1p1: Diskgroup:DATA Disk:DATA_0000 #0 ADHU: /dev/mapper/oradata1p1: corrupt disk header encountered ADHU: /dev/mapper/oradata1p1: valid backup block found ADHU: /dev/mapper/oradata1p1: disk header repaired xff1:/tmp/adhu> sqlplus / as sysasm SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 21 23:08:48 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Real Application Clusters and Automatic Storage Management options SQL> alter diskgroup data mount; Diskgroup altered.
adhu直接使用
adhu [-dir dirname ] [-repair] [-quiet] [-readonly] [-syslog mask ] devname
默认情况下adhu将disk header备份为当前目录下的备份文件。 使用-dir选项可以指定存放的目录。
当需要使用adhu去修复一个损坏的asm disk header时使用-repair 选项。
-quiet 选项将过滤所有正常的输出信息,若执行成功则不打印任何输出。
-readonly选项 以只读方式来打开disk device,这样备份block将不被写入,而备份文件将在可能的情况下写入。
-syslog选项控制是否写出结果到系统日志和标准输出。
devname代表为asm disk的设备文件,asm头的备份文件将以该device name为基础,并存放在当前目录或者-dir指定的目录。