在数据库运维中,总会遇到一些粗心大意的DBA,一不小心删除一些东西,这里举例讲解在误删除ASM磁盘之后,如果用KFED工具进行恢复:

[grid@RAC1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 5 00:06:04 2017

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> col path format a30
SQL> select name,path,header_status from v$asm_disk; NAME PATH HEADER_STATU
------------------------------ ------------------------------ ------------
DATA_0001 /dev/mapper/mpathc MEMBER
DATA_0004 /dev/mapper/mpathd MEMBER
DATA_0003 /dev/mapper/mpathf MEMBER
DATA_0000 /dev/mapper/mpathb MEMBER
DATA1_0001 /dev/mapper/mpathh MEMBER
DATA_0002 /dev/mapper/mpathg MEMBER
DATA1_0002 /dev/mapper/mpathi MEMBER
DATA1_0000 /dev/mapper/mpathe MEMBER 8 rows selected. SQL> drop diskgroup DATA;
drop diskgroup DATA
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15053: diskgroup "DATA" contains existing files SQL> drop diskgroup DATA including contents;
drop diskgroup DATA including contents
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15027: active use of diskgroup "DATA" precludes its dismount ------------------------------------------------------------------------------------------------------------------------

关闭数据连接:
SQL> alter diskgroup DATA dismount force; Diskgroup altered. SQL> drop diskgroup DATA force including contents;
drop diskgroup DATA force including contents
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15073: diskgroup DATA is mounted by another ASM instance
dismount 需要两边都dismount SQL> drop diskgroup DATA force including contents; Diskgroup dropped. SQL> select name,path,header_status from v$asm_disk; NAME PATH HEADER_STATU
------------------------------ ------------------------------ ------------
/dev/mapper/mpathc FORMER
/dev/mapper/mpathd FORMER
/dev/mapper/mpathf FORMER
/dev/mapper/mpathb FORMER
/dev/mapper/mpathg FORMER
DATA1_0001 /dev/mapper/mpathh MEMBER
DATA1_0002 /dev/mapper/mpathi MEMBER
DATA1_0000 /dev/mapper/mpathe MEMBER 8 rows selected. [grid@RAC1 ~]$ crs_stat -t
CRS-0184: Cannot communicate with the CRS daemon. ############################################################################################################### 使用kfed进行恢复
[grid@RAC1 ~]$ kfed read /dev/mapper/mpathc > /tmp/mpathc-meta
[root@RAC1 tmp]# vi mpathc-meta
用vi打开生成的文件,修改下面一行数据
kfdhdb.hdrsts: 4 ; 0x027: KFDHDR_FORMER
修改为:
kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER
[grid@RAC1 ~]$ kfed merge /dev/mapper/mpathc text=/tmp/mpathc-meta 将所有5块磁盘进行同样的操作。 SQL> select name,path,header_status from v$asm_disk; NAME PATH HEADER_STATU
------------------------------ ------------------------------ ------------
/dev/mapper/mpathc MEMBER
/dev/mapper/mpathd MEMBER
/dev/mapper/mpathf MEMBER
/dev/mapper/mpathb MEMBER
/dev/mapper/mpathg MEMBER
DATA1_0001 /dev/mapper/mpathh MEMBER
DATA1_0002 /dev/mapper/mpathi MEMBER
DATA1_0000 /dev/mapper/mpathe MEMBER SQL> alter diskgroup DATA mount; Diskgroup altered. 两个节点都需要进行mount。 SQL> select name,path,header_status from v$asm_disk; NAME PATH HEADER_STATU
------------------------------ ------------------------------ ------------
DATA_0001 /dev/mapper/mpathc MEMBER
DATA_0004 /dev/mapper/mpathd MEMBER
DATA_0003 /dev/mapper/mpathf MEMBER
DATA_0000 /dev/mapper/mpathb MEMBER
DATA1_0001 /dev/mapper/mpathh MEMBER
DATA_0002 /dev/mapper/mpathg MEMBER
DATA1_0002 /dev/mapper/mpathi MEMBER
DATA1_0000 /dev/mapper/mpathe MEMBER 8 rows selected. [grid@RAC1 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    rac1        
ora.DATA1.dg   ora....up.type ONLINE    ONLINE    rac1        
ora....ER.lsnr ora....er.type ONLINE    ONLINE    rac1        
ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac1        
ora.asm        ora.asm.type   ONLINE    ONLINE    rac1        
ora.cvu        ora.cvu.type   ONLINE    OFFLINE               
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE               
ora....network ora....rk.type ONLINE    ONLINE    rac1        
ora.oc4j       ora.oc4j.type  ONLINE    OFFLINE               
ora.ons        ora.ons.type   ONLINE    ONLINE    rac1        
ora....SM1.asm application    ONLINE    ONLINE    rac1        
ora....C1.lsnr application    ONLINE    ONLINE    rac1        
ora.rac1.gsd   application    OFFLINE   OFFLINE               
ora.rac1.ons   application    ONLINE    ONLINE    rac1        
ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac1        
ora.rac2.vip   ora....t1.type ONLINE    OFFLINE               
ora....ry.acfs ora....fs.type ONLINE    ONLINE    rac1        
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    rac1

ORACLE误删除ASM磁盘修复的更多相关文章

  1. Oracle 下ASM磁盘总结

    Oracle 下ASM磁盘总结 文章转载: Oracle下创建ASM磁盘总结https://blog.csdn.net/okhymok/article/details/78791841?utm_sou ...

  2. 转://Oracle 11gR2 ASM磁盘组管理

    一.环境.[grid@rhel2 ~]$ cat /etc/issueRed Hat Enterprise Linux Server release 5.5 (Tikanga) Kernel \r o ...

  3. 11G ORACLE RAC DBCA 无法识别asm磁盘组

    ASM磁盘无法识别几种现象: 1) gi家目录或者其子目录权限错误 2)asm磁盘的权限错误 3)asm实例未启动或者asm磁盘组没有mount上 4)asm磁盘组资源没有在线 5)oracle用户的 ...

  4. 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:4.安装Oracle RAC FAQ-4.5.安装Grid,创建ASM磁盘组空间不足

    因之前分区时,分区的Last cylinder的值选了“1”,导致创建磁盘组空间不足.解决办法是先删除分区,重新创建分区并删除ASM磁盘,然后重建ASM磁盘 1. 先删除分区,重新创建分区: 1)查询 ...

  5. 基于CentOS与VmwareStation10搭建Oracle11G RAC 64集群环境:4.安装Oracle RAC FAQ-4.2.Oracleasm Createdisk ASM磁盘失败:Instantiating disk: failed

    1.错误信息:Instantiating disk: failed [root@linuxrac1 /]# /usr/sbin/oracleasm createdisk OCR_VOTE /dev/s ...

  6. 案例:Oracle报错ASM磁盘组不存在或没有mount

    案例:Oracle报错ASM磁盘组不存在或没有mount 环境:RHEL 6.5 + Oracle Standby RAC 11.2.0.4 我做Standby RAC实验时,在恢复控制文件时,报错无 ...

  7. 对oracle用户创建asm磁盘

    --root用户执行vi /etc/sysctl.conf #Install oracle settingfs.aio-max-nr = 1048576fs.file-max = 6815744#ke ...

  8. Oracle 11gR2 RAC DBCA无法识别ASM磁盘组(ORA-19504,ORA-15045,ORA-17502,ORA-15081)

    ORA-19504: failed to create file "+DATA" ORA-15045: ASM file name '+DATA' is not in refere ...

  9. Oracle RAC环境下ASM磁盘组扩容

    生产环境注意调整以下参数: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...

随机推荐

  1. centos下安装java8

    http://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/#

  2. Objective-C基础3

    1.OC内存管理 1)范围:管理任何继承NSObject的对象,对其他的基本数据类型无效(堆区),否则会造成内存泄露 2)原理:任何对象都可能有用一个或多个所有者,只要一个对象至少还拥有一个所有者,它 ...

  3. Microsoft SQL Server 数据库服务器管理维护角色

    固定服务器角色: 按照从最低级别的角色(bulkadmin)到最高级别的角色(sysadmin)的顺序进行描述: Bulkadmin:这个服务器角色的成员可以运行BULK INSERT语句.这条语句允 ...

  4. LoadRunner培训初级教程

    一 LoadRunner简介 1.1 Loadrunner介绍 LoadRunner 是 HP Mercury Interactive 用来测试应用程序性能的工具  LoadRunner 通过模拟一个 ...

  5. 上海有线通下载exe会302转发请求

    起因: 做的软件用的clickonce,在公网的clickonce下载exe时一直报错,在vpn环境下没问题.错误提示如下: + HTTP redirect is not allowed for ap ...

  6. get([index])

    get([index]) 概述 取得其中一个匹配的元素. num表示取得第几个匹配的元素.从0开始,返回的是DOM对象,类似的有eq(index),不过eq(index)返回的是jQuery对象. 这 ...

  7. 面试题-Stack的最小值o(1)

    // Stack.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include <iostream> using names ...

  8. [JS]jQuery,javascript获得网页的高度和宽度

    [JS]jQuery,javascript获得网页的高度和宽度网页可见区域宽: document.body.clientWidth 网页可见区域高: document.body.clientHeigh ...

  9. mysql 慢查询日志切割

  10. java主函数的含义

    下面对java中的主函数进行简单的解释,解决可能困惑大家的问题,下面举的例子在实际开发中几乎不会出现,但是为了解决好奇心,大家可以这么去尝试一下! 我们在java中看到的主函数通常是这样的:publi ...