---
title: "How to Set Up Storage Spaces Direct [Step-by-Step]"
description: "Learn how to take advantage of and utilize the Windows capability of storage spaces direct in this in-depth guide via ATA Learning!"
canonical: "https://adamtheautomator.com/storage-spaces-direct/"
---

# How to Set Up Storage Spaces Direct [Step-by-Step]

> Learn how to take advantage of and utilize the Windows capability of storage spaces direct in this in-depth guide via ATA Learning!

Source: https://adamtheautomator.com/storage-spaces-direct/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![How to Set Up Storage Spaces Direct \[Step-by-Step\]](https://adamtheautomator.com/wp-content/uploads/2022/11/How-to-Set-Up-Storage-Spaces-Direct-Step-by-Step.jpg)

# How to Set Up Storage Spaces Direct \[Step-by-Step\]

[![](https://secure.gravatar.com/avatar/04025eca38bf59973f7838d8d4e79b34a3e3ef587ec879ee63f80149ff9be11b?s=192&d=mm&r=g)Verah Ombui](https://adamtheautomator.com/author/verah-ombui/)22 November 20227 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[File Management](/tag/file-management/)[Windows](/tag/windows/)[windows server](/tag/windows-server/)

Table of Contents

*   [Prerequisites](#prerequisites)
*   [Creating a New Cluster](#creating-a-new-cluster)
*   [Configuring Storage Spaces Direct](#configuring-storage-spaces-direct)
*   [Checking Existing Pool Data and Enabling S2D Services](#checking-existing-pool-data-and-enabling-s2d-services)
*   [Creating a Storage Pool and Adding Disks](#creating-a-storage-pool-and-adding-disks)
*   [Creating Storage Volumes](#creating-storage-volumes)
*   [Mirrored Volumes](#mirrored-volumes)
*   [Parity Volumes](#parity-volumes)
*   [Tiered Volumes](#tiered-volumes)
*   [Conclusion](#conclusion)

Has your business struggled with the high costs of upgrading server storage? Ensure higher reliability, availability, and performance of your server storage with Storage Spaces Direct (S2D).

S2D can help your business, or a small enterprise significantly cut down on server storage costs by providing fault-tolerant storage. And in this tutorial, you will learn how to deploy S2D on a four-node cluster of servers.

Read on and ensure your organization’s data remains online!

## Prerequisites

This tutorial will be a hands-on demonstration. If you would like to follow along, be sure you have the following:

*   A workstation PC running [Windows Operating System with Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) role capabilities – This article uses [Windows 10 Pro v21H2 build 19044.1889](https://www.xda-developers.com/windows-10-19044-1889-fix-print-issues/).

Related:[The Essential Guide to Hyper-V Windows 10 VMs](https://adamtheautomator.com/hyper-v-windows-10/)

*   Three Storage Server VMs installed with Windows Server 2016 Datacenter Core Edition – This tutorial uses Storage Server VMs called Storage1, Storage2, and Storage4.
    
*   A Virtual Machine (VM) installed with Windows Server 2016 Datacenter Desktop Edition, providing Active Directory and [Domain](https://adamtheautomator.com/add-computer-to-domain/) Services (AD DS) to the Storage Server VMs.
    

Related:[How to Add a Computer to a Domain (GUI and PowerShell).](https://adamtheautomator.com/add-computer-to-domain/)

## Creating a New Cluster

When setting up S2D, you will need to create a new cluster. But first, you must validate that your hardware environment software supports clustering.

1\. Launch PowerShell as administrator from one of the storage VM servers with the [Failover-Cluster](https://learn.microsoft.com/en-us/windows-server/failover-clustering/failover-clustering-overview) role installed.

2\. Next, run the [Test-Cluster](https://learn.microsoft.com/en-us/powershell/module/failoverclusters/test-cluster?view=windowsserver2022-ps) command below to test if your hardware environment supports clustering.

```powershell
Test-Cluster -Node Storage1, Storage2, Storage4 -Include Inventory,Network,"System Configuration”
```

Upon running the Test-Cluster command, there will be warnings reported. Running the [Validate Cluster](https://learn.microsoft.com/en-us/windows-server/manage/windows-admin-center/use/manage-failover-clusters) option from the Failover Cluster Manager GUI is a sure way to troubleshoot cluster configurations.

> _Note that you are not running the Storage Spaces Direct cluster tests, as these will report errors in a virtual environment._

![Testing a cluster](https://adamtheautomator.com/wp-content/uploads/2022/11/image-298.png)

Testing a cluster

3\. After completing the cluster tests, run the following command to create a new cluster ([New-Cluster](https://learn.microsoft.com/en-us/powershell/module/failoverclusters/new-cluster?view=windowsserver2022-ps)) called (-Name) HC -Cluster.

New-Cluster -Name HC-Cluster -Node Storage1, Storage2, Storage4 -NoStorage -StaticAddress 10.0.0.101

PowerShell

```powershell
New-Cluster -Name HC-Cluster -Node Storage1, Storage2, Storage4 -NoStorage -StaticAddress 10.0.0.101
```

![Creating a new cluster](https://adamtheautomator.com/wp-content/uploads/2022/11/image-299.png)

Creating a new cluster

4\. Now, run the [Get-Cluster](https://learn.microsoft.com/en-us/powershell/module/failoverclusters/get-cluster?view=windowsserver2022-ps) command to verify the newly created hyper-converged cluster.

![Verifying the newly-created cluster](https://adamtheautomator.com/wp-content/uploads/2022/11/image-300.png)

Verifying the newly-created cluster

5\. Once verified, run the [Get-ClusterNetwork](https://learn.microsoft.com/en-us/powershell/module/failoverclusters/get-clusternetwork?view=windowsserver2022-ps) and [Get-ClusterNetworkInterface](https://learn.microsoft.com/en-us/powershell/module/failoverclusters/get-clusternetworkinterface?view=windowsserver2022-ps) commands to validate the cluster health.

![Validating the cluster health](https://adamtheautomator.com/wp-content/uploads/2022/11/image-301.png)

Validating the cluster health

6\. Next, run the below [Get-ClusterSharedVolume](https://learn.microsoft.com/en-us/powershell/module/failoverclusters/get-clustersharedvolume?view=windowsserver2022-ps) command, which does not provide output, but queries for the cluster storage configuration.

```powershell
Get-ClusterSharedVolume
```

The image below is expected since you earlier set the -NoStorage flag when creating a new cluster.

![Querying the cluster storage configuration](https://adamtheautomator.com/wp-content/uploads/2022/11/image-302.png)

Querying the cluster storage configuration

7\. Lastly, run the [Get-PhysicalDisk](https://learn.microsoft.com/en-us/powershell/module/storage/get-physicaldisk?view=windowsserver2022-ps) command on one of the storage servers to list all physical disks available.

```powershell
Get-PhysicalDisk
```

As shown below, you get the list of all physical disks with more than six original virtual SCSI disks.

Notice the cluster has now collected the disk drives on all four storage servers. As a result, each server now displays 18 local disk drives.

![Listing all physical disks in the storage servers](https://adamtheautomator.com/wp-content/uploads/2022/11/image-303.png)

Listing all physical disks in the storage servers

## Configuring Storage Spaces Direct

Even after creating a cluster, you still have to configure S2D to ensure it works correctly. In most environments, running the Enable-ClusterS2D command performs the following:

*   Enable Storage Spaces Direct services.
*   Create the Software Storage Bus.
*   Create a Storage Spaces Pool.
*   Scan the cluster for all eligible disks for pooling.
*   Add the disks to the pool.
*   Create storage tiers Capacity and Performance.

In this tutorial, you will perform these steps manually to understand each better.

### Checking Existing Pool Data and Enabling S2D Services

Since you are working in a virtual environment, there might not be any legacy Storage Spaces data existing. But if any disk has been used in a pool, existing data should be removed.

1\. Run the below [Get-StoragePool](https://learn.microsoft.com/en-us/powershell/module/storage/get-storagepool?view=windowsserver2022-ps) command to return a set of StoragePool objects.

```powershell
Get-StoragePool
```

![Retrieving a set of storage pool objects](https://adamtheautomator.com/wp-content/uploads/2022/11/image-304.png)

Retrieving a set of storage pool objects

2\. Next, run the below commands to check the disks (Get-PhysicalDisk) inside each StoragePool object.

```powershell
Get-StoragePool | Select-Object -First 1 | Get-PhysicalDisk
Get-StoragePool | Select-Object -Last 1 | Get-PhysicalDisk
```

As you can see below, one pool is a default containing all the physical disk drives other than the OS disk, while the other pool only contains the OS disk.

> _When the storage pool is created later in this tutorial, and all unallocated disks are added to the new pool, these disks will still reside in the primordial pool._

![Listing virtual disks in storage pools](https://adamtheautomator.com/wp-content/uploads/2022/11/image-305.png)

Listing virtual disks in storage pools

3\. Lastly, run the following [Enable-ClusterS2D](https://learn.microsoft.com/en-us/powershell/module/failoverclusters/enable-clusterstoragespacesdirect?view=windowsserver2022-ps) command on any storage cluster node to enable the Storage Spaces Direct services and perform the following:

*   Query every node and eligible disk.
*   Run a battery of tests to guarantee the storage infrastructure will provide reliable storage services.

But other than enabling Storage Spaces Direct software services, no storage configurations have been performed.

```powershell
Enable-ClusterS2D -CacheState Disabled -AutoConfig:0 -SkipEligibilityChecks -Confirm:$false
```

![Enabling S2D services](https://adamtheautomator.com/wp-content/uploads/2022/11/image-306.png)

Enabling S2D services

### Creating a Storage Pool and Adding Disks

You have just enabled S2D services, and it is time to see S2D in action. You will manually create a storage pool and add disks to the pool. Storage spaces help protect your data from drive failures. In addition, you can extend storage over time by adding drives to your computer.

1\. Run the Get-PhysicalDisk command to display the list of physical disks.

```powershell
Get-PhysicalDisk | ? CanPool -eq True | ft FriendlyName, CanPool, MediaType, PhysicalLocation
```

Notice that the (FriendlyName) and (MediaType) values are not helpful and can be changed.

> _The MediaType parameter on the disk drives is set to Unspecified by default when making virtual storage servers._

![Accessing the physical disks sorted by friendly name and media type](https://adamtheautomator.com/wp-content/uploads/2022/11/image-307.png)

Accessing the physical disks sorted by friendly name and media type

2\. Next, run the below command to create a pool with the name S2DPool, and add all the disks attached to the virtual [SCSI LUN](https://stonefly.com/resources/what-is-a-logical-unit-number-lun) address of 3.

```powershell
$Disks = Get-PhysicalDisk | ? PhysicalLocation -like "*LUN 3"
New-StoragePool -StorageSubSystemFriendlyName Cluster -FriendlyName S2DPool -ProvisioningTypeDefault Fixed -PhysicalDisk $Disks
```

![Creating an S2D storage pool](https://adamtheautomator.com/wp-content/uploads/2022/11/image-308.png)

Creating an S2D storage pool

3\. Once created, run the below commands to display the storage pools and the disks inside the newly-created pool (S2DPool).

```powershell
Get-StoragePool
Get-StoragePool -FriendlyName S2DPool | Get-PhysicalDisk
```

![Creating a new S2D storage spaces pool](https://adamtheautomator.com/wp-content/uploads/2022/11/image-309.png)

Creating a new S2D storage spaces pool

4\. Now, run the below command to verify the newly-created storage pool’s (S2DPool) PhysicalLocation.

```powershell
Get-StoragePool -FriendlyName S2DPool | Get-PhysicalDisk | ft PhysicalLocation
```

![Verifying S2DPool’s storage physical disk location](https://adamtheautomator.com/wp-content/uploads/2022/11/image-310.png)

Verifying S2DPool’s storage physical disk location

5\. Run each command below, which does not provide output, but add the disks from LUN addresses 0,1,2,4 and 5 to the S2DPool.

```powershell
$Disks = Get-PhysicalDisk | ? PhysicalLocation -like "*LUN 0"
Add-PhysicalDisk -PhysicalDisks $Disks -StoragePoolFriendlyName S2DPool
$Disks = Get-PhysicalDisk | ? PhysicalLocation -like "*LUN 1"
Add-PhysicalDisk -PhysicalDisks $Disks -StoragePoolFriendlyName S2DPool
$Disks = Get-PhysicalDisk | ? PhysicalLocation -like "*LUN 2"
Add-PhysicalDisk -PhysicalDisks $Disks -StoragePoolFriendlyName S2DPool
$Disks = Get-PhysicalDisk | ? PhysicalLocation -like "*LUN 4"
Add-PhysicalDisk -PhysicalDisks $Disks -StoragePoolFriendlyName S2DPool
$Disks = Get-PhysicalDisk | ? PhysicalLocation -like "*LUN 5"
Add-PhysicalDisk -PhysicalDisks $Disks -StoragePoolFriendlyName S2DPool
```

6\. After adding the disks, run the below command to sanity-check them and verify their physical locations.

```powershell
Get-StoragePool -FriendlyName S2DPool | Get-PhysicalDisk | sort PhysicalLocation | ft PhysicalLocation
```

If all goes well, there should be 16 disks in the S2DPool, as shown below.

![Verifying all physical disks locations in the S2DPool](https://adamtheautomator.com/wp-content/uploads/2022/11/image-311.png)

Verifying all physical disks locations in the S2DPool

7\. Next, run the below command to display the disks within the new S2DPool.

```powershell
Get-StoragePool -FriendlyName S2DPool | Get-PhysicalDisk | ft FriendlyName, CanPool, MediaType, PhysicalLocation
```

The S2DPool now contains disks on each storage server, as shown below.

![Verifying all disks in the S2D pool](https://adamtheautomator.com/wp-content/uploads/2022/11/image-312.png)

Verifying all disks in the S2D pool

8\. Ultimately, run the [Set-ClusterS2D](https://learn.microsoft.com/en-us/powershell/module/failoverclusters/set-clusterstoragespacesdirect?view=windowsserver2022-ps) command below to enable S2D.

```powershell
Set-ClusterS2D -CacheState Enabled -Verbose
Update-StorageProviderCache -DiscoveryLevel Full
```

The below output will be displayed upon running the above commands.

## Creating Storage Volumes

The storage cluster is now configured as a four-node cluster. This environment will support all the Storage Spaces resiliency settings for storage volumes (virtual disk volumes).

Resiliency settings can be configured as follows:

<table><tbody><tr><td>Mirrored</td><td>Data is synchronously replicated across two or three nodes.</td></tr><tr><td>Parity</td><td>Data is striped across multiple disks, efficiently storing parity data.</td></tr><tr><td>Tiered</td><td>Volumes can be created using both Mirrored and Parity resiliency tiers.</td></tr></tbody></table>

In the following sections, you will create different volumes to understand these resiliency settings better, starting with mirrored volumes.

### Mirrored Volumes

Mirrored resiliency has the advantage of speed since reads are distributed across multiple nodes, where data is synchronously replicated across two or three nodes.

Run the following [New-Volume](https://learn.microsoft.com/en-us/powershell/module/storage/new-volume?view=windowsserver2022-ps) commands to create two-way (Mirror-2-Vol1) and three-way (Mirror-3-Vol1) mirrored volumes in the S2DPool.

```powershell
New-Volume -FriendlyName "Mirror-2-Vol1" -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2DPool -Size 1GB -ResiliencySettingName Mirror
New-Volume -FriendlyName "Mirror-3-Vol1" -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2DPool -Size 1GB -ResiliencySettingName Mirror -PhysicalDiskRedundancy 3
```

![Creating Mirror-2 and Mirror-3 volumes](https://adamtheautomator.com/wp-content/uploads/2022/11/image-314.png)

Creating Mirror-2 and Mirror-3 volumes

### Parity Volumes

Unlike mirrored resiliency, which stores multiple copies of data, parity resiliency stores data more efficiently across multiple disks. But note that parity has reduced read performance since data is not distributed to various nodes and disks.

Execute each command below to create both Single Parity and Dual Parity volumes.

```powershell
New-Volume -FriendlyName "Parity-1-Vol1" -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2DPool -Size 1GB -ResiliencySettingName Parity
New-Volume -FriendlyName "Parity-2-Vol1" -FileSystem CSVFS_ReFS -StoragePoolFriendlyName S2DPool -Size 1GB -ResiliencySettingName Parity -PhysicalDiskRedundancy 2
```

The above PowerShell commands will display the below results.

![Creating Parity-1 and Parity-2 volumes](https://adamtheautomator.com/wp-content/uploads/2022/11/image-315.png)

Creating Parity-1 and Parity-2 volumes

Now, run the below [Get-VirtualDisk](https://learn.microsoft.com/en-us/powershell/module/storage/get-virtualdisk?view=windowsserver2022-ps) command to display the newly-created volumes (Virtual Disks).

```powershell
Get-VirtualDisk | ft FriendlyName, ResiliencySettingName, PhysicalDiskRedundancy
```

![Getting volume information](https://adamtheautomator.com/wp-content/uploads/2022/11/image-316.png)

Getting volume information

### Tiered Volumes

Perhaps you need the strength of both mirrored and parity volumes. If so, a tiered volume is what you need. Tiered volumes provide the speed advantage of mirrored volumes and the capacity advantage of parity.

Run the below commands to create a tiered mirror and parity volumes, and verify them.

```powershell
New-StorageTier -MediaType HDD -StoragePoolFriendlyName S2DPool -FriendlyName HDD_Tier
New-StorageTier -MediaType SSD -StoragePoolFriendlyName S2DPool -FriendlyName SSD_Tier
Get-StorageTier | Select FriendlyName, ResiliencySettingName, PhysicalDiskRedundancy
```

![](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F1cf66369-75bb-4fa1-aa70-a686f172dcc1%2Ftier-1.png?table=block&id=bd9816b6-a2a1-452c-8e04-1dc967a35014&spaceId=7e6ab015-653c-45bd-8aa6-095867b4b98e&width=1940&userId=94af2673-4428-42a6-bde9-b50d08ce1409&cache=v2)

Creating a new HDD storage tier

![Creating a new SSD storage tier](https://adamtheautomator.com/wp-content/uploads/2022/11/image-317.png)

Creating a new SSD storage tier

![Getting created storage tiers information](https://adamtheautomator.com/wp-content/uploads/2022/11/image-318.png)

Getting created storage tiers information

Now, run the Get-VirtualDisk command below to list available volumes sorted by the FriendlyName property.

```powershell
Get-VirtualDisk | sort FriendlyName
```

Below, you can see all the volumes with each significant resiliency setting.

![Sorting virtual disk by friendly name](https://adamtheautomator.com/wp-content/uploads/2022/11/image-319.png)

Sorting virtual disk by friendly name

## Conclusion

Throughout this tutorial, you have created a virtual environment using Storage Spaces Direct, which is now a base infrastructure to build into a complete hybrid cloud environment. A hybrid cloud can be constructed by adding roles and configurations and clustering the servers. As a result, each server is compatible with the S2D and Hyper-V roles.

At this point, you have configured a relatively raw virtual environment. Why not turn it into a robust storage environment?

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fstorage-spaces-direct%2F&text=How%20to%20Set%20Up%20Storage%20Spaces%20Direct%20%5BStep-by-Step%5D)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fstorage-spaces-direct%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fstorage-spaces-direct%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2024/04/idfix.jpg)

### [Solve Azure AD Connect Errors via the Microsoft IdFix Tool](/idfix/)

Fix Azure AD Connect errors fast with the Microsoft IdFix tool—your go-to solution for seamless synchronization and efficient directory management!

![](https://adamtheautomator.com/wp-content/uploads/2022/11/How-to-Install-NitroShare-for-Cross-Platform-File-Transfer.jpg)

### [Install NitroShare and Streamline Your File Transfers Today](/nitroshare/)

Simplify cross-platform file transfers with NitroShare. This tutorial guides you through installation and use for fast, effortless file sharing between different operating systems.

![](https://adamtheautomator.com/wp-content/uploads/2022/11/windows-server-storage.jpg)

### [Getting Started with Windows Server Storage](/windows-server-storage/)

Learn everything you need to know about Windows Server Storage in this in-depth tutorial by ATA Learning and manage your storage like a pro!

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
