zoukankan      html  css  js  c++  java
  • oracle kfed 和 amdu

    备份asm disk header

    kfed 或者 dd

    kfed read /dev/asm_data1 > asm_data1.txt &&
    kfed read /dev/asm_data2 > asm_data2.txt &&
    kfed read /dev/asm_data3 > asm_data3.txt

    dd if=/dev/asm_data1 of=/home/grid/asm_data1.dump bs=4096 count=1 &&
    dd if=/dev/asm_data2 of=/home/grid/asm_data2.dump bs=4096 count=1 &&
    dd if=/dev/asm_data3 of=/home/grid/asm_data3.dump bs=4096 count=1

    模拟asm disk header头损坏

    dd if=/dev/zero of=/dev/asm_data1  bs=4096 count=1

    重新挂载报错

    SQL> alter diskgroup data dismount;
    
    Diskgroup altered.
    
    SQL> alter diskgroup data mount;
    alter diskgroup data mount
    *
    ERROR at line 1:
    ORA-15032: not all alterations performed
    ORA-15040: diskgroup is incomplete
    ORA-15042: ASM disk "0" is missing from group number "2"
    [+ASM1]@ht01[/home/grid]$dd if=/dev/zero of=/dev/asm_data1  bs=4096 count=1
    1+0 records in
    1+0 records out
    4096 bytes (4.1 kB) copied, 0.000907187 s, 4.5 MB/s
    
    kfed 读报错
    [+ASM1]@ht01[/home/grid]$kfed read /dev/asm_data1 
    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
    7F06DD408400 00000000 00000000 00000000 00000000  [................]
      Repeat 255 times
    KFED-00322: Invalid content encountered during block traversal: [kfbtTraverseBlock][Invalid OSM block type][][0]
    
    amdu 抽取报错
    [+ASM1]@ht01[/home/grid]$amdu -diskstring ' /dev/asm_data*' -extract data.259
    amdu_2019_11_10_19_27_12/
    AMDU-00204: Disk N0002 is in currently mounted diskgroup DATA
    AMDU-00201: Disk N0002: '/dev/asm_data2'
    AMDU-00204: Disk N0003 is in currently mounted diskgroup DATA
    AMDU-00201: Disk N0003: '/dev/asm_data3'
    
    asm disk header 3种修复方式
    kfed repair /dev/asm_data1
    kfed write /dev/asm_data1 te=asm_data1.txt
    dd if=/home/grid/asm_data1.dump  of=/dev/asm_data1 bs=4096 count=1
    
    抽取数据时候可以先抽取control,control信息记录在alert日志里
    amdu -diskstring '/dev/asm_data*' -extract data.259
    data.259 有磁盘组名称和file_number组成.
    select name from v$datafile;
    可以以此抽出
    

      

  • 相关阅读:
    数据库的创建,数据的增删改查
    Ubuntu系统下查看显卡相关信息
    分布式文件系统测试方法与测试工具
    分布式存储产品的测试实践及心得
    sql注入
    web测试项目总结
    Ubuntu系统下使用Jenkins进行项目的自动构建还是项目回滚方法
    Ubuntu系统下Jenkins的git构建基本方法
    Ubuntu系统下在github中新增库的方法
    ADO.NET复习总结(2)--连接池
  • 原文地址:https://www.cnblogs.com/omsql/p/11831613.html
Copyright © 2011-2022 走看看