6

At some point in the past, Storage Space on a Windows Server 2012 box decided to "Retire" two drives in the pool:

enter image description here

I don't want the drives to be retired. I want you to keep using them.

How do i change a drive's status from Retired to AutoSelect?

Something along the lines of:

#Assign the "retired" disks to a variable $retiredDisks = Get-PhysicalDisk | Where-Object { $_.Usage -eq 'Retired'} #Mark the retired disks as "AutoSelect" $retiredDisks | Set-PhysicalDisk -Usage AutoSelect 

Bonus Reading

2 Answers 2

2

Maybe this could help:

>Set-PhysicalDisk -FriendlyName drive_name -Usage AutoSelect 

A detail link for ref: http://powershellhelp.space/commands/set-physicaldisk-psv5.php

2
  • come on, some important parts could be imported into this answer, for moment its nearly a link only answer - remind, you could start here with the first ten points ;-) Commented Apr 23, 2023 at 9:44
  • A point for most of the right answer! Commented May 8, 2023 at 16:58
1

My answer is probably not the correct one - as it reflects my experiences in a slightly newer 2016/2019 environment. But I'll give it a try.

Before we get much farther, I would not recommend using friendly names as a disk identifier, especially if you are dealing with some vendor's drives cough HP cough that tend to give the model number of the drive as the friendly name. I would suggest using the serial number of the drive instead, as it has a high probability of being unique (although I'm sure there is that miniscule chance that 2 or more vendors have serials that match up).

Now that we have a somewhat-unique identity to work with, we can use it with a firm grip to extract just the drive(s) we want:

Get-PhysicalDisk |? Usage -Like Retired

...which should yield a list of drives to target. I know I'm not giving this as a single step, because I'm trying to introduce some process into this procedure, namely verification of the target drives before poking the storage pool's brain with our fingers. Doing a separate step helps us (the humans that can and do make mistakes) to pinpoint the exact serial(s) we want to target, while avoiding problems, such as nuking your entire drive set because of a wildcard match for multiple devices.

Moving along, we can then lift the serial and use it to work on the drive specifically. Simply hit the up arrow on the keyboard to get the same line back, and change it into this wordy one-liner (obviously substituting DriveSerialNumberGoesHere with the target serial):

Get-PhysicalDisk |? Serial -Like DriveSerialNumberGoesHere | Set-PhysicalDisk -Usage AutoSelect -Verbose

But this brings up a point to think about. Why was the drive retired to begin with? If it was an "oopsie" that simply toggled the flag to "Retired" then yes, this will ... probably ... return it to service. But if the drive retired due to age, malfunction, comms errors, etc. then you should consider the possibility of replacement.

1
  • i made that oopsie just today follwing a documentation by a renowed source, but one that definitely isn't an admin. if they wanna show how to retire a dead drive they should say -Like dead drive and not -Unlike OK... (as 'in maintenance' also is unlike ok. That kinda people... bad, but my bad i didn't catch it!) Commented May 15, 2024 at 23:05

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.