Step By Step: How To Replace Faulty Disk In Two-Way Mirrored Storage Tiered Space? #StorageSpaces #WS2012R2

Hello Folks,

As you know that Physical disks often experience errors of varying severity, from errors that the disk can transparently recover from, without interruption or data loss; to errors that are catastrophic and can cause data loss such as bad sectors…

In this blog post, I will walkthrough my experience on how Storage Spaces responds to a faulty disk in Two-way Mirrored Storage Tiered Space, and how you can replace the disk without interruption or data loss.

My Hyper-V server was happily running until I received the status e-mail below!

Good morning Mr. Hyper-V, you have a Hard Disk failure! imageimage

Before I start with the procedure to replace the disk and repair my degraded Storage Space, I will give you an overview of the system.

I am running Hyper-V server on PhysicalDisk0 as Raid 1, and I am leveraging Two-way mirrored Storage Tiered Space for my Virtual Machines (4XHDD @ 1.2TB and 2XSSD @ 200GB).

If you want a quick overview on how to optimize Storage Tiered Spaces, make sure to check my previous blog post here.

How Storage Spaces Responds To a Faulty Disk?

Let’s open Server Manager and have a look.

In the Storage Pools tile of the File and Storage Services role in Server Manager, health status that requires attention is identified as illustrated below, a Yellow triangle with an exclamation mark!

StorageSpaces-DiskRepl01

You can use the following PowerShell cmdlets to identify the physical disk associated with the I/O error:

PS C:\>Get-PhysicalDisk |? { $_.ObjectId.Contains( $PhysicalDiskGUID ); }

StorageSpaces-DiskRepl02

PS C:\>Get-PhysicalDisk –friendlyName PhysicalDisk-1

StorageSpaces-DiskRepl03

Event Viewer is showing an error with Physical Disk 1.

StorageSpaces-DiskRepl04

You can use the following PowerShell cmdlet to get the physical disk Event Log:

PS C:\>Get-EventLog -LogName System -Source Disk

StorageSpaces-DiskRepl06

PS C:\>Get-Volume D | FT -AutoSize
PS C:\>Get-Volume D | Get-Partition | Get-Disk | Get-VirtualDisk | FT -AutoSize
PS C:\>Get-Volume D | Get-Partition | Get-Disk | Get-VirtualDisk | Get-StoragePool | FT -AutoSize
PS C:\>Get-Volume D | Get-Partition | Get-Disk | Get-VirtualDisk | Get-PhysicalDisk | FT –AutoSize

StorageSpaces-DiskRepl09

As you can see, the Storage Spaces sustained the failure of a single disk in a two-way mirrored space. The Volume is healthy, but the virtual disk and pool are in degraded state. (A two-way mirror will allow you to suffer the loss of a single disk with no problems while a three-way mirror will allow you to lose two disks).

How To Replace The Faulty Disk Without Interruption?

Now before I start with the replacement, I want to mention that I am using an old HP server that is not fully supported by Microsoft Storage Spaces. You may want to skip this step if you are using a certified Hardware/JBOD that is listed under Storage Spaces in the Windows Server Catalog.

For this reason, I need to open the Smart Array controller and delete the faulty logical disk drive, and then add a new one.StorageSpaces-DiskRepl10

StorageSpaces-DiskRepl11

Here is an important step, you need to create the new logical drive as RAID0 since Storage Spaces will not automatically detect the new drive.

StorageSpaces-DiskRepl12

Next, we need initialize the disk and add it to the Storage Pool.

You do not need to create a partition or format the new disk, leave it as unallocated.

PS C:\>Get-Disk
PS C:\>Get-Disk -Number 7 | Initialize-Disk -PartitionStyle GPT

StorageSpaces-DiskRepl13

PS C:\>Add-PhysicalDisk –StoragePoolFriendlyName StorageTieredPool1 -PhysicalDisks (Get-PhysicalDisk –CanPool $True)
PS C:\>Repair-VirtualDisk MirroredTieredSpace1

StorageSpaces-DiskRepl14

So after we added the new disk to the pool and we ran Repair-VirtualDisk cmdlet. The data will be rebalanced to the new disk (takes a while, in my case it took 2 hours to repair 1.2TB disk).

StorageSpaces-DiskRepl16

The old disk can either be retired or it can be completely removed from the pool.

PS C:\>Get-PhysicalDisk | ? OperationalStatus –eq “Lost Communication” | Set-PhysicalDisk –Usage Retired
PS C:\>Remove-PhysicalDisk -StoragePoolFriendlyName StorageTieredPool1 -PhysicalDisks (Get-PhysicalDisk | ? OperationalStatus -eq “Lost Communication” )

StorageSpaces-DiskRepl17

And here you go… Healthy Storage Space without interruption or data loss Smile

StorageSpaces-DiskRepl18

My wish list for the vNext release of Windows Server is to have auto-repair for the Virtual Disks as soon as you add a new disk to the Storage Pool.

Did you experience any issue with Storage Spaces after single HDD/SSD failure? please add a comment to this blog post and share your experiences.

Hope this helps,

Until then… N’joy!
/Charbel

About Charbel Nemnom 323 Articles

Charbel Nemnom is a Microsoft Cloud Consultant and Technical Evangelist, totally fan of the latest’s IT platform solutions, accomplished hands-on technical professional with over 15 years of broad IT Infrastructure experience serving on and guiding technical teams to optimize performance of mission-critical enterprise systems. Excellent communicator adept at identifying business needs and bridging the gap between functional groups and technology to foster targeted and innovative IT project development. Well respected by peers through demonstrating passion for technology and performance improvement. Extensive practical knowledge of complex systems builds, network design and virtualization.

Be the first to comment

Leave a Reply