Monday, May 4, 2009

Quorum Devices in Sun Cluster

A quorum device is a disk shared by two or more nodes in the cluster to establish a quorum for the cluster to run.  Cluster operates only when a quorum of votes is available. Quorum devices are necessary to protect the cluster from split brain and amnesia situations. Each quorum device must be connected to at least two nodes.

Adding a quorum device automatically configures node-to-device paths for the nodes attached to the device. Later, if we add more nodes to the cluster, we might need to update these paths by removing then adding back the quorum device.

A SCSI quorum device is considered to be any Sun Cluster supported attached storage which connected to two or more nodes of the cluster. Dual-ported SCSI-2 disks may be used as quorum devices in two-node clusters.  However, clusters with more than two nodes require that SCSI-3 PGR disks be used for all disks with more than two node-to-disk paths.  We can use a disk containing user data or one that is a member of device group as a quorum device.

Quorum Arithmetic

Quorum equation states that a cluster must have the total number of configured votes, divided by two ( Remainders are discarded ) plus one.

Q = ( TQV /2 + 1 )

TQV - Total Quorum votes

Key to understanding quorum is learning how votes are assigned and counted. Each node in a configured cluster has one ( 1 ) quorum vote. Each shared storage device configured as quorum device has votes totaling the number of connected devices minus one  QD = ( TQD - 1 ).   For folks who need better understanding like me, it is the number of servers the quorum device is connected minus one.   If the quorum device is connected to 3 servers, then quorum devices’ vote will be two ( 2 ).

Ownership of a quorum device is decided by SCSI reservations which will be dealt at a later post.   Just for better understanding I am now posting couple of outputs which are for two node and three node cluster.  One can do his or her own math to understand the quorum arithmetic disscussed above. 

Two-node cluster

phys-host1 # 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-host1           1        1       Online
  Node votes:       phys-host2           1        1       Online
– Quorum Votes by Device –
                    Device Name         Present Possible Status
                    ———–         ——- ——– ——
  Device votes:     /dev/did/rdsk/d101s2 1        1       Online

Three-node cluster

phys-host1:> /usr/cluster/bin/scstat -q

– Quorum Summary –
Quorum votes possible: 7
Quorum votes needed: 4
Quorum votes present: 7

– Quorum Votes by Node –
Node Name                            Present Possible  Status
----------                           ------- --------  --------
Node votes: phys-host1                 1     1          Online
Node votes: phys-host2                 1     1          Online
Node votes: phys-host3                 1     1          Online

– Quorum Votes by Device –
Device Name                                                                Present Possible Status
———–                                                                            ——- ——– ——
Device votes: /dev/did/rdsk/d200s2                     2             2          Online
Device votes: /dev/did/rdsk/d199s2                      2             2           Online

No comments: