Sun Cluster Data Service for Oracle Real Application Clusters Guide for Solaris OS

Creating a Multi-Owner Disk Set in Solaris Volume Manager for Sun Cluster for the Oracle Real Application Clusters Database


Note –

Perform this task only if you are using Solaris Volume Manager for Sun Cluster.


If you are using Solaris Volume Manager for Sun Cluster, Solaris Volume Manager requires a multi-owner disk set for the Oracle Real Application Clusters database to use. For information about Solaris Volume Manager for Sun Cluster multi–owner disk sets, see “Disk Set Concepts for Solaris Volume Manager for Sun Cluster” in Solaris Volume Manager Administration Guide.

Before You Begin

Before you create a multi-owner disk set in Solaris Volume Manager for Sun Cluster for the Oracle Real Application Clusters database, note the following points.

How to Create a Multi-Owner Disk Set in Solaris Volume Manager for Sun Cluster for the Oracle Real Application Clusters Database

  1. Create a multi-owner disk set.

    Use the metaset(1M) command for this purpose.


    # metaset -s setname -M -a -h nodelist
    
    -s setname

    Specifies the name of the disk set that you are creating.

    -M

    Specifies that the disk set that you are creating is a multi-owner disk set.

    -a

    Specifies that the nodes that the -h option specifies are to be added to the disk set.

    -h nodelist

    Specifies a space-separated list of nodes that are to be added to the disk set. The Sun Cluster Support for Oracle Real Application Clusters software packages must be installed on each node in the list.

  2. Add global devices to the disk set that you created in Step 1.


    # metaset -s setname -a devicelist
    
    -s setname

    Specifies that you are modifying the disk set that you created in Step 1.

    -a

    Specifies that the devices that devicelist specifies are to be added to the disk set.

    devicelist

    Specifies a space-separated list of full device ID path names for the global devices that are to be added to the disk set. To enable consistent access to each device from any node in the cluster, ensure that each device ID path name is of the form /dev/did/dsk/dN, where N is the device number.

  3. For the disk set that you created in Step 1, create the volumes that the Oracle Real Application Clusters database will use.


    Note –

    If you are creating many volumes for Oracle data files, you can simplify this step by using soft partitions. For more information, see “Soft Partitions (Overview)” in Solaris Volume Manager Administration Guide and “Soft Partitions (Tasks)” in Solaris Volume Manager Administration Guide.


    Create each volume by concatenating slices on global devices that you added in Step 2. Use the metainit(1M) command for this purpose.


    # metainit -s setname volume-abbrev numstripes width slicelist
    
    -s setname

    Specifies that you are creating a volume for the disk set that you created in Step 1.

    volume-abbrev

    Specifies the abbreviated name of the volume that you are creating. An abbreviated volume name has the format dV, where V is the volume number.

    numstripes

    Specifies the number of stripes in the volume.

    width

    Specifies the number of slices in each stripe. If you set width to greater than 1, the slices are striped.

    slicelist

    Specifies a space-separated list of slices that the volume contains. Each slice must reside on a global device that you added in Step 2.

  4. Verify that each node is correctly added to the multi-owner disk set.

    Use the metastat(1M) command for this purpose.


    # metastat -s setname
    
    -s setname

    Specifies that you are verifying the disk set that you created in Step 1

    This command displays a table that contains the following information for each node that is correctly added to the disk set:

    • The Host column contains the node name.

    • The Owner column contains the text multi-owner.

    • The Member column contains the text Yes.

  5. Verify that the multi-owner disk set is correctly configured.


    # scconf -pvv | grep setname
    
    setname

    Specifies that configuration information only for the disk set that you created in Step 1 is displayed

    This command displays the device group information for the disk set. For a multi-owner disk set, the device group type is Multi-owner_SVM.

  6. Verify the online status of the multi-owner disk set.


    # scstat -D
    

    This command displays the node names of nodes in the multi-owner disk set that are online.

  7. On each node that can own the disk set, change the ownership of each volume that you created in Step 3 as follows:

    • Owner: oracle

    • Group: dba

    Ensure that you change ownership only of volumes that the Oracle Real Application Clusters database will use.


    # chown oracle:dba volume-list
    
    volume-list

    Specifies a space-separated list of the logical names of the volumes that you created for the disk set. The format of these names depends on the type of device where the volume resides, as follows:

    • For block devices: /dev/md/setname/dsk/dV

    • For raw devices: /dev/md/setname/rdsk/dV

    The replaceable items in these names are as follows:

    setname

    Specifies the name of the multi-owner disk set that you created in Step 1

    V

    Specifies the volume number of a volume that you created in Step 3

    Ensure that this list specifies each volume that you created in Step 3.

  8. On each node that can own the disk set, grant the oracle user read access and write access to each volume for which you changed the ownership in Step 7.

    Ensure that you change access permissions only of volumes that the Oracle Real Application Clusters database will use.


    # chmod u+rw volume-list
    
    volume-list

    Specifies a space-separated list of the logical names of the volumes to which you are granting the oracle user read access and write access. Ensure that this list contains the volumes that you specified in Step 7.


Example 1–3 Creating a Multi-Owner Disk Set in Solaris Volume Manager for Sun Cluster

This example shows the sequence of operations that is required to create a multi-owner disk set in Solaris Volume Manager for Sun Cluster. This example assumes that the volumes reside on raw devices.

  1. To create the multi-owner disk set, the following command is run:


    # metaset -s racdbset -M -a -h rachost1 rachost2 rachost3 rachost4
    

    The multi-owner disk set is named racdbset. The nodes rachost1, rachost2, rachost3, and rachost4 are added to this disk set.

  2. To add the global device /dev/did/dsk/d0 to the disk set, the following command is run:


    # metaset -s racdbset -a /dev/did/dsk/d0
    
  3. To create a volume for the disk set, the following command is run:


    # metainit -s racdbset d0 1 1 /dev/did/dsk/d0s0 
    

    The volume is named d0. This volume is created by a one-on-one concatenation of the slice /dev/did/dsk/d0s0. The slice is not striped.

  4. To verify that each node is correctly added to the multi-owner disk set, the following command is run:


    # metastat -s racdbset
    Multi-owner Set name = racdbset, Set number = 1, Master = rachost2
    
    Host                Owner          Member
       rachost1           multi-owner   Yes
       rachost2           multi-owner   Yes
       rachost3           multi-owner   Yes
       rachost4           multi-owner   Yes
    
    Drive Dbase
    
    d6    Yes
    
    d10   Yes
  5. To verify that the multi-owner disk set is correctly configured, the following command is run:


    # scconf -pvv | grep racdbset
    Device group name:                                 racdbset
       (racdbset) Device group type:                       Multi-owner_SVM
       (racdbset) Device group failback enabled:           no
       (racdbset) Device group node list:       rachost1, rachost2, rachost3, rachost4
       (racdbset) Device group ordered node list:          no
       (racdbset) Device group desired number of secondaries: 0
       (racdbset) Device group diskset name:               racdbset
  6. To verify the online status of the multi-owner disk set, the following command is run:


    # scstat -D
    
    -- Device Group Servers --
    
                              Device Group        Primary             Secondary
                              ------------        -------             ---------
    
    
    -- Device Group Status --
    
                                   Device Group        Status
                                   ------------        ------
    
    
    -- Multi-owner Device Groups --
    
                                   Device Group        Online Status
                                   ------------        -------------
       Multi-owner device group:   racdbset            rachost1,rachost2,rachost3,rachost4
  7. To change the ownership of the volume in the disk set to owner oracle in group dba, the following command is run:


    # chown oracle:dba /dev/md/racdbset/rdsk/d0
    

    This command is run on each node that can own the disk set.

  8. To grant the oracle user read access to the volume in the disk set, the following command is run:


    # chmod u+rw /dev/md/racdbset/rdsk/d0
    

    This command is run on each node that can own the disk set.


Where to Go From Here

After you have created a multi-owner disk set for the Oracle Real Application Clusters database, go to Registering and Configuring the RAC Framework Resource Group to register and configure Sun Cluster Support for Oracle Real Application Clusters.