Skip to content

Storage Spaces Direct (S2D)

Setting Up Storage Spaces Direct

Storage Spaces Direct (S2D) is a software-defined storage solution in Windows Server that aggregates direct-attached storage (DAS) across multiple nodes to create a resilient, scalable storage pool. This section outlines the steps to configure S2D for a hyper-converged infrastructure, ensuring fault tolerance and high availability.


Prerequisites

Before configuring S2D, ensure the following:
- Hardware:
- Minimum of two nodes (each with at least two SAS/NVMe SSDs for cache and multiple JBOD/RAID-0 volumes for capacity).
- All nodes must be connected to the same network and share a common time source (e.g., NTP).
- Software:
- Windows Server 2016 or later with the Hyper-V, Failover Clustering, and Storage Replica roles installed.
- Cluster Requirements:
- A failover cluster must be created across all nodes.


Step-by-Step Configuration

1. Prepare Hardware for JBOD Mode

  • Initialize disks: Use Disk Management to initialize all disks as Basic (not dynamic).
  • Set disks to JBOD: Ensure all disks are configured as JBOD (no RAID) to avoid conflicts with S2D.
  • Assign cache disks: Designate at least two SSDs per node as cache disks (used for write caching).
# Example: List all physical disks
Get-PhysicalDisk | Select-Object FriendlyName, OperationalStatus, HealthStatus

2. Create a Failover Cluster

  • Validate cluster configuration:
    Test-Cluster -Node <Node1>,<Node2> -IncludeAllRoleDependencies
    
  • Create the cluster:
    New-Cluster -Name "S2DCluster" -Node <Node1>,<Node2> -StaticAddress <IP_Address>
    
  • Verify cluster status:
    Get-Cluster | Select-Object Name, State
    

3. Prepare Nodes for S2D

  • Enable Storage Replica:
    Enable-ClusterStorageReplica
    
  • Add disks to the cluster:
    Use Failover Cluster Manager to add all JBOD volumes as Cluster Shared Volumes (CSV).

4. Create the Storage Pool

  • Add physical disks:
    Get-PhysicalDisk | Where-Object { $_.OperationalStatus -eq "Online" } | Add-StoragePool -FriendlyName "S2DStoragePool"
    
  • Verify storage pool:
    Get-StoragePool | Select-Object FriendlyName, OperationalStatus, HealthStatus
    

5. Set Up Virtual Disks

  • Create virtual disks:
    New-VirtualDisk -FriendlyName "S2DVirtualDisk" -StoragePoolFriendlyName "S2DStoragePool" -Size 1TB -ResiliencySettingName "Mirror"
    
  • Initialize virtual disks:
    Get-VirtualDisk | Initialize-VirtualDisk
    
  • Format and assign letters:
    Get-Disk | Where-Object { $_.PartitionStyle -eq "RAW" } | Initialize-Disk -PartitionStyle MBR -Force
    Get-Disk | Where-Object { $_.PartitionStyle -eq "MBR" } | New-Partition -AssignDriveLetter -Confirm:$false
    

Post-Configuration Tasks

  • Monitor health: Use Storage Spaces in Server Manager or PowerShell to check pool and disk health.
  • Configure storage tiers: Optimize performance by assigning SSDs to High Performance tiers.
  • Enable encryption: Use BitLocker to encrypt data at rest.
  • Set up replication: Configure cross-node replication for disaster recovery.

Key takeaways

  • S2D requires a failover cluster and JBOD disks for optimal performance.
  • PowerShell cmdlets like New-StoragePool and New-VirtualDisk are essential for automation.
  • Regular monitoring ensures the storage pool remains healthy and responsive.
  • Security measures like encryption and access controls are critical for protecting data.
  • Scalability is achieved by adding nodes and disks, but all must be integrated into the cluster.