Sun Cluster System Administration Guide for Solaris OS

ProcedureHow to Set the Desired Number of Secondaries for a Device Group

The numsecondaries property specifies the number of nodes within a device group that can master the group if the primary node fails. The default number of secondaries for device services is one. You can set the value to any integer between one and the number of operational nonprimary provider nodes in the device group.

This setting is an important factor in balancing cluster performance and availability. For example, increasing the desired number of secondaries increases the device group's opportunity to survive multiple failures that occur simultaneously within a cluster. Increasing the number of secondaries also decreases performance regularly during normal operation. A smaller number of secondaries typically results in better performance, but reduces availability. However, a larger number of secondaries does not always result in greater availability of the file system or device group in question. Refer to Chapter 3, Key Concepts for System Administrators and Application Developers, in Sun Cluster Concepts Guide for Solaris OS for more information.

If you change the numsecondaries property, secondary nodes are added or removed from the device group if the change causes a mismatch between the actual number of secondaries and the desired number.

This procedure uses the clsetup utility to set the numsecondaries property for all types of device groups. Refer to cldevicegroup(1CL) for information about device group options when configuring any device group.

The phys-schost# prompt reflects a global-cluster prompt. Perform this procedure on a global cluster.

This procedure provides the long forms of the Sun Cluster commands. Most commands also have short forms. Except for the long and short forms of the command names, the commands are identical. For a list of the commands and their short forms, see Appendix B, Sun Cluster Object-Oriented Commands.

  1. Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.modify RBAC authorization on any node of the cluster.

  2. Start the clsetup utility.


    # clsetup
    

    The Main Menu is displayed.

  3. To work with device groups, select the option labeled Device groups and volumes.

    The Device Groups Menu is displayed.

  4. To change key properties of a device group, select the option labeled Change key properties of a device group.

    The Change Key Properties Menu is displayed.

  5. To change the desired number of secondaries, type the number that corresponds to the option for changing the numsecondaries property.

    Follow the instructions and type the desired number of secondaries to be configured for the device group. The corresponding cldevicegroup command is then executed, a log is printed, and the utility returns to the previous menu.

  6. Validate the device group configuration.


    # cldevicegroup show dg-schost-1
    === Device Groups ===                          
    
    Device Group Name:                    dg-schost-1
      Type:                                 VxVm  This might also be SDS or Local_Disk.
      failback:                             yes
      Node List:                            phys-schost-1, phys-schost-2 phys-schost-3
      preferenced:                          yes
      numsecondaries:                       1
      diskgroup names:                         dg-schost-1

    Note –

    If you change any configuration information for a VxVM disk group or volume that is registered with the cluster, you must reregister the device group by using clsetup. Such configuration changes include adding or removing volumes, as well as changing the group, owner, or permissions of existing volumes. Reregistration after configuration changes ensures that the global namespace is in the correct state. See How to Update the Global Device Namespace.


  7. Verify that the device group attribute has been changed.

    Look for the device group information that is displayed by the following command.


    # cldevicegroup show -v devicegroup 
    

Example 5–31 Changing the Desired Number of Secondaries (Solaris Volume Manager)

The following example shows the cldevicegroup command that is generated by clsetup when it configures the desired number of secondaries for a device group (dg-schost-1). This example assumes that the disk group and volume were created previously.


# cldevicegroup set -p numsecondaries=1 dg-schost-1
# cldevicegroup show -v dg-schost-1

=== Device Groups ===                          

Device Group Name:                        dg-schost-1
  Type:                                     SVM
  failback:                                 yes
  Node List:                                phys-schost-1, phys-schost-2
  preferenced:                              yes
  numsecondaries:                           1
  diskset names:                             dg-schost-1


Example 5–32 SPARC: Setting the Desired Number of Secondaries (Veritas Volume Manager)

The following example shows the cldevicegroup command that is generated by clsetup when it sets the desired number of secondaries for a device group (dg-schost-1) to two. See How to Set the Desired Number of Secondaries for a Device Group for information about changing the desired number of secondaries after a device group is created.


# cldevicegroup set -p numsecondaries=2 dg-schost-1

# cldevicegroup show dg-schost-1
=== Device Groups ===                          

Device Group Name:                        dg-schost-1
  Type:                                     VxVM
  failback:                                 yes
  Node List:                                phys-schost-1, phys-schost-2
  preferenced:                              yes
  numsecondaries:                           1
  diskgroup names:                             dg-schost-1 


Example 5–33 Setting the Desired Number of Secondaries to the Default Value

The following example shows use of a null string value to configure the default number of secondaries. The device group will be configured to use the default value, even if the default value changes.


# cldevicegroup set -p numsecondaries= dg-schost-1
# cldevicegroup show -v dg-schost-1

=== Device Groups ===                          

Device Group Name:                        dg-schost-1
  Type:                                     SVM
  failback:                                 yes
  Node List:                                phys-schost-1, phys-schost-2 phys-schost-3
  preferenced:                              yes
  numsecondaries:                           1
  diskset names:                             dg-schost-1