Skip to content

ClusterDisk

dscbot edited this page Jun 11, 2022 · 2 revisions

ClusterDisk

Parameters

Parameter Attribute DataType Description Allowed Values
Number Key String The disk number of the cluster disk.
Ensure Write String Define if the cluster disk should be added (Present) or removed (Absent). Default value is 'Present'. Present, Absent
Label Write String The disk label that should be assigned to the disk on the Failover Cluster disk resource.

Description

Configures shared disks in a cluster.

Requirements

  • Target machine must be running Windows Server 2008 R2 or later.

Examples

Example 1

This example shows how to add two failover over cluster disk resources to the failover cluster.

.NOTES This example assumes the failover cluster is already present.

Configuration ClusterDisk_AddClusterDiskConfig
{
    Import-DscResource -ModuleName FailoverClusterDsc

    Node localhost
    {
        ClusterDisk 'AddClusterDisk-SQL2017-DATA'
        {
            Number = 1
            Ensure = 'Present'
            Label  = 'SQL2016-DATA'
        }

        ClusterDisk 'AddClusterDisk-SQL2017-LOG'
        {
            Number = 2
            Ensure = 'Present'
            Label  = 'SQL2016-LOG'
        }
    }
}

Example 2

This example shows how to remove two failover over cluster disk resources from the failover cluster.

.NOTES This example assumes the failover cluster is already present.

Configuration ClusterDisk_RemoveClusterDiskConfig
{
    Import-DscResource -ModuleName FailoverClusterDsc

    Node localhost
    {
        ClusterDisk 'AddClusterDisk-SQL2017-DATA'
        {
            Number = 1
            Ensure = 'Absent'
            Label  = 'SQL2016-DATA'
        }

        ClusterDisk 'AddClusterDisk-SQL2017-LOG'
        {
            Number = 2
            Ensure = 'Absent'
            Label  = 'SQL2016-LOG'
        }
    }
}