This discussion is archived
5 Replies Latest reply: Jun 13, 2012 2:51 PM by Fabricio_Jorge RSS

Some ASM doubts

Fabricio_Jorge Explorer
Currently Being Moderated
Hello,

As i am studying for the OCP exam, i realized that i have some doubts about the OCP subject that i have less experience: ASM.

I've installed Grid Infrastructure (11.2) on a VM (CentOS 5.5) successfully. I also mounted a diskgroup (with 4 disk, normal redundancy) successfully. At this point my doubts began to rise:

1) When i connect as sysasm on the asm instance, and issue an "startup" on SQL*Plus, the following warning appears: "ORA-00099: no parameter file specified for ASM instance". I understood the warning... i don't have a SPFILE associated to my ASM instance (on $GRID_HOME/dbs). I did some researches but i coudn't find an answer: Shouldn't Oracle had to create for me a PFILE/SPFILE? I've tryied to create an SPFILE, but i'm not for sure what are the essential parameters for a ASM SPFILE.

2) When a execute the following query:
select status from v$instance
... the result is "started". When i try to open the ASM instance, is says that: "ORA-15000: command disallowed by current instance type"... based os this result i ask: An ASM instance cannot be mounted/opened?

Sorry for the aparently silly question...

Every help/opinion will be very helpful to me. Tanhks a lot.
  • 1. Re: Some ASM doubts
    Levi-Pereira Guru
    Currently Being Moderated
    Fabricio_Jorge wrote:
    Hello,

    As i am studying for the OCP exam, i realized that i have some doubts about the OCP subject that i have less experience: ASM.

    I've installed Grid Infrastructure (11.2) on a VM (CentOS 5.5) successfully. I also mounted a diskgroup (with 4 disk, normal redundancy) successfully. At this point my doubts began to rise:

    1) When i connect as sysasm on the asm instance, and issue an "startup" on SQL*Plus, the following warning appears: "ORA-00099: no parameter file specified for ASM instance". I understood the warning... i don't have a SPFILE associated to my ASM instance (on $GRID_HOME/dbs). I did some researches but i coudn't find an answer: Shouldn't Oracle had to create for me a PFILE/SPFILE? I've tryied to create an SPFILE, but i'm not for sure what are the essential parameters for a ASM SPFILE.
    The ASM SPFILE is stored on ASM Diskgroup and when ASM is started by Oracle Restart or Clusterware he read OLR first to get all info to start ASM Instance.
    Read it:
    Unlocking: How the ASM instance starts with SPFILE stored in your own ASM Diskgroup
    http://levipereira.wordpress.com/2011/01/26/unlocking-how-the-asm-starts-with-spfile-stored-in-your-own-asm-diskgroup/


    >
    2) When a execute the following query:
    select status from v$instance
    ... the result is "started". When i try to open the ASM instance, is says that: "ORA-15000: command disallowed by current instance type"... based os this result i ask: An ASM instance cannot be mounted/opened?
    An Oracle ASM instance is a special Oracle instance that manages Oracle ASM disks. Both the ASM and the database instances require shared access to the disks in an ASM disk group. ASM instances manage the metadata of the disk group and provide file layout information to the database instances. Database instances direct I/O to ASM disks without going through an ASM instance.

    An ASM instance is built on the same technology as a database instance. For example, an ASM instance has a system global area (SGA) and background processes that are similar to those of a database instance. However, an ASM instance cannot mount a database and performs fewer tasks than a database instance.

    When you run the STARTUP command, rather than trying to mount and open a database, this command attempts to mount Oracle ASM disk groups. (just it)

    How Oracle ASM interprets SQL*Plus STARTUP command parameters?

    MOUNT or OPEN Parameter : Mounts the disk groups specified in the ASM_DISKGROUPS initialization parameter. This is the default if no command parameter is specified. (does not mean wich status on v$instance will show mounted or opened it's is valid only to mount diskgroups).

    NOMOUNT Parameter: Starts up the Oracle ASM instance without mounting any disk groups.

    RESTRICT Parameter : Starts up an instance in restricted mode that enables access only to users with both the CREATE SESSION and RESTRICTED SESSION system privileges. You can use the RESTRICT clause in combination with the MOUNT, NOMOUNT, and OPEN clauses.

    So, when you query v$instance you will see STARTED because is status from a Instance only it's not a Database Instance. To status be mounted or opened must be have a controlfile and datafile and ASM Instance does not have it.


    All info which you need is here http://docs.oracle.com/cd/E11882_01/server.112/e18951/asminst.htm , so I recommend you read this and next chapters.

    Regards,
    Levi Pereira

    Edited by: Levi Pereira on Jun 11, 2012 11:38 PM
  • 2. Re: Some ASM doubts
    Fabricio_Jorge Explorer
    Currently Being Moderated
    Thanks for your explanation. I am already reading this Oracle Doc in parallel with the OCP book.

    I have another question, if it's not much to ask: During database creation(using dbca), i cannot see my recently created diskgroup. I know this is one of the more frequent problems related to ASM. What can it be?

    The output of the following query shows that the diskgroup "data" is mounted:
    >select name, state from v$asm_diskgroup;
    NAME                           STATE
    ------------------------------ -----------
    DATA                           MOUNTED
    The output from the following query shows that the disks are cached (MOUNT_STATUS), with a state of NORMAL and MEMBER, in the column HEADER_STATUS:
    >select name, label, state, mount_status, header_status from v$asm_disk;
    NAME             LABEL                   STATE        MOUNT_S HEADER_STATU
    --------------------------------------------------------------------------------------------------
    DATA_0003                                  NORMAL   CACHED    MEMBER
    DATA_0002                                  NORMAL   CACHED    MEMBER
    DATA_0001                                  NORMAL   CACHED    MEMBER
    DATA_0000                                  NORMAL   CACHED    MEMBER
    The raw devices (/dev/raw/raw1 to 4) are all with oracle:oinstall permissions (rw-rw----). So are the oracleasm disks (/dev/oracleasm/disks/ASM_DISK1 to 4). I think the permissions are all ok. See below, please:
    brw-rw---- 1 oracle oinstall 8, 49 Jun 12 02:51 ASM_DISK1
    brw-rw---- 1 oracle oinstall 8, 65 Jun 12 02:51 ASM_DISK2
    brw-rw---- 1 oracle oinstall 8, 81 Jun 12 02:51 ASM_DISK3
    brw-rw---- 1 oracle oinstall 8, 97 Jun 12 02:16 ASM_DISK4
    Where do you think i am missing something?

    Thanks again for your help and attention.
  • 3. Re: Some ASM doubts
    Levi-Pereira Guru
    Currently Being Moderated
    Hi,
    I have another question, if it's not much to ask: During database creation(using dbca), i cannot see my recently created diskgroup. I know this is one of the more frequent problems related to ASM. What can it be?
    It's strange.

    You followed this steps below?

    At step : Specify storage type and location for database files;

    You choose "Automatic Storage Manager (ASM)" and check "Use Oracle Managed Files" click on button "Browser"
    The Available Diskgroup must show up, in some env DBCA ask for sysasm password.

    Regards,
    Levi Pereira
  • 4. Re: Some ASM doubts
    Fabricio_Jorge Explorer
    Currently Being Moderated
    Thaks again for your attention.

    Yes, i have followed those steps... several times i must say, only to be sure that i wasn't doing anything wrong.
    I have also looked at ASM logs (/var/log/oracleasm), but there i can only see the messages saying that my diskgroups are correctly mounted.
  • 5. Re: Some ASM doubts
    Fabricio_Jorge Explorer
    Currently Being Moderated
    I don't know (yet) if this mean something, but when i execute "crsctl status resource -t", the local resource "ora.DATA.dg, what i suppose to be the resource of my diskgroup, appears with TARGET=ONLINE and STATE=OFFLINE. This is the only resource with the STATE=OFFLINE.

    At this moment, this is the only strange thing that i can see.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points