How to Set Up Windows Server 2019 Volume Management
Volume management on Windows Server 2019 extends beyond basic disk partitioning to include dynamic disks, spanned volumes, striped volumes, mirrored volumes, and RAID-5 volumes, as well as Storage Spaces for software-defined storage. Volume management allows administrators to optimize performance, provide redundancy, and efficiently utilize available disk capacity. This guide covers dynamic disk volumes, Storage Spaces, and volume monitoring on Windows Server 2019.
Dynamic Disks and Volume Types
Dynamic disks support advanced volume types not available on basic disks. Before creating dynamic volumes, convert a disk from basic to dynamic (note: this is a one-way conversion without data loss, but reverting requires deleting all volumes):
# Convert a basic disk to dynamic
$disk = Get-Disk -Number 1
if ($disk.PartitionStyle -ne "RAW") {
Write-Warning "Disk $($disk.Number) must be initialized first"
}
# Using diskpart
diskpart
DISKPART> select disk 1
DISKPART> convert dynamic
# Create a striped volume (RAID-0) across disks 1 and 2
# Using diskpart
DISKPART> select disk 1
DISKPART> create volume stripe disk=1,2 size=100000
DISKPART> format fs=ntfs label="StripedVol" quick
DISKPART> assign letter=S
# Create a mirrored volume (RAID-1)
DISKPART> select disk 1
DISKPART> create volume mirror disk=1,2 size=100000
DISKPART> format fs=ntfs label="MirroredVol" quick
DISKPART> assign letter=M
Setting Up Storage Spaces
Storage Spaces is the recommended software-defined storage solution on Windows Server 2019, replacing traditional dynamic volumes for most use cases. Storage Spaces uses storage pools to aggregate physical disks and create virtual disks (spaces) with configurable resiliency:
# View available physical disks for pooling
Get-PhysicalDisk -CanPool $true | Select-Object FriendlyName, Size, BusType, MediaType
# Create a storage pool from available disks
$physDisks = Get-PhysicalDisk -CanPool $true
New-StoragePool -FriendlyName "DataPool01" `
-StorageSubSystemFriendlyName (Get-StorageSubSystem).FriendlyName `
-PhysicalDisks $physDisks
# Verify pool creation
Get-StoragePool | Select-Object FriendlyName, OperationalStatus, HealthStatus, Size, AllocatedSize
Creating Virtual Disks with Different Resiliency Levels
# Create a Two-Way Mirror virtual disk (requires 2+ disks, tolerates 1 disk failure)
New-VirtualDisk -StoragePoolFriendlyName "DataPool01" `
-FriendlyName "Mirror-Volume" `
-Size 500GB `
-ResiliencySettingName Mirror `
-NumberOfDataCopies 2 `
-ProvisioningType Fixed
# Create a Three-Way Mirror (requires 5+ disks, tolerates 2 disk failures)
New-VirtualDisk -StoragePoolFriendlyName "DataPool01" `
-FriendlyName "ThreeWayMirror" `
-Size 500GB `
-ResiliencySettingName Mirror `
-NumberOfDataCopies 3
# Create a Parity virtual disk (RAID-5 equivalent, requires 3+ disks)
New-VirtualDisk -StoragePoolFriendlyName "DataPool01" `
-FriendlyName "Parity-Volume" `
-Size 1TB `
-ResiliencySettingName Parity `
-NumberOfColumns 3
# Create a Simple (striped, no redundancy, maximum performance)
New-VirtualDisk -StoragePoolFriendlyName "DataPool01" `
-FriendlyName "Simple-Volume" `
-Size 200GB `
-ResiliencySettingName Simple
Initializing and Formatting Storage Spaces Volumes
# After creating the virtual disk, initialize and format it
$vdisk = Get-VirtualDisk -FriendlyName "Mirror-Volume"
$disk = $vdisk | Get-Disk
Initialize-Disk -Number $disk.Number -PartitionStyle GPT
New-Partition -DiskNumber $disk.Number -UseMaximumSize -AssignDriveLetter |
Format-Volume -FileSystem NTFS -NewFileSystemLabel "MirrorData" `
-AllocationUnitSize 65536 -Confirm:$false
Storage Tiering with SSDs and HDDs
# Create a tiered pool with SSD and HDD tiers
$ssdDisks = Get-PhysicalDisk | Where-Object { $_.MediaType -eq "SSD" -and $_.CanPool }
$hddDisks = Get-PhysicalDisk | Where-Object { $_.MediaType -eq "HDD" -and $_.CanPool }
$allDisks = $ssdDisks + $hddDisks
New-StoragePool -FriendlyName "TieredPool01" `
-StorageSubSystemFriendlyName (Get-StorageSubSystem).FriendlyName `
-PhysicalDisks $allDisks
# Create storage tiers
New-StorageTier -StoragePoolFriendlyName "TieredPool01" -FriendlyName "SSD-Tier" -MediaType SSD
New-StorageTier -StoragePoolFriendlyName "TieredPool01" -FriendlyName "HDD-Tier" -MediaType HDD
# Create a tiered virtual disk
$ssdTier = Get-StorageTier -FriendlyName "SSD-Tier"
$hddTier = Get-StorageTier -FriendlyName "HDD-Tier"
New-VirtualDisk -StoragePoolFriendlyName "TieredPool01" `
-FriendlyName "TieredVolume" `
-StorageTiers $ssdTier,$hddTier `
-StorageTierSizes 100GB,900GB `
-ResiliencySettingName Mirror `
-WriteCacheSize 10GB
Monitoring Volume Health
# Check health of all storage components
Get-StoragePool | Select-Object FriendlyName, HealthStatus, OperationalStatus
Get-VirtualDisk | Select-Object FriendlyName, HealthStatus, OperationalStatus, DetachedReason
Get-PhysicalDisk | Select-Object FriendlyName, HealthStatus, OperationalStatus, Usage, Size
# Check for volume errors
Get-Volume | Where-Object { $_.HealthStatus -ne "Healthy" } |
Select-Object DriveLetter, FileSystemLabel, HealthStatus, OperationalStatus
# Repair a degraded Storage Space
$vdisk = Get-VirtualDisk | Where-Object { $_.HealthStatus -ne "Healthy" }
$vdisk | Repair-VirtualDisk -Verbose
# Check Storage Spaces repair job status
Get-StorageJob | Select-Object Name, IsBackgroundTask, PercentComplete, JobState
Expanding and Managing Pool Capacity
# Add a new physical disk to an existing pool
$newDisk = Get-PhysicalDisk -CanPool $true | Select-Object -First 1
Add-PhysicalDisk -StoragePoolFriendlyName "DataPool01" -PhysicalDisks $newDisk
# Expand a virtual disk to use new capacity
$vdisk = Get-VirtualDisk -FriendlyName "Mirror-Volume"
Resize-VirtualDisk -FriendlyName "Mirror-Volume" -Size ($vdisk.Size + 200GB)
# Extend the corresponding partition after expanding the virtual disk
$disk = Get-VirtualDisk -FriendlyName "Mirror-Volume" | Get-Disk
$partition = Get-Partition -DiskNumber $disk.Number | Where-Object { $_.Type -eq "Basic" }
$maxSize = ($partition | Get-PartitionSupportedSize).SizeMax
Resize-Partition -DiskNumber $disk.Number -PartitionNumber $partition.PartitionNumber -Size $maxSize
Storage Spaces on Windows Server 2019 integrates with Storage Replica for synchronous or asynchronous replication to remote servers, and with Storage QoS for IOPS throttling of virtual machines in Hyper-V environments. Document your storage pool configuration including the number and types of disks, resiliency settings, and tier sizes for disaster recovery planning purposes.