Windows Server How-To
What To Do When Windows Identifies Disks Incorrectly
When Microsoft prepared to release the first preview of Windows Server 2012 R2, I couldn't wait to set it up and try out all of the new features. I was especially curious about the new tiered storage feature.
In case you aren't familiar with the tiered storage feature, it is an addition to Windows Storage Spaces that allows a virtual hard disk to span traditional and solid-state storage. The advantage to doing so is that Windows can dynamically move frequently accessed files to the fast (SSD) storage tier so that those files can be read at the highest possible speed.
Unfortunately, if I wanted to try out all of the new Windows Server 2012 R2 features (including the Hyper-V features) then installing the new operating system into a virtual machine wasn't going to be an option. I had to install to physical hardware. That being the case, I retrieved from storage a server that was a few years old (but not severely outdated by any means), and installed a couple of solid-state drives into it. That's when things got interesting.
In order for you to be able to use tiered storage, the Windows operating system has to be able to differentiate between HDDs and SSDs. If you look at Figure 1 for example, you can see that Server Manager actually lists the media type.
The problem that I ran into was that all of my drives were listed as HDDs when in reality the server contained a mixture of HDDs and SSDs. So what to do?
After digging into the problem a bit, I realized that the server's age was the problem. The server's BIOS was unable to tell the difference between HDD and SSD storage, so Windows wasn't able to tell the difference either. Not really knowing how to resolve the problem (and being up against a deadline) I did the only thing that I knew to do. I bought a new server.
Needless to say, that was an expensive and inconvenient thing to do. Thankfully, there is another way to deal with this problem. Last week I was in Redmond for training and learned that Microsoft has created some PowerShell commands that can be used to manually define the media type. These commands were originally intended for lab use. The idea was that it would be possible to experiment with tiered storage even on a system that did not include any SSDs because you could simply trick Windows into thinking that an HDD was actually an SSD.
Obviously that type of usage is not supported in a production environment. But what if you were to encounter a situation like I did, in which Windows is unable to tell the difference between an HDD and an SSD? You could conceivably use this command to set the operating system straight.
To show you how this works, let's start out by running the following PowerShell command:
Get-PhysicalDisk | Select-Object FriendlyName, MediaType, Size
If you look at Figure 2, you can see that each disk has a friendly name and a media type. In this particular system, there are two SSDs and five HDDs. For the sake of demonstration however, let's pretend that PhysicalDisk6 was actually an SSD that had been mistakenly identified as an HDD. To correct this situation, I could use the following command:
Set-PhysicalDisk –FriendlyName PhysicalDisk6 -MediaType SSD
It is worth noting that this command will only work if the physical disk is a member of a storage pool. If you look at Figure 3, you can see that Windows now thinks that PhysicalDisk6 is an SSD.
Obviously, it would be unsupported (and counterproductive) to lie to Windows about disk types in a production environment. However, the technique that I have just shared can be extremely useful for lab environments or for dealing with incorrectly identified hard disks in production environments. Just take care to identify disks correctly and use this command at your own risk.
Brien Posey is a 19-time Microsoft MVP with decades of IT experience. As a freelance writer, Posey has written thousands of articles and contributed to several dozen books on a wide variety of IT topics. Prior to going freelance, Posey was a CIO for a national chain of hospitals and health care facilities. He has also served as a network administrator for some of the country's largest insurance companies and for the Department of Defense at Fort Knox. In addition to his continued work in IT, Posey has spent the last several years actively training as a commercial scientist-astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space. You can follow his spaceflight training on his Web site.