The 11g asm disk cannot be automatically mounted.

Source: Internet
Author: User

The 11g asm disk cannot be automatically mounted.

I started ASM today and found that only one SYS_DG DISK is mounted (used to store OCR and VOTING DISK information). The other two DISK groups DATA_DG and DG_FRA do not mount.
Environment: OS = RHEL 6 DB = Oracle11GR2

[Grid @ myrac1 ~] $ Crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora. DATA_DG.dg ora... up. type OFFLINE
Ora. DG_FRA.dg ora... up. type OFFLINE
Ora... ER. lsnr ora... er. type ONLINE myrac1
Ora. SYS_DG.dg ora... up. type ONLINE myrac1
Ora. asm ora. asm. type ONLINE myrac1
Ora.css d. type ONLINE myrac1
Ora. diskmon ora... on. type ONLINE myrac1
Ora. hjj. db ora... se. type OFFLINE
Check the disk_groups parameter and find no value. It should be the three disk groups.
SQL> show parameter disk

NAME TYPE VALUE
-----------------------------------------------------------------------------
Asm_diskgroups string
Asm_diskstring string
Modify
[Grid @ myrac1 ~] $ Sqlplus/as sysasm
SQL> startup nomount
ASM instance started

Total System Global Area 284565504 bytes
Fixed Size 1336036 bytes
Variable Size 258063644 bytes
ASM Cache 25165824 bytes
SQL> alter system set asm_diskgroups = sys_dg, data_dg, dg_fra scope = spfile;
Alter system set asm_diskgroups = sys_dg, data_dg, dg_fra scope = spfile
*
ERROR at line 1:
ORA-32000: write to SPFILE requested but SPFILE is not modifiable
SQL>! Oerr ora 32000.
32000,000 00, "write to SPFILE requested but SPFILE is not modifiable"
// * Cause: An alter system command or an internal self-tuning mechanic
// Requested a write to the SPFILE but the SPFILE was not modifiable.
// * Action: Perform an in-memory parameter update only.
The prompt is that you can only modify it in memory. Try to modify it.
SQL> alter system set asm_diskgroups = sys_dg, data_dg, dg_fra scope = memory;

System altered.
Yes, but it cannot be saved permanently. You need to modify the disk_groups parameter in spfile so that the ASM instance can load all diskgroups at each start.
The problem is how to modify the asm_diskgroups parameter in the spfile.
Create pfile, modify pfile, create spfile, and restart the instance.

SQL> show parameter pfile

NAME TYPE VALUE
-----------------------------------------------------------------------------
Spfile string + SYS_DG/asm/asmparameterfile/registry.253.842510359
SQL> select instance_name, host_name, version, status from v $ instance;

INSTANCE_NAME HOST_NAME VERSION STATUS
-------------------------------------------------------------------------------------------------------------
+ ASM myrac1.oracle.com 11.2.0.1.0 STARTED

SQL> create pfile = '/g01/app/grid/product/11.2.0/grid/dbs/asmpfile. ora' from spfile;

File created.
[Grid @ myrac1 dbs] $ vi asmpfile. ora
+ ASM. _ oracle_base = '/g01/app/grid' # ORACLE_BASE set from in memory value
+ ASM. asm_diskgroups = 'sys _ DG, DATA_DG, dg_fra' # Manual Mount cannot be directly modified here
*. Asm_power_limit = 1
*. Diagnostic_dest = '/g01/app/grid'
*. Instance_type = 'asm'
*. Large_pool_size = 12 M
*. Remote_login_passwordfile = 'clusive'
~
SQL> create spfile from pfile = '/g01/app/grid/product/11.2.0/grid/dbs/asmpfile. ora ';

File created.
SQL> startup
ORA-01078: failure in processing system parameters
ORA-62001: value for parameter cannot contain a comma
SQL> startup pfile = '/g01/app/grid/product/11.2.0/grid/dbs/asmpfile. ora ';
ORA-62001: value for parameter cannot contain a comma
SQL> startup
ASM instance started

Total System Global Area 284565504 bytes
Fixed Size 1336036 bytes
Variable Size 258063644 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
The disk group DATA_DG and DG_FRA are still not mounted.
[Grid @ myrac1 ~] $ Crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora. DATA_DG.dg ora... up. type OFFLINE
Ora. DG_FRA.dg ora... up. type OFFLINE
Ora... ER. lsnr ora... er. type ONLINE myrac1
Ora. SYS_DG.dg ora... up. type ONLINE myrac1
Ora. asm ora. asm. type ONLINE myrac1
Ora.css d. type ONLINE myrac1
Ora. diskmon ora... on. type ONLINE myrac1
Ora. hjj. db ora... se. type OFFLINE
You can only modify the asm_diskgroups parameter in this way.
SQL> alter system set asm_diskgroups = sys_dg, data_dg, dg_fra scope = spfile sid = '+ ASM ';

System altered.

SQL> select status from v $ instance;

STATUS
------------
STARTED

SQL> shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started

Total System Global Area 284565504 bytes
Fixed Size 1336036 bytes
Variable Size 258063644 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL>!
[Grid @ myrac1 ~] $ Crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora. DATA_DG.dg ora... up. type ONLINE myrac1
Ora. DG_FRA.dg ora... up. type ONLINE myrac1
Ora... ER. lsnr ora... er. type ONLINE myrac1
Ora. SYS_DG.dg ora... up. type ONLINE myrac1
Ora. asm ora. asm. type ONLINE myrac1
Ora.css d. type ONLINE myrac1
Ora. diskmon ora... on. type ONLINE myrac1
Ora. hjj. db ora... se. type OFFLINE
SQL> show parameter pfile

NAME TYPE VALUE
-----------------------------------------------------------------------------
Spfile string/g01/app/grid/product/11.2.0/grid/dbs/spfile + ASM. ora
[Grid @ myrac1 dbs] $ mv spfile + ASM. ora spfile + ASM. ora. bak
[Grid @ myrac1 dbs] $ ls
20140219 AB _ + ASM. dat asmpfile. ora hc _ + ASM. dat init. ora orapw + ASM peshm _ + ASM_1 spfile + ASM. ora. bak
SQL> shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ORA-00099: warning: no parameter file specified for ASM instance
ASM instance started

Total System Global Area 284565504 bytes
Fixed Size 1336036 bytes
Variable Size 258063644 bytes
ASM Cache 25165824 bytes
ORA-15110: no diskgroups mounted
The $ CRS_HOME/dbs/spfile + ASM. ora parameter file used is not the parameter file on the SYS_DG disk.
The spfile on the disk group can be read by the asm instance at startup. The steps are as follows:
SQL> show parameter spfile

NAME TYPE VALUE
-----------------------------------------------------------------------------
Spfile string/g01/app/grid/product/11.2.0/grid/dbs/spfile + ASM. ora
SQL> startup
ASM instance started

Total System Global Area 284565504 bytes
Fixed Size 1336036 bytes
Variable Size 258063644 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL>! Crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora. DATA_DG.dg ora... up. type OFFLINE
Ora. DG_FRA.dg ora... up. type OFFLINE
Ora... ER. lsnr ora... er. type ONLINE myrac1
Ora. SYS_DG.dg ora... up. type ONLINE myrac1
Ora. asm ora. asm. type ONLINE myrac1
Ora.css d. type ONLINE myrac1
Ora. diskmon ora... on. type ONLINE myrac1
Ora. hjj. db ora... se. type OFFLINE

SQL> create spfile = '+ SYS_DG' from pfile = '/g01/app/grid/product/11.2.0/grid/dbs/asmpfile. ora ';

File created.

SQL> shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started

Total System Global Area 284565504 bytes
Fixed Size 1336036 bytes
Variable Size 258063644 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL>! Crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora. DATA_DG.dg ora... up. type OFFLINE
Ora. DG_FRA.dg ora... up. type OFFLINE
Ora... ER. lsnr ora... er. type ONLINE myrac1
Ora. SYS_DG.dg ora... up. type ONLINE myrac1
Ora. asm ora. asm. type ONLINE myrac1
Ora.css d. type ONLINE myrac1
Ora. diskmon ora... on. type ONLINE myrac1
Ora. hjj. db ora... se. type OFFLINE

SQL> alter system set asm_diskgroups = sys_dg, data_dg, dg_fra scope = spfile sid = '+ ASM ';

System altered.

The file is as follows:

ASMCMD> ls
DATA_DG/
DG_FRA/
SYS_DG/
ASMCMD> cd sys_dg
ASMCMD> ls
ASM/
ASMCMD> cd asm
ASMCMD> ls
ASMPARAMETERFILE/
ASMCMD> cd asmparameterfile
ASMCMD> ls
REGISTRY.253.840236163

ASMCMD> pwd
+ Sys_dg/asm/asmparameterfile

SQL> show parameter spfile

NAME TYPE VALUE
-----------------------------------------------------------------------------
Spfile string + SYS_DG/asm/asmparameterfile/r
Egistry.253.840236163
SQL> shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started

Total System Global Area 284565504 bytes
Fixed Size 1336036 bytes
Variable Size 258063644 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> show parameter spfile

NAME TYPE VALUE
-----------------------------------------------------------------------------
Spfile string + SYS_DG/asm/asmparameterfile/registry.253.840236163
SQL> show parameter diskgroups

NAME TYPE VALUE
-----------------------------------------------------------------------------
Asm_diskgroups string SYS_DG, DATA_DG, DG_FRA
SQL>! Crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora. DATA_DG.dg ora... up. type ONLINE myrac1
Ora. DG_FRA.dg ora... up. type ONLINE myrac1
Ora... ER. lsnr ora... er. type ONLINE myrac1
Ora. SYS_DG.dg ora... up. type ONLINE myrac1
Ora. asm ora. asm. type ONLINE myrac1
Ora.css d. type ONLINE myrac1
Ora. diskmon ora... on. type ONLINE myrac1
Ora. hjj. db ora... se. type OFFLINE
Note: + ASM. asm_diskgroups = 'sys _ DG '# Manual Mount in asmpfile. ora. You cannot add DATA_DG or DG_FRA. Otherwise, an error is returned when you create a spfile. It can only be modified through alter system.
Summary: In the NOMOUNT stage, oracle allocates memory space based on Parameter files and starts background processes. At this time, the disk groups are not loaded, but the oracle spfile is directly read from the disk, it does not matter whether SYS_DG is mounted.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.