Tag: disks

Windows Server 2012 R2 Storage Spaces

What’s new in Windows Server 2012 R2 Storage Spaces

Microsoft announced the next version of the Windows Server platform called Windows Server 2012 R2 at TechEd North America. I already blog about what’s new in Windows Server 2012 R2 Hyper-V. This post will focus about Windows Server 2012 R2 Storage Spaces.

Storages Spaces

First there are new exciting new features in Windows Server 2012 R2 Storage Spaces. Microsoft first released there Software Defined Storage solution called Storage Spaces in Windows Server 2012 and this allows you basically to build your own storage solution based on a simple JBOD hardware solution. Storage spaces is a really cost-effective storage solution which allows companies to save up to 75% of storage costs in compare to traditional SAN storage. I also mention some standard features which are included in Windows Server 2012.

Pooling of disks – You can pool physical disks together and create multiple virtual disks on the storage pool even with different resiliency options.

Continuous availability – Storage Pools and Disks can be clustered with the Microsoft Failover Cluster so if one server goes down the virtual disks and file shares are still available.

SMB copy offload – Offloading copy actions to the storage.

Snapshots – Create Snapshots and  clone virtual disks on a storage pool.

Flexible resiliency options – In Windows Server 2012 you could create a Mirror Spaces with a two-way or three-way mirror, a Parity Space with a single parity and a Simple Space with no data resiliency. New in R2 parity spaces can now be used in clustered pools and there is also a new dual parity option. (enhanced in 2012 R2)

Enhanced Rebuilding – Speed of rebuilding of failed disks is enhanced. (enhanced in 2012 R2)

Storage Tiering – Windows Server 2012 R2 allows you to use different kind of disks and automatically moves “hot-data” from SAS disks to fast SSD storage. (new in 2012 R2)

Write-Back Cache – This feature allows data to be written to SSD first and moves later to the slower SAS tier. (new in 2012 R2)

Data Deduplication – Data Deduplication was already included in Windows Server 2012 but it is enhanced in Windows Server 2012 R2, and allows you to use it together with Cluster Shared Volumes (CSV) and supports VDI virtual machines. (enhanced in 2012 R2)

Management – Complete management solutions with Windows PowerShell, Failover Cluster, Server Manager or new in System Center 2012 R2 – Virtual Machine Manager. Now you can setup new Storage Servers, Storage Pools, Storage Spaces and File Shares directly from Virtual Machine Manager. (enhanced in 2012 R2)

ReFS – The filesystem Microsoft first released with Windows Server 2012 is now also supported for clustering, which means it can be used as a CSV (Clustered Shared Volume). Thanks to Didier Van Hoye (MVP) for adding that to the list


Replace Diskpart with Windows PowerShell – Basic Storage cmdlets

Windows Server 8

Last week I made a blog post about how you can create a USB drive for Windows To Go. In my post I used diskpart.exe to format the USB drive. Now we don’t live in the stone age anymore, so I did the same with the new version of Windows PowerShell coming in Windows 8 and Windows Server 8.

Now here some basic cmdlets to do some simple storage operations, like clean a disk, create a partition and so on.

Lets start simple

List all disks



Now get all partitions



Now get all partitions of disk 0

Get-Partition -DiskNumber 0


Clear a Disk

Get-Disk 1 | Clear-Disk -RemoveData


Create a new partition

New-Partition -DiskNumber 1 -UseMaximumSize


Format this volume

Get-Partition -DiskNumber 1 -PartitionNumber 1 | Format-Volume -FileSystem NTFS


Create new partition and format it with the label “USB”:

New-Partition -DiskNumber 1 -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel USB


Change driveletter

Set-Partition -DriveLetter E -NewDriveLetter T


Set a partition active

Set-Partition -DriveLetter T -IsActive $true


Remove a partition

Remove-Partition -DriveLetter T


Bring a disk online

 Set-Disk 1 -isOffline $false 

Remove Readonly flag

 Set-Disk 1 -isReadOnly $false

Initialize Disk with GPT

 Initialize-Disk 1 -PartitionStyle GPT

online disk

This is some basic knowledge about the storage module in PowerShell v3. Lets see how we can change the commands from using diskpart to Windows PowerShell.


select disk 1
create partition primary
format fs=ntfs quick
assign letter=e


Get-Disk 1 | Clear-Disk -RemoveData
New-Partition -DiskNumber 1 -UseMaximumSize -IsActive -DriveLetter E | Format-Volume -FileSystem NTFS -NewFileSystemLabel USB