Showing posts with label microsoft storage spaces. Show all posts
Showing posts with label microsoft storage spaces. Show all posts

Tuesday, April 28, 2026

StorageSpaces replace a drive using the serial number

Backup Your Data (Crucial!): Before anything else, ensure you have a current backup of your data, as drive failures can be unpredictable

Identify the Failing Disk: Use the Storage Spaces Management tool (or PowerShell) to identify the specific physical disk that is unhealthy.  This will also show up in the Physical Disks Section in storage on windows server.



If you can't or are unable to identify the disk in software, you may have to if possible shut the system down and find the drive.  Mark and label the drives that need to be replaced; you can do that by finding the serial number of the drive that failed as down below.

Use the following command to get the status of your storage spaces; note any drives that are failing by serial number.

Get-StoragePool -FriendlyName "Data" | Get-PhysicalDisk


We can get the serial numbers of the disks we want to replace we can't use the FriendlyName due to both disks having the same friendly name.  The disks we want to replace are

Disk 1 - W381A7X4

Disk 2 - W391A8Z8

Get-PhysicalDisk -SerialNumber $SERIALNUMBER 


So we need to set the disk as retired; to do that we are going to use the following powershell command.
$DiskToRemove = Get-PhysicalDisk | Where-Object { $_.SerialNumber -like '*OldSerialNumber*' } | Set-PhysicalDisk -Usage Retired

As shown below 

$DiskToRemove = Get-PhysicalDisk | Where-Object { $_.SerialNumber -like '*W391A8Z8*' } | Set-PhysicalDisk -Usage Retired


Storage spaces will automatically move data off the drive. Use the command

Get-StorageJob

to get the progress of the job.  This shouldn't take very long, once finished remove the bad/retired drive and replace with the new one.


In windows add a new disk


It will find the disk you put in while the disk you removed will still show in your lists of disks until we remove it in software.


After the new disk has been added; select the old disk and remove it.



Once the disk is removed windows will begin repairing the storage spaces array


If you use the Get-PhyscialDisk command in powershell it will show the newly added drives


When Storage Spaces has completed it's rebuild there will be no job running, to check that you can use the command Get-StorageJob to get the status.


When completed everything will show up fine and as repaired.

Friday, September 12, 2025

Replacing a drive and repairing a storage spaces volume

When you have a drive fail in a storage spaces, changing out the drive isn't straight forward, however well worth the effort when you consider the advantages storage spaces has over regular RAID.  Specifically the lack of a an expensive disk controller, and tiered spaces with the use of HDDs and SSDs.


So in my case it is a 2U server with a RAID Controller set to JOBD, and I had a failure of a Seagate drive as shown in the picture above.  On the server we removed the bad physical drive, if on a raid controller prepare the drive, should be set to JOBD.  Formatting may be required.  As shown in image below, I added a Toshiba drive; and to replace it we need to the the following.


PS C:\> $PDToRemove = Get-PhysicalDisk -FriendlyName "$DISKNAME" 

In this case the drive's friendly name is "SEAGATE ST600MP0006" then we need to remove the disk with the following Powershell statement.

PS C:\> Remove-PhysicalDisk -PhysicalDisks $PDToRemove -StoragePoolFriendlyName "$PoolName"

(in this case SEAGATE ST600MP0006)


Once the old disk is removed we can run a repair with the following powershell statement

PS C:\>Repair-VirtualDisk -FriendlyName "$VIRTALDISK"


This will take some time to run, but it is much faster then repairing a RAID setup, taking about 20 minutes to repair the storage spaces mirror setup.  While the dive is being repaired you will see it in a InService status.


When storage spaces finishes the drive will show as being in good health.



Fix a windows network printer that is offline

How to fix a network printer that get's installed and shows offline. By default SNMP is set to public, so when you are installing a netw...