From Windows Server 2012 to 2012 R2: A storage pool nightmare

Earlier this year, I decided to give me ageing HP MediaSmart EX470 some extra life by installing Windows Server 2012 Essentials in it — a process that I documented in this post of WeGotServed.com.

Now that Microsoft release windows Server 2012 R2 Essentials, I decided to do the upgrade, thinking that it would be a simple and streamlined process. Boy, was I wrong. Besides some issues with the setup of the new OS, I had to crack my head with a storage pool that was refusing to play ball, while Windows was returning little to no information to help me troubleshoot the problem. I was about to wipe the disks until I decided to have another go and I fixed the problem. I hope this post will help those out there with the same or similar issue.

The Setup: No upgrade for you!

My first course of action was to run the Windows Sever 2012 R2 Essentials setup from my existing Windows Server 2012 installation. Only to be told by the setup that it Windows Server Essentials does NOT support upgrading from 2012 to 2012 R2. This means that I will have to reinstall and reconfigure everything on my server. Honestly, I am not impressed. Particularly when we consider the fact that Windows Server Essentials is supposed to be an easy, no fuss and no frills edition of Windows for those with simple needs.

Anyway, so I had to proceed with a clean install, and I left the setup running on its own. Now, bear in mind this is a headless server, so I ran the setup through a remove desktop session and went off to do other errands. When I came back I noticed that the server was unresponsive. I couldn’t find this server on the network, so clearly something happened during the setup that required user intervention. I had to take the server down, open it up, install the VGA cable and boot it again to see what happened. Basically, the setup stopped on a screen asking for the regional settings. To my surprise, trying to use the keyboard to move around the options didn’t work. I had to plug in a mouse and then click on a control. Only then I could start using the keyboard to navigate around the interface.

So the setup went through, and after a few reboots to configure the Windows Server 2012 R2 Essentials, I proceeded to try to restore the storage pool I had in the previous install.

Storage Pools: Computer says no

So my next step was to restore the storage pool I had fro my previous Windows Server 2012 Essentials into R2. What I thought should be a simple process ended being a stressful and annoying chore. I have three 500GB disks on this server. One is the OS/System disk, and the two others are a mirror I’ve set-up using Storage Pool. Although I could see all three disks on Device Manager, the two disks of the store pool couldn’t be accessed anywhere. There weren’t visible under Disk Management, and the Storage Spaces applet in the Control Panel wasn’t helping either. All it did was to display a blue “i” icon next to the storage, saying that it was in read-only mode because of “user action” (sure, blame me!). After searching for the issue on Google, I read on the TechNet forums that I had to execute the following command, on PowerShell:

Get-Storagepool <name of Storage Pool> | Set-Storagepool -IsReadonly $false

Run PowerShell as administrator: When I say you must run PowerShell as an administrator, I mean beyond the fact you must be logged in as an user of the local administrators group. You also MUST right-click on the PowerShell icon and choose the option to run it as an administrator, which means you will run PS with an elevated access. Failing to do, you will not have access to run these commands to restore the storage pool.

Make sure you replace the string “<name of Storage Pool>” from the commands specified in this post with the friendly name of your storage pool. Same goes for the name of your virtual disk.

After successfully running this command, I noticed that the I could now select the storage pool in the Storage Spaces applet in the Control Panel, but I couldn’t do much else. I still had a blue “i” icon now saying that the storage pool was “inaccessible by user action”. No further information explaining why. Server managed was of little help as well. So I stumble at another command I had to run in PowerShell in order to update the storage pool to the latest version:

Update-StoragePool -FriendlyName <name of Storage Pool>

This command is supposed to to enable the tiering and Write-back cache capability, but it didn’t solve my problem. I still couldn’t access the storage pool, and the diskpart command wasn’t of any help either. I was about to give up when I came across another PowerShell command, which saved the day:

Connect-VirtualDisk -FriendlyName <name of Virtual Disk>

Bingo! As soon as I ran this command, the storage pool appeared in my explorer as the D: drive, with all my previous data intact. Unfortunately I spent almost three hours to do a task which is supposed to be easy, and I blame it on lack of documentation.

Update: Four days latter, I found out that every time I restarted the server, the storage pool would be offline once again and I would have to run Connect-VirtualDisk every time I wish to bring the storage pool online.

After a little more research, I discovered the following command I had to run to circumvent this issue:

Set-VirtualDisk -FriendlyName <name of Virtual Disk> -IsManualAttach $False

With this final command, I managed to sort my storage pool issues once an for all.


8 Comments

  • Thank you so much. This saved my data. The only thing is that I had to reboot before it allowed me to connect the virtual disk.

  • Thanks for the commands

  • Fantastic posts but there needs to be a slight edit above

    "Connect-VirtualDisk -FriendlyName <name of Storage Pool>"

    it's not the name of the storage pool, although Ithink that porbably worked for you if the names happen to match.

    IT's the name of the virtual disk which sits int he storage pool.
    you can get that from the commandlet:
    get-virtualdisk

    Then use the commands you listed above to set it non manual attach mode.

    It is suggested on another thread: http://social.technet.microsoft.com/Forums/window
    that it's designed to prevent you mounting read write a volume created on another machine.

    I think the Windows upgrade to R2 is following the same logic.

    • Duh! You're absolute right. Thanks for pointing that up. I fixed the mistake. Cheers, P.

  • Thanks Pedro – that fixed it for me.

    Much appreciated!

    Steve

  • Thank you! That saved my day! I created a RAID-1 storagepool with Bitlocker on a Windows 8 machine (with a separate boot SSD) and found out – after a few hours – that Win8 wasn't made for me. Installed Server 2012 R2 Essentials over it and had the exact same issues as described here.

    Thanks!

  • Fantastic article.. Gives me some assurance knowing my storage spaces config and data will be intact.

  • This is awesome! I migrated a storage space from R2 to another R2 installation and every time my system would reboot I would have to reattach the volume. Your command seems to have fixed it. I had a little heart attack when, while the system was setting the volume to auto-attach, it said it was unformatted for a moment. Thanks!

Leave a comment