PowerShell Commands for Clustering – Managing Data in a Hybrid Network

Table 13.3 contains just some of the PowerShell commands that you can use to configure and manage Windows Server 2022 clustering.

TABLE 13.3 Windows Server 2022 clustering PowerShell commands

Add- ClusterDiskThis command allows you to add a new disk to a failover cluster. The disk’s LUN must be visible to all cluster nodes.
Add- ClusterFileServerRoleThis command allows you to create a clustered file server.
Add- ClusterGenericApplicationRoleThis command allows you to configure high availability for an application that is normally not designed for clustering.
Add- ClusterGroupThis command allows you to add a resource group to the failover cluster.
Add- ClusterNodeThis command allows an admin to add a node to a failover cluster.
Add- ClusterResourceThis command allows you to add a resource to a failover cluster.

TABLE 13.3 Windows Server 2022 clustering PowerShell commands (Continued)

PowerShell commandDescription
Add- ClusterResourceDependencyThis command allows an admin to add a resource dependency to a failover cluster.
Add- ClusterServerRoleThis command allows you to add the cluster server role to a server.
Block- ClusterAccessThis command allows you to block the specified users from accessing a cluster.
Get- ClusterThis command shows you the information about a failover clusters.
Get- ClusterAccessThis command shows you the permissions for a failover clusters.
Get- ClusterNodeThis command shows you the information about the servers in a failover clusters.
Get- ClusterQuorumThis command shows you the information about the cluster quorum in a clusters.
New- ClusterThis command allows you to create a new failover cluster.
Remove- ClusterThis command allows you to remove a failover cluster.
Remove- ClusterAccessThis command allows you to remove a user’s access from the cluster.
Remove- ClusterNodeThis command allows you to remove a node from a failover cluster.
Start- ClusterThis command allows you to start the Cluster service on all nodes.
Stop- ClusterThis command allows you to stop the Cluster service on all nodes.
Stop- ClusterNodeThis command stops the Cluster service on a node.
Test- ClusterThis command allows you to complete validation tests for a cluster.

Storage Spaces

With Windows Server 2012, Microsoft introduced the Storage Spaces feature. With Windows Server 2016, Microsoft released a similar feature called Storage Spaces Direct. Storage Spaces Direct will be covered in the next section of this chapter. Storage Spaces can be used with the Windows client and with Windows Server. It can be used to help protect your data from drive failures and is very similar to RAID (Redundant Array of Independent Disks). Storage Spaces can be used to group two or more drives together into a storage pool. You need at least two extra drives (in addition to the drive where Windows is installed). These drives can be internal or external hard drives, or solid- state drives. You can use a variety of types of drives with Storage Spaces, including USB, SATA, and SAS drives.

There are several ways that you can use Storage Spaces. You can use it on a Windows client machine; on a stand- alone server with all storage in a single server; on a clustered server using Storage Spaces Direct with local, direct- attached storage in each cluster node; or on a clustered server with one or more shared SAS storage enclosures holding all drives.

You must first create one or more storage pools in order to create a storage space.  A storage pool is a collection of physical disks. Then from within the storage pool you can create one or more virtual disks. The virtual disks are also known as storage spaces. These storage spaces will appear as regular disks within the operating system, and you can then create formatted volumes. A storage space cannot be used to host the Windows operating system. Storage spaces will usually contain two copies of your data; that way, if a drive fails, you will still retain your data. If you start to run low on space, you can just add more drives to the storage pool.

Storage Spaces Resiliency Layouts

There are three types of resiliency layouts for Storage Spaces:

Simple This is for increased performance, but the downfall is that your files are not protected from drive failure. Simple spaces require at least two drives.

Mirrored This is for increased performance and will protect your files from drive failure by keeping multiple copies of your data.

Two- way mirrors will make two copies of your files and can tolerate one drive failure and requires at least two drives.

Three- way mirrors can tolerate two drive failures and requires at least five drives.

Parity This is for increased performance and will protect your files from drive failure by keeping multiple copies. To protect from a single drive failure, Parity requires at least three drives and at least seven drives in order to protect from two drive failures.

Storage Spaces Provisioning Types

Provisioning means to make something available. There are two provisioning types that you can choose from:

Thin Space is allocated on an as- needed basis. This will optimize how the available storage is used. But you will need to monitor how much disk space is available because thin provisioning allows you to overallocate storage.

Fixed Storage capacity is immediately assigned when the virtual disk is created. Fixed provisioning will use the storage pool space that is equal to the virtual disk size.

Leave a Reply