Steps to Re-Create ASM Diskgroups(重建asm 磁碟組步驟)
Applies to:
Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.1.0.7 - Release: 10.1 to 11.1Information in this document applies to any platform.
Purpose
To provide a method of re-creating ASM diskgroups.Scope and Application
This document is intended for DBAs and Support Engineers who need to re-create ASM diskgroups.Steps to Re-Create ASM Diskgroups
In the event you cannot mount your ASM disk groups, you will be unable to start any databases using those disk groups. Here is a possible error reported when mounting ASM disk groups:SQL> startup mount
ORA-15032: not all alterations performed
ORA-15063: diskgroup "
This error may occur if:
a) ASM disk(s) is not visible on the operating system.
b) asm_diskstring parameter is not set correctly on ASM instance(s)
c) ASM metadata in disk is overwritten or corrupted
If you have seen this error or another error indicating ASM metadata corruption and have verified that the disk(s) is visable with correct permissions on the operating system and that the asm_diskstring parameter is set correctly, your ASM metadata may be corrupted. If this is the case, you may need to re-create your ASM instance(s) and disk group(s). The steps are:
1. Ensure that you have a prior RMAN backup of all databases using ASM
2. Shut down your ASM instance(s)
3. Use dd to clear the metadata from ASM disks
4. Re-create your ASM disk group(s)
5. Restore databases
Step 1: Ensure that you have a prior RMAN backup of all databases using ASM
The only way you can recover from ASM metadata corruption is to have a prior RMAN backup of the database in an area that would not be affected by an ASM instance outage. As part of your recovery strategy, you should consider integrating tape or other tertiary storage to safeguard your backups.Example of RMAN backup:
1. Connect RMAN to the target database for backup
rman nocatalog target /
2. Now Backup your Database, Archive logs and Control files. Example:
RMAN> backup device type disk format '/u03/backup/%U' database plus archivelog;
RMAN> backup device type disk format '/u03/backup/ctrlf_%U' current controlfile;
3. Manually make copies of your spfiles. Example:
CREATE PFILE='/u03/app/oracle/product/10.1.0/dbs/init
FROM SPFILE='/+DATA/V10FJ/spfile.ora';
If you do not have a good backup of all databases (datafiles, controlfiles,
redo logs, archive logs), DO NOT CONTINUE BEYOND STEP 1!
Step 2: Shutdown your ASM instance(s)
Stop your database instances and ASM instances with sqlplus or srvctl (RAC)SQLPLUS Example:
setenv ORACLE_SID +ASM
sqlplus '/ as sysdba'
SQL> shutdown immediate
setenv ORACLE_SID DBSCOTT
sqlplus '/ as sysdba'
SQL> shutdown immediate
SRVCTL (RAC) Example:
srvctl stop asm -n
srvctl stop asm -n
srvctl stop database -d
sqlplus '/ as sysdba'
SQL> shutdown immediate
setenv ORACLE_SID DBSCOTT
sqlplus '/ as sysdba'
SQL> shutdown immediate
SRVCTL (RAC) Example:
srvctl stop asm -n
srvctl stop asm -n
srvctl stop database -d
Step3: Use DD to clear the metadata from ASM disks
All ASM metadata must be cleared before attempting to re-create ASM instances and diskgroups. Example Command:dd if=/dev/zero f=/dev/rdsk/c1t4d0s4 bs=8192 count=12800
or
dd if=/dev/zero f=/dev/rdsk/c1t4d0s4 bs=4096 count=12800
Step 4: Re-create your ASM disk group(s)
Set your ORACLE_SID to your ASM instance and create a new diskgroup. Example:setenv ORACLE_SID +ASM
sqlplus '/ as sysdba'
SQL> startup nomount
SQL> create diskgroup data disk '/dev/rdsk/c1t4d0s4';
SQL> shutdown immediate
SQL> startup mount
sqlplus '/ as sysdba'
SQL> startup nomount
SQL> create diskgroup data disk '/dev/rdsk/c1t4d0s4';
SQL> shutdown immediate
SQL> startup mount
Step 5: Restore database
1. Start instance using the local copy of your pfile from step 1.setenv ORACLE_SID DBSCOTT
sqlplus '/ as sysdba'
SQL> startup nomount pfile=init
2. Use RMAN to restore the controlfiles and database. Example:
rman target /
RMAN> restore controlfile from '/u03/backup/ctrlf_
RMAN> alter database mount;
RMAN> restore database;
RMAN> recover database;
RMAN> alter database open resetlogs;
3. Connect to the ASM instance and get the controlfile name. Example:
setenv ORACLE_SID +ASM
sqlplus '/ as sysdba'
SQL> select name, alias_directory from v$asm_alias;
Look for the controlfile name under the CONTROLFILE directory eg: Current.256.1
4. Edit the init
the one identified from the ASM v$asm_alias view.
5. Re-create the spfile. Example:
SQL> create spfile='+DATA/V10FJ/spfileV10FJ.ora'
from pfile='/u03/app/oracle/product/10.1.0/dbs/pfile.out';
6. Shutdown and restart the instance to use the newly created spfile.
7. Repeat the "STEP 5" section for additional databases.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-675561/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 重建ASM磁碟組的步驟 [ID 268481.1]ASM
- ORACLE RAC重建ASM磁碟組OracleASM
- ASM磁碟組修改重建操作ASM
- Steps to Recreate ASM Diskgroups (文件 ID 268481.1)ASM
- 對ASM dgdata 磁碟組增加disk實施步驟ASM
- asm磁碟組建立錯誤,用中轉儲存,重建磁碟組ASM
- ASM 仲裁盤OCR DG損壞,重建步驟ASM
- Exact Steps To Migrate ASM Diskgroups To Another SAN Without DowntimeASM
- How to re-create the ASMASM
- asm 磁碟組 增刪磁碟組ASM
- ASM磁碟組限制ASM
- oracle asm 儲存 a磁碟組中的資料檔案 遷移到b磁碟組實施步驟OracleASM
- 遷移ASM磁碟組ASM
- 【ASM】Oracle asm刪除磁碟組注意事項ASMOracle
- ORACLE使用 DBCA 重建ASM磁碟組的相關問題總結OracleASM
- ASM磁碟組空間不足ASM
- 【RAC】asm_diskgroups 引數ASM
- 【ASM】Oracle asm磁碟被格式化,如何掛載該磁碟組ASMOracle
- 修改ASM磁碟組的屬性ASM
- ASM磁碟組刪除DISK操作ASM
- 修改ASM磁碟組冗餘模式ASM模式
- 有效管理 ASM 磁碟組空間ASM
- Oracle ASM新增磁碟組POWER OPTIONOracleASM
- Oracle ASM磁碟組常用操作命令OracleASM
- Oracle ASM異常dismount磁碟組OracleASM
- 【ASM】如何建立ASM磁碟ASM
- ASM之建立ASM磁碟ASM
- ASM磁碟組更換磁碟的操作方法ASM
- 在ASM磁碟組中刪除一個磁碟ASM
- 規劃ASM DISK GROUP、檢視asm 磁碟當前狀態、mount or dismount 磁碟組ASM
- 使用CREATE DISKGROUP語句建立ASM磁碟組,提示找不到相應的ASM磁碟ASM
- 使用udev擴充套件ASM磁碟組dev套件ASM
- ASM 磁碟組的建立及擴容ASM
- ORACLE ASM磁碟組空間溢位OracleASM
- ASM磁碟組擴容操作文件ASM
- 通過FTP訪問ASM磁碟組FTPASM
- ASM磁碟組不能自動掛載ASM
- 零當機時間遷移 ASM 磁碟組到另一個 SAN/磁碟陣列/DAS 的準確步驟ASM陣列