Sun Cluster 3.0 System Administration Guide

Chapter 4 Administering Quorum

This chapter provides the procedures for administering quorum within Sun Cluster.

This is a list of the procedures in this chapter.

Most examples shown in this chapter are from a three-node cluster.

See the Sun Cluster 3.0 Concepts document for a conceptual overview of quorum and quorum devices.

4.1 Administering Quorum Overview

You can use the scconf(1M) command to perform all quorum administrative procedures. In addition, some procedures can be accomplished by using the scsetup(1M) interactive utility. Whenever possible, quorum procedures are described in this chapter using scsetup.

If any quorum-related scconf command is interrupted or fails, the quorum configuration information can become inconsistent in the cluster configuration database. If this occurs, either rerun the command or run scconf with the reset option to reset the quorum configuration.


Note -

The scsetup(1M) utility is an interactive interface to the scconf(1M) command. When scsetup runs, it generates scconf commands. These generated commands are shown in the examples at the end of the procedures.


There are two commands that can be used to view the quorum configuration: scstat -q option and scconf -p. Most of the verification steps in this chapter use scconf, but you can substitute scstat -q if you find its output more useful.

Table 4-1 Task Map: Administering Quorum

Task 

For Instructions, Go To... 

Add a quorum device to a cluster 

    - Use scsetup

"4.1.1 How to Add a Quorum Device"

Remove a quorum device from a cluster 

    - Use scsetup (to generate scconf)

"4.1.2 How to Remove a Quorum Device"

Remove the last quorum device from a cluster 

    - Use scsetup (to generate scconf)

"4.1.3 How to Remove the Last Quorum Device From a Cluster"

Replace a quorum device in a cluster 

    - Use the add and remove procedures 

"4.1.4 How to Replace a Quorum Device"

Put a quorum device into maintenance state 

(While in maintenance state, the quorum device does not participate in voting to establish the quorum.) 

    - Use scsetup (to generate scconf)

"4.1.5 How to Put a Quorum Device Into Maintenance State"

Put a cluster node into maintenance state 

(While in maintenance state, the node does not participate in voting to establish the quorum.) 

    - Use scsetup (to generate scconf)

"4.1.6 How to Put a Cluster Node Into Maintenance State"

Reset the quorum configuration to its default state 

    - Use scsetup (to generate scconf)

"4.1.7 How to Bring a Node Out of Maintenance State and Reset Quorum"

List the quorum devices and vote counts 

    - Use scconf

"4.1.8 How to List the Quorum Configuration"

4.1.1 How to Add a Quorum Device

To complete this procedure, identify a disk drive by its device ID (DID) that is shared by the nodes. Use the scdidadm -L command to see the list of DID names. Refer to scdidadm(1M) for additional information.

See scsetup(1M) and scconf(1M) for information on the commands used in this procedure.

  1. Become superuser on a node of the cluster.

  2. Enter the scsetup utility.


    # scsetup
    

    The Main Menu appears.

  3. To work with quorum devices, enter 1 (Quorum).

    The Quorum Menu appears.

  4. To add a quorum device, enter 1 (Add a quorum disk).

    Follow the instructions and enter the device to be used as the quorum device.

  5. Verify that the quorum device has been added.


    # scstat -q 
    
  6. Repeat Step 3 through Step 5 for each group of nodes that shares a storage enclosure.

4.1.1.1 Example--Adding a Quorum Device

The following example shows the scconf command generated by scsetup when it adds a quorum device and a verification step.


# scconf -a -q globaldev=d20
# scstat -q
 
-- Quorum Summary --
 
  Quorum votes possible: 4
  Quorum votes needed:   3
  Quorum votes present:  4
 
-- Quorum Votes by Node --
 
                    Node Name           Present Possible Status
                    ---------           ------- -------- ------
  Node votes:       phys-schost-1       1        1       Online
  Node votes:       phys-schost-2       1        1       Online
 
-- Quorum Votes by Device --
 
                 Device Name         Present Possible Status  Owner
                 -----------         ------- -------- ------  -----
  Device votes:  /dev/did/rdsk/d3s2  1        1       Online  phys-schost-1
  Device votes:  /dev/did/rdsk/d4s2  1        1       Online  phys-schost-1

4.1.2 How to Remove a Quorum Device

When a quorum disk is removed, it no longer participates in the voting to establish quorum. Note that all two-node clusters require that at least one quorum device be configured. If this is the last quorum device on a cluster, scconf(1M) will fail to remove the device from the configuration.


Note -

If the device you intend to remove is the last quorum device in the cluster, see the procedure "4.1.3 How to Remove the Last Quorum Device From a Cluster".


  1. Become superuser on a node in the cluster.

  2. Determine the quorum device to be removed.


    # scconf -pv | grep Quorum
    
  3. Execute the scsetup(1M) utility.


    # scsetup
    

    The Main Menu appears.

  4. Access the Quorum Menu by entering 1 (Quorum) to work with the quorum device.

  5. Remove the quorum device by entering 2 (Remove a quorum disk).

    Answer the questions displayed during the removal process.

  6. Quit scsetup.

  7. Verify that the quorum device is removed.


    # scstat -q
    

4.1.2.1 Example--Removing a Quorum Device

This example shows how to remove a quorum device from a cluster with two or more quorum devices configured.


[Become superuser on a node and place the node to be removed in maintenance state.]
[Determine the quorum device to be removed:]
# scconf -pv | grep Quorum
[Execute the scsetup utility:]
# scsetup
[Select option 1:]
*** Main Menu ***
    Please select from one of the following options:
      1) Quorum
       ...
    Option:  1
[Select option 2:]
*** Quorum Menu ***
    Please select from one of the following options:
       ...
      2) Remove a quorum disk
       ...
    Option:  2
[Answer the questions when prompted:]
 >>> Remove a Quorum Disk <<<
    ...
    Is it okay to continue (yes/no) [yes]? <Return>
    Which quorum disk do you want to remove (d<N>)?  d4
    Is it okay to proceed with the update (yes/no) [yes]? <Return>
 
scconf -r -q globaldev=d4
 
    Command completed successfully.
    Hit ENTER to continue: 
[Quit the scsetup Quorum Menu and Main Menu:]
    ...
    Option:  q
[Verify the quorum device is removed:]
# scstat -q
 
-- Quorum Summary --
 
  Quorum votes possible:      3
  Quorum votes needed:        2
  Quorum votes present:       3
 
-- Quorum Votes by Node --
 
                    Node Name           Present Possible Status
                    ---------           ------- -------- ------
  Node votes:       phys-schost-1       1        1       Online
  Node votes:       phys-schost-2       1        1       Online
 
-- Quorum Votes by Device --
 
                 Device Name         Present Possible Status  Owner
                 -----------         ------- -------- ------  -----
  Device votes:  /dev/did/rdsk/d3s2  1        1       Online  phys-schost-1

4.1.3 How to Remove the Last Quorum Device From a Cluster

If the device you intend to remove is not the last quorum device in the cluster, use the previous procedure, "4.1.2 How to Remove a Quorum Device".


Note -

All two-node clusters require at least one configured quorum device. If this is the last quorum device on a two-node cluster, the cluster must be placed into install mode before scconf(1M) allows you to remove the device from the configuration. This should only be done if a node is being removed from the cluster.


  1. Become superuser on a node in the cluster and place the node to be removed in maintenance state.

    See "4.1.6 How to Put a Cluster Node Into Maintenance State".

  2. Place the cluster in install mode.


    # scconf -c -q installmode
    
  3. Remove the quorum device using the scconf command.


    # scconf -r -q globaldev=device
    
  4. Verify that the quorum device has been removed.


    # scstat -q
    

4.1.3.1 Example--Removing the Last Quorum Device

This example shows how to remove the last remaining quorum device in a cluster configuration.


[Become superuser on any node.]
[Place the cluster in install mode:]
# scconf -c -q installmode
[Remove the quorum device:]
# scconf -r -q globaldev=d3
[Verify the quorum device has been removed:]
# scstat -q
 
-- Quorum Summary --
 
  Quorum votes possible:      2
  Quorum votes needed:        2
  Quorum votes present:       2
 
-- Quorum Votes by Node --
 
                    Node Name           Present Possible Status
                    ---------           ------- -------- ------
  Node votes:       phys-schost-1       1        1       Online
  Node votes:       phys-schost-2       1        1       Online
 
-- Quorum Votes by Device --
 
                    Device Name         Present Possible Status  Owner
                    -----------         ------- -------- ------  -----

4.1.4 How to Replace a Quorum Device

  1. Configure a new quorum device on the storage enclosure that currently includes the disk to be replaced.

    You need to first add a new quorum device to the configuration to take the place of the old device. See "4.1.1 How to Add a Quorum Device" to add a new quorum device to the cluster.

  2. Remove the failed disk as a quorum device.

    See "4.1.2 How to Remove a Quorum Device" to remove the old quorum device from the configuration.

  3. Replace the failed disk.

    Refer to the hardware procedures in the Sun Cluster 3.0 Hardware Guide for your disk enclosure.

4.1.5 How to Put a Quorum Device Into Maintenance State

Put a quorum device into maintenance state when taking the quorum device out of service for an extended period of time. This way, the device's quorum vote count is set to zero and does not contribute to the quorum count while the device is being serviced.

You need to use the scconf(1M) command to put a quorum device into the maintenance state. The scsetup utility does not have the ability to put a quorum device into maintenance state.


Note -

All two-node clusters require at least one configured quorum device. If this is the last quorum device on a two-node cluster, scconf will fail to put the device into maintenance state.


  1. Become superuser on a node of the cluster.

  2. Put the quorum device into the maintenance state.


    # scconf -c -q globaldev=device,maintstate
    
    -c

    Specifies the change form of the scconf command.

    -q

    Manages the quorum options.

    globaldev=device

    Specifies the DID name of the disk device to change, for example, d4.

    maintstate

    Puts the node into maintenance state.

  3. Verify that the quorum device is now in maintenance state.

    The output for the device you placed in maintenance state should read zero for the Quorum Device Votes.


    # scconf -p | grep -i quorum
    

4.1.5.1 Example--Putting a Quorum Device Into Maintenance State

The following example shows how to put a quorum device into maintenance state and how to verify the results.


# scconf -c -q globaldev=d20,maintstate
# scconf -p | grep -i quorum
  Node quorum vote count:                          1
  Node quorum vote count:                          1
Quorum devices:                                    d20
Quorum device name:                                d20
  Quorum device votes:                             0
  Quorum device enabled:                           no
  Quorum device path:                              /dev/did/rdsk/d20s2
  Quorum device hosts (enabled):                   phys-schost-2 phys-schost-3
  Quorum device hosts (disabled): 

4.1.5.2 Where to Go From Here

When you have completed the maintenance procedure on the quorum device, and want to re-enable the quorum device, see "4.1.7 How to Bring a Node Out of Maintenance State and Reset Quorum" to reset the quorum device's vote back to the default.

4.1.6 How to Put a Cluster Node Into Maintenance State

Put a cluster node into maintenance state when taking the node out of service for an extended period of time. This way, the node does not contribute to the quorum count while it is being serviced. To put a cluster node into maintenance state, the node must be brought down using scswitch(1M) and shutdown(1M).


Note -

Use the Solaris shutdown command to shut down a single node. The scshutdown command should be used only when shutting down an entire cluster.


When a cluster node is brought down and put into maintenance state, all quorum devices that are configured with ports to the node have their quorum vote counts decremented by one. The node and quorum device vote counts are incremented by one when the node is taken out of maintenance mode and brought back online.

You need to use scconf(1M) to put a cluster node into the maintenance state.The scsetup utility does not have the ability to put a quorum device into maintenance state.

  1. Become superuser on the node to be put into maintenance state.

  2. On the node to be put into maintenance state, use scswitch to evacuate any resource groups and disk device groups from the node and then shutdown to bring it down and out of the cluster.


    phys-schost-1# scswitch -S -h node
    phys-schost-1# shutdown -g 0 -y
    
  3. Become superuser on another node and put the node brought down in Step 2 into the maintenance state.


    phys-schost-2# scconf -c -q node=node,maintstate
    
    -c

    Specifies the change form of the scconf command.

    -q

    Manages the quorum options.

    node=node

    Specifies the node name or node ID of the node to change.

    maintstate

    Puts the node into maintenance state.

  4. Verify that the cluster node is now in maintenance state.


    phys-schost-2# scconf -p | grep -i vote
    

4.1.6.1 Example--Putting a Cluster Node Into Maintenance State

The following example moves a cluster node into maintenance state and verifies the results.


phys-schost-1# scswitch -S -h phys-schost-1
phys-schost-1# shutdown -g 0 -y
phys-schost-2# scconf -c -q node=phys-schost-1,maintstate
phys-schost-2# scconf -p | grep -i quorum
 Node quorum vote count:                           1
Quorum devices:                                    d20
Quorum device name:                                d20
  Quorum device votes:                             1
  Quorum device enabled:                           yes
  Quorum device path:                              /dev/did/rdsk/d5s2
  Quorum device hosts (disabled):                 phys-schost-1
  Quorum device hosts (enabled):                  phys-schost-2

4.1.6.2 Where to Go From Here

When you have completed the maintenance procedures, see "4.1.7 How to Bring a Node Out of Maintenance State and Reset Quorum" to reset the quorum vote back to the default.

4.1.7 How to Bring a Node Out of Maintenance State and Reset Quorum

After a quorum device or a node has been in maintenance state, and is being brought back online, use the following procedure to reset the quorum vote count to the default. For cluster nodes, the default quorum count is one. For quorum devices, the default quorum count is N-1, where N is the number of nodes with non-zero vote counts that have ports to the quorum device.

When a node has been put into maintenance state, the node's quorum vote count is decremented by one. All quorum devices that are configured with ports to the node will also have their quorum vote counts decremented. When the quorum vote count is reset and a node is brought back out of maintenance state, both the node's quorum vote count and the quorum device vote count are incremented by one.

You should run this procedure any time a node or a quorum device has been put into maintenance state and you are bringing it out of maintenance state.


Caution - Caution -

If you do not specify either the globaldev or node options, the quorum count is reset for the entire cluster.


  1. Become superuser on a node of the cluster.

  2. Reset the quorum count.

    This sample shows the quorum count being reset for a quorum device. Refer to "4.1.7.2 Example--Resetting the Quorum Vote Count (Cluster Node and Quorum Devices)" for an example using a cluster node rather than a quorum device.

    For a cluster node, reset the quorum count from another node before rebooting the node or it might hang waiting for quorum.


    # scconf -c -q globaldev=device,reset
    
    -c

    Specifies the change form of the scconf command.

    -q

    Manages the quorum options.

    globaldev=device

    Specifies the DID name of the quorum device to reset, for example, d4.

    reset

    The change flag that resets quorum.

  3. If you are resetting the quorum count because a node was in maintenance state, reboot the node.

  4. Verify the quorum vote count.


    # scconf -p | grep -i quorum
    

4.1.7.1 Example--Resetting the Quorum Vote Count (Quorum Device)

The following example resets the quorum count for a quorum device back to the default and verifies the result.


# scconf -c -q globaldev=d20,reset
# scconf -p | grep -i quorum
  Node quorum vote count:                          1
  Node quorum vote count:                          1
Quorum devices:                                    d20
Quorum device name:                                d20
  Quorum device votes:                             1
  Quorum device enabled:                           yes
  Quorum device path:                              /dev/did/rdsk/d20s2
  Quorum device hosts (enabled):                   phys-schost-2 phys-schost-3
  Quorum device hosts (disabled): 

4.1.7.2 Example--Resetting the Quorum Vote Count (Cluster Node and Quorum Devices)

The following example resets the quorum count for a cluster node and its quorum devices back to their defaults and verifies the result.


# scconf -c -q node=phys-schost-1,reset
# scconf -pv | grep -i vote
 Node quorum vote count:           1
 Node quorum vote count:           1
 Node quorum vote count:           1
 (d20) Quorum device votes:                        1
 (d21) Quorum device votes:                        1

4.1.8 How to List the Quorum Configuration

You do not need to be superuser to list the quorum configuration.

    Use scconf(1M) to list the quorum configuration.


    # scconf -p | grep -i quorum
    

4.1.8.1 Example--Listing the Quorum Configuration


# scconf -p | egrep "Quorum | vote"
 Node quorum vote count:                           1
 Node quorum vote count:                           1
Quorum devices:                                    d20
Quorum device name:                                d20
  Quorum device votes:                             1
  Quorum device enabled:                           yes
  Quorum device path:                              /dev/did/rdsk/d20s2
  Quorum device hosts (enabled):                   phys-schost-2 phys-schost-3
  Quorum device hosts (disabled):