How To Drop and Recreate ASM Diskgroup

This article describe how we can drop and recreate ASM diskgroup when its not possible to perform this through SQL command.

When a member disk in external redundancy diskgroup is no longer present (or destroyed beyond repair) and you want to drop the diskgroup completely and recreate it or add the disks of the diskgroup to other diskgroups. The diskgroup can not be mounted, because one of the disks is missing, hence the "drop diskgroup" command will not work.

In 10g you can use a workaround by erasing the header of the disk using the dd command.

In 11g, the diskgroup can be dropped when its dismounted with FORCE option:

Oracle Database Storage Administrator's Guide - 11g Release 1 (11.1)
Administering ASM Disk Groups
Dropping Disk Groups
http://download.oracle.com/docs/cd/B28359_01/server.111/b31107/asmdiskgrps.htm#i1020539


Erasing the header using "dd" command is very dangerous operation and need to be done under support supervision and when it confirmed by support that fixing the header is impossible.

In all cases and before the erasing operation you should gather the following information:

1. alert.log file from all ASM instances going back to last successful mount for diskgroup.
2. OS logs.
3. Backup disk header for all member disks in diskgroup:

ddif=/dev/raw/raw13of=/tmp/raw13.txt bs=1048576 count=100

Solution

1. Erase ASM metadata information for disk using OS command:

!!! YOU HAVE TO BE CAREFUL WHEN TYPING DISK NAME !!!

For Unix platforms using 'dd' Unix command.
==================================

Example:

ddif=/dev/zeroof=/dev/raw/raw13bs=1048576 count=50

Theddutilitycopiesthespecifiedinputfiletothespecifiedoutput.

Description for used options:

'if=file'
Readfromfile/device.
'of=file'
Writetofile/device.
'bs=bytes'
Setbothinputandoutputblocksizestobytes.
'count=blocks'
Copyblocks'ibs'-byteblocksfromtheinputfile


This puts zeroes to the first 50 MB of disk /dev/raw/raw13, erasing all information.

For MS Windows platforms using 'asmtool' (command line) or 'asmtoolg' (GUI)
============================================================

Example:

C:/>asmtool-delete//./ORCLDISKASM7


2. Connect to ASM instance to check the current disk status:

SQL>selectheader_status,pathfromv$asm_disk;


You should see the header_status for the cleared disks as " CANDIDATE " which means that disk's metadata erased and it can be used again.

selectGROUP_NUMBER,NAME,HEADER_STATUS,TOTAL_MB,FREE_MBfromV$ASM_DISK;

GROUP_NUMBERNAMEHEADER_STATUTOTAL_MBFREE_MB
--------------------------------------------------------------------------
0CANDIDATE 100000
1DATA_0000MEMBER 10000 9933
1DATA_0003MEMBER 10000 9933


If you dropped all diskgroup member disks, you should not see the diskgroup any more because all its member disks were cleared.

SQL>selectname,STATEfromv$asm_diskgroup;


3. Now, you can use the erased disk(s) to create a new disk group or add the disk to existing diskgroup.

From Oracle

-------------------------------------------------------------------------------------------------------

Blog http://blog.youkuaiyun.com/tianlesoftware

Email: dvd.dba@gmail.com

DBA1 群:62697716(); DBA2 群:62697977() DBA3 群:62697850()

DBA 超级群:63306533(); DBA4 群: 83829929 DBA5群: 142216823

聊天 群:40132017 聊天2群:69087192

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

<think>好的,用户遇到了D3D11设备创建失败的问题,错误代码是8007000E。我需要先分析这个错误代码的含义。根据微软文档,8007000E通常对应E_OUTOFMEMORY,即内存不足。这可能意味着系统资源不足,或者驱动程序有问题,也可能是应用程序的内存管理存在缺陷。 首先,我应该建议用户检查系统内存使用情况,确保没有其他程序占用过多内存。接着,更新或重新安装显卡驱动,特别是与DirectX 11兼容的版本。用户可能使用的是过时或损坏的驱动,导致设备创建失败。此外,确认Windows系统和DirectX版本是否为最新,通过运行dxdiag可以查看相关信息。 引用中提到Win10 SDK不同版本对DX支持不一致,可能影响开发环境。用户如果是开发者,可能需要检查项目配置,确保引用了正确的SDK版本,并包含必要的头文件如d3d11.h。同时,检查代码中创建D3D11设备的参数,比如D3D_FEATURE_LEVEL是否正确设置,避免请求过高的特性级别。 另一个可能性是硬件不支持Direct3D 11。用户应确认显卡型号是否支持DX11,并尝试使用D3D11_CREATE_DEVICE_DEBUG标志获取更详细的错误信息。此外,第三方软件冲突,如杀毒软件或覆盖程序(如游戏覆盖),可能会干扰设备创建,建议临时禁用这些软件进行测试。 引用[3]提到使用dxva2代替d3d11va的情况,虽然与当前问题不完全相关,但说明不同硬件设备名称可能导致数据格式变化。如果在代码中指定了特定硬件适配器,可能需要检查适配器是否存在或是否正确初始化。 最后,如果以上步骤无效,建议用户尝试系统文件检查工具(sfc /scannow)修复系统文件,或者重新安装DirectX运行时。如果问题依旧存在,可能需要更深入的调试,如分析内存转储或使用PIX工具捕获GPU事件。</think>### 解决D3D11设备创建失败错误8007000E的步骤 #### 1. 错误代码解析 错误代码 `8007000E` 对应 `E_OUTOFMEMORY`(内存不足)。可能原因包括: - 系统可用内存不足 - 显卡驱动内存分配失败 - Direct3D资源管理异常 - 硬件/驱动不兼容 #### 2. 基础排查 $$ \text{可用内存} = \text{物理内存} - \text{已用内存} - \text{系统保留内存} $$ 建议检查任务管理器: - 关闭非必要进程释放内存 - 确保可用内存大于2GB(含显存) #### 3. 驱动更新 1. 通过设备管理器更新显卡驱动 2. 使用厂商工具(如NVIDIA GeForce Experience/AMD Adrenalin) 3. 手动下载最新驱动包[^2] ```powershell # 查看当前驱动版本 Get-WmiObject Win32_VideoController | Select-Object Name, DriverVersion ``` #### 4. DirectX环境验证 运行诊断工具: ```cmd dxdiag > DirectX诊断日志.txt ``` 检查: - 显示选项卡中D3D11是否启用 - 功能级别是否支持11.0/11.1 - 系统文件完整性: ```cmd sfc /scannow ``` #### 5. 开发环境配置(针对开发者) - 确保项目包含正确SDK路径[^2] ```cpp #include <d3d11.h> #pragma comment(lib, "d3d11.lib") ``` - 设备创建参数建议: ```cpp D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1 }; hr = D3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_HARDWARE, nullptr, D3D11_CREATE_DEVICE_DEBUG, // 调试时启用 featureLevels, 1, D3D11_SDK_VERSION, &device, &featureLevel, &context); ``` #### 6. 硬件兼容性测试 - 尝试软件渲染模式: ```cpp D3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_WARP, ...) ``` - 使用兼容性诊断工具: ```powershell DxCap.exe -forcetdr ``` #### 7. 系统级修复 1. 重置虚拟内存设置 2. 执行内存诊断: ```cmd mdsched.exe ``` 3. 更新Windows至最新版本(需包含KB5005565补丁)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值