-
Notifications
You must be signed in to change notification settings - Fork 54
ClusterQuorum
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
IsSingleInstance | Key | String | Specifies the resource is a single instance, the value must be 'Yes' . |
Yes |
Type | Write | String | Quorum type to use. |
NodeMajority , NodeAndDiskMajority , NodeAndFileShareMajority , NodeAndCloudMajority , DiskOnly
|
Resource | Write | String | The name of the disk, file share or Azure storage account resource to use as witness. This parameter is optional if the quorum type is set to 'NodeMajority' . |
|
StorageAccountAccessKey | Write | String | The access key of the Azure storage account to use as witness. This parameter is required if the quorum type is set to 'NodeAndCloudMajority' . NOTE! The key is currently not updated if the resource is already set. |
Configures quorum in a cluster. For information on how to choose the correct quorum type, please see the article Understanding Quorum Configurations in a Failover Cluster.
- Target machine must be running Windows Server 2008 R2 or later.
This example shows how to set the quorum in a failover cluster to use node majority.
.NOTES This example assumes the failover cluster is already present.
Configuration ClusterQuorum_SetQuorumToNodeMajorityConfig
{
Import-DscResource -ModuleName FailoverClusterDsc
Node localhost
{
ClusterQuorum 'SetQuorumToNodeMajority'
{
IsSingleInstance = 'Yes'
Type = 'NodeMajority'
}
}
}
This example shows how to set the quorum in a failover cluster to use node and disk majority.
.NOTES This example assumes the failover cluster is already present.
Configuration ClusterQuorum_SetQuorumToNodeAndDiskMajorityConfig
{
Import-DscResource -ModuleName FailoverClusterDsc
Node localhost
{
ClusterQuorum 'SetQuorumToNodeAndDiskMajority'
{
IsSingleInstance = 'Yes'
Type = 'NodeAndDiskMajority'
Resource = 'Witness Cluster Disk'
}
}
}
This example shows how to set the quorum in a failover cluster to use node and file share majority.
.NOTES This example assumes the failover cluster is already present.
This example also assumes that path \witness.company.local\witness$ is already present and has the right permission to be used by the cluster. Either the user running the configuration or the Cluster Name Object (CNO) should have full control on the share to be able to create the witness folder and set the permissions. More than one cluster can use the same share. Here is a link for setting up the high availability for the file share witness https://blogs.msdn.microsoft.com/clustering/2014/03/31/configuring-a-file-share-witness-on-a-scale-out-file-server/
Configuration ClusterQuorum_SetQuorumToNodeAndFileShareMajorityConfig
{
Import-DscResource -ModuleName FailoverClusterDsc
Node localhost
{
ClusterQuorum 'SetQuorumToNodeAndDiskMajority'
{
IsSingleInstance = 'Yes'
Type = 'NodeAndFileShareMajority'
Resource = '\\witness.company.local\witness$'
}
}
}
This example shows how to set the quorum in a failover cluster to use disk only.
.NOTES This example assumes the failover cluster is already present.
Configuration ClusterQuorum_SetQuorumToDiskOnlyConfig
{
Import-DscResource -ModuleName FailoverClusterDsc
Node localhost
{
ClusterQuorum 'SetQuorumToDiskOnly'
{
IsSingleInstance = 'Yes'
Type = 'DiskOnly'
Resource = 'Witness Cluster Disk'
}
}
}
This example shows how to set the quorum in a failover cluster to use node and cloud majority.
.NOTES This example assumes the failover cluster is already present.
This example also assumes that the Azure storage account 'myazurestorageaccount' is already present. An Azure storage account has 2 connection keys. Only one is needed for configuration. Here is a link for setting up the high availability with cloud witness https://docs.microsoft.com/en-us/windows-server/failover-clustering/deploy-cloud-witness
Configuration ClusterQuorum_SetQuorumToNodeAndCloudMajorityConfig
{
Import-DscResource -ModuleName FailoverClusterDsc
Node localhost
{
ClusterQuorum 'SetQuorumToNodeAndCloudMajority'
{
IsSingleInstance = 'Yes'
Type = 'NodeAndCloudMajority'
Resource = 'myazurestorageaccount'
StorageAccountAccessKey = '8gxPaXynG5onrfpuob+M+5wBE7ow01CjdyOw7rj3DbepsK/tt3kr1GOuqJhARCPeyAQmfW8WsTCOGFwAYUVw/Q=='
}
}
}