Sun Cluster Data Service for Oracle Guide for Solaris OS

ProcedureHow to Register and Configure Sun Cluster HA for Oracle with Clustered ASM Instance Using Sun Cluster Maintenance Commands

This procedure explains the steps to register and configure Sun Cluster HA for Oracle with clustered ASM instance using Sun Cluster maintenance commands.


Note –

You should install the Oracle CRS software before performing the steps in this procedure.


  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify and solaris.cluster.admin RBAC authorizations.


    Note –

    You can also use the clsetup utility to perform the steps 1 to 6 in the procedure.


  2. Register the resource types for Oracle RAC framework and CRS framework.


    # clresourcetype register SUNW.rac_framework
    # clresourcetype register SUNW.crs_framework
    
  3. Create a scalable resource group rac-fmwk-rg.


    # clresourcegroup create -S rac-fmwk-rg
    
  4. Add a resource of type SUNW.rac_framework to the rac-fmwk-rg resource group.


    # clresource create -g rac-fmwk-rg -t SUNW.rac_framework rac-fmwk-rs
    
  5. Add a resource of type SUNW.crs_framework to the rac-fmwk-rg resource group.


    # clresource create -g rac-fmwk-rg -t SUNW.crs_framework \
    -p resource_dependencies=rac-fmwk-rs \
    -d crs-fmwk-rs
    
  6. Create a failover resource group ora-db-rg for the Oracle database.


    # clresourcegroup create ora-db-rg
    
  7. SPARC: If you are using SPARC, perform the following steps. Other wise go to Step 8.


    Note –

    You can perform this step only if you have installed the ORCLudlm package before performing the ASM software installation.


    1. Register the resource type for Oracle UDLM.


      # clresourcetype register SUNW.rac_udlm
      
    2. Add a resource of type SUNW.rac_udlm to the rac-fmwk-rg resource group.


      # clresource create -g rac-fmwk-rg -t SUNW.rac_udlm \
      -p resource_dependencies=rac-fmwk-rs rac-udlm-rs
      
  8. Register the appropriate resource type for the file system you are using and create a resource group.


    Note –

    You should decide the file system you are going to use for Oracle_Home and set up the file system before performing this step. For information on how to setup a file system, see Preparing the Nodes and Disks.


    If you are using a QFS shared file system, perform the following steps to register the QFS shared file system resource type and create the resource groups. Otherwise, you should use the SUNW.HAStoragePlus resource type.

    • If you are using QFS shared file system, perform the following steps to register the QFS shared file system resource type and create the resource groups. Otherwise, you should use the SUNW.HAStoragePlus resource type.

      1. Register the resource type for QFS shared file system.


        # clresourcetype register SUNW.qfs
        
      2. Create a resource group qfs-rg.


        # clresourcegroup create qfs-rg
        
      3. Add a resource of type SUNW.qfs to the qfs-rg resource group.


        # clresource create -g qfs-rg -t SUNW.qfs -p QFSFileSystem=qfs-mp qfs-rs
        
        -g qfs-rg

        Specifies the name of the resource group.

        -t SUNW.qfs

        Specifies the type of the resource to add.

        -p QFSFileSystem=qfs-mp

        Specifies the QFS shared file system mount point.

        qfs-rs

        Specifies the name of the QFS shared file system resource that you are creating.

      4. Bring online the qfs-rg resource group in a managed state on a cluster node.


        # clresourcegroup online -eM qfs-rg
        
      5. Register the resource type for SUNW.ScalMountPoint.


        # clresourcetype register SUNW.ScalMountPoint
        
      6. Create a scalable resource group scal-mp-rg.


        # clresourcegroup create -S scal-mp-rg
        
      7. Add a resource of type SUNW.ScalMountPoint to the scal-mp-rg resource group.


        # clresource create -g scal-mp-rg -t SUNW.ScalMountPoint \
        -p mountpointdir=mount-point \
        -p filesystemtype=s-qfs \
        -p targetfilesystem=qfs-name \
        -p resource_dependencies=qfs-rs \
        -d scal-mp-rs
        
        -g scal-mp-rg

        Specifies the name of the scalable resource group.

        -t SUNW.ScalMountPoint

        Specifies the type of the resource to add.

        -p mountpointdir=mount-point

        Specifies the directory to which the file system is mounted.

        -p filesystemtype=s-qfs

        Specifies the file system type you are using.

        -p targetfilesystem=qfs-name

        Specifies the file system name that is mounted on this mount point.

        -d scal-mp-rs

        Specifies the name of the scalable mount point resource that you are creating.

      8. Bring online the scal-mp-rg resource group in a managed state on a cluster node.


        # clresourcegroup online -eM scal-mp-rg
        
    • If you are using file systems other than QFS shared file system, perform the following steps to register the SUNW.HAStoragePlus resource type and create the resource groups.

      1. Register the resource type for SUNW.HAStoragePlus resource type.


        # clresourcetype register SUNW.HAStoragePlus
        
      2. Add a resource of type SUNW.HAStorgePlus to the ora-db-rg resource group.


        # clresource create -g ora-db-rg -t SUNW.HAStoragePlus \
        -p filesystemmountpoints=mount-point-list -d hastp-rs
        
      3. Bring online the ora-db-rg resource group in a managed state on a cluster node.


        # clresourcegroup online -eM ora-db-rg
        
  9. Register the ASM resource types for the data service.


    # clresourcetype register SUNW.scalable_asm_instance_proxy
    # clresourcetype register SUNW.asm_diskgroup
    
  10. Create resource groups asm-inst-rg and asm-dg-rg.


    # clresourcegroup create -S asm-inst-rg asm-dg-rg
    
  11. Set a strong positive affinity on rac-fmwk-rg by asm-inst-rg.


    # clresourcegroup set -p rg_affinities=++rac-fmwk-rg asm-inst-rg
    
  12. Set a strong positive affinity on asm-inst-rg by asm-dg-rg.


    # clresourcegroup set -p rg_affinities=++asm-inst-rg asm-dg-rg
    
  13. Add a resource of type SUNW.crs_framework to the rac-fmwk-rg resource group.


    # clresource create -g rac-fmwk-rg -t SUNW.crs_framework \
    -p resource_dependencies=rac-fmwk-rs \
    -d crs-fmwk-rs
    
  14. Add a resource of type SUNW.scalable_asm_instance_proxy to the asm-inst-rg resource group.


    # clresource create -g asm-inst-rg -t SUNW.asm_instance_proxy \
    -p ORACLE_HOME=oracle-home \
    -p crs_home=crs-home \
    -p "oracle_sid{node1}"=instance \
    -p "oracle_sid{node2}"=instance \
    -p resource_dependencies_offline_restart=crs-fmwk-rs,qfs-mp-rs \
    -d asm-inst-rs
    
    -g asm-inst-rg

    Specifies the name of the resource group into which the resources are to be placed.

    -t SUNW.asm_inst_proxy

    Specifies the type of the resource to add.

    -p ORACLE_SID=instance

    Sets the Oracle system identifier.

    -p ORACLE_HOME=Oracle-home

    Sets the path to the Oracle home directory.

    -d asm-inst-rs

    Specifies the name of the resource that you are creating.

  15. Add a resource of type SUNW.asm_diskgroup to the asm-dg-rg resource group.


    # clresource create -g asm-dg-rg -t SUNW.asm_diskgroup \
    -p asm_diskgroups=dg \
    -p resource_dependencies_offline_restart=asm-inst-rs,qfs-mp-rs \
    -d asm-dg-rs
    
    -g asm-dg-rg

    Specifies the name of the resource group into which the resources are to be placed.

    -t SUNW.asm_diskgroup

    Specifies the type of the resource to add.

    -p asm_diskgroups=dg

    Specifies the ASM disk group.

    -d asm-dg-rs

    Specifies the name of the resource that you are creating.

  16. Bring online the asm-inst-rg resource group in a managed state on a cluster node.


    # clresourcegroup online -eM asm-inst-rg
    
  17. Bring online the asm-dg-rg resource group in a managed state on a cluster node.


    # clresourcegroup online -eM asm-dg-rg
    
  18. Verify the Oracle ASM installation by issuing the status command.


    # clresource status +
    
  19. Register the resource types for the Sun Cluster HA for Oracle data service.

    For Sun Cluster HA for Oracle, you register two resource types, SUNW.oracle_server and SUNW.oracle_listener, as follows.


    # clresourcetype register SUNW.oracle_server
    # clresourcetype register SUNW.oracle_listener
    
  20. Add a logical hostname resource to the failover resource group for Oracle database.


    # clreslogicalhostname create -g ora-db-rg [-h logicalhostname] \
    logicalhostname-rs
    
    logicalhostname

    Specifies a logical hostname. This logical hostname must present in your name service database. If logicalhostname and logicalhostname-rs are identical, logicalhostname is optional.

    logicalhostname-rs

    Specifies the name that you are assigning to the logical hostname resource that you are creating.

  21. Bring online the failover resource group in a managed state on a cluster node.


    # clresourcegroup online -eM ora-db-rg
    
  22. Create Oracle application resources in the failover resource group.

    • Oracle server resource:


      # clresource create -g ora-db-rg \
      -t SUNW.oracle_server \ 
      -p Connect_string=user/passwd \
      -p ORACLE_SID=instance \
      -p ORACLE_HOME=Oracle-home \
      -p Alert_log_file=path-to-log \
      -p Resource_dependencies_offline_restart=asm-dg-rs \
      -d ora-db-rs
      
    • Oracle listener resource:


      # clresource create -g ora-db-rg \
      -t SUNW.oracle_listener \
      -p ORACLE_HOME=Oracle-home \
      -p listener_name=listener \
      -p resource_dependencies_offline_restart=asm-dg-rs,logicalhostname-rs \
      -d ora-ls-rs
      
    -g ora-db-rg

    Specifies the name of the resource group into which the resources are to be placed.

    -t SUNW.oracle_server/listener

    Specifies the type of the resource to add.

    -p Alert_log_file=path-to-log

    Sets the path under $ORACLE_HOME for the server message log.

    -p Connect_string=user/passwd

    Specifies the user and password that the fault monitor uses to connect to the database. These settings must agree with the permissions that you set up in How to Set Up Oracle Database Permissions. If you use Solaris authorization, type a slash (/) instead of the user name and password.

    -p ORACLE_SID=instance

    Sets the Oracle system identifier.

    -p ORACLE_HOME=Oracle-home

    Sets the path to the Oracle home directory.

    -p listener_name=listener

    Sets the name of the Oracle listener instance. This name must match the corresponding entry in listener.ora.

    -d ora-ls-rs

    Specifies the name of the resource that you are creating.


    Note –

    Optionally, you can set additional extension properties that belong to the Oracle data service to override their default values. See Setting Sun Cluster HA for Oracle Extension Properties for a list of extension properties.


  23. Bring online the Oracle server resource.


    # clresource enable ora-db-rs
    
  24. Bring online the Oracle listener resource.


    # clresource enable ora-ls-rs
    
Cluster File System

Note –

You can also install Oracle_Home for ASM on a cluster file system. If you are using a cluster file system, you should create the resources SUNW.HAStoragePlus and SUNW.scalable_asm_instance and set the appropriate dependencies between these two resources.

Sample commands to create the SUNW.HAStoragePlus resource and SUNW.scalable_asm_instance resource is given as follows:


# clresource create -g asm-inst-rg -t SUNW.HAStoragePlus \ 
-p FilesystemMountPoints=cluster-file-system \
hastp-rs

# clresource create -g asm-inst-rg -t SUNW.scalable_asm_instance \
-p ORACLE_HOME=oracle-home \
-p "oracle_sid{node1}"=instance \
-p "oracle_sid{node2}"=instance \
-p resource_dependencies_restart=hastp-rs \
-p resource_dependencies_offline_restart=crs-fmwk-rs \
asm-inst-rs