Regular IT guy

Just a guy – talking about technology … in an uncomplicated way.

Menu
  • Contact
  • Speaking
Menu

Re-Attach Virtual Disks automatically from StoragePools

Posted on October 21, 2013 by Rick
Share on Social Media
twitter facebook linkedin email

I’ve been rebuilding some of my lab and demo machines running WS2012 R2 preview with RTM bits. As they are Cluster-In-A-Box systems, they have shared disk between them and an already configured Storage Pool. Once I did a clean install one node of the CiB with Windows Server 2012 R2 RTM bits – it sees the old storage pool disks and recognizes there is a storage pool available on the disks. I want to preserve the Storage Pool and its data, so it’s really an Import Storage Pool action I am looking to accomplish.

I found these steps from Martin Lucas on the AskPFE blog. (How to import a StoragePool)

  1. Make the physical disks available to the server (I’ve already done that).
  2. Right click the Storage Pool and choose Set Read-Write Access. Choose the server you want to enable Read-Write access.
  3. Attach the Virtual disks back. Each disk has to be selected and re-attached.
  4. Online the Volume (logical disk) to get it operational once again.

This works great, until you restart your system – at which time it recognizes the Storage Pool, but the Virtual Disks are not re-attached automatically. You can do this with a little PowerShell, since the GUI does not have the option to modify the “IsManualAttach” property.

Open your administrative level PowerShell prompt and type in the following.

Get-VirtualDisk | Where-Object {$_.IsManualAttach –eq $True}

IsManualAttach

This lists off your virtual disks where the IsManualAttach property is turned on and the disks will not auto-reattach on restart. You can see I have four of them for this demo box I use.

Now run the line again but include the following:

Get-VirtualDisk | Where-Object {$_.IsManualAttach –eq $True} | Set-VirtualDisk –IsManualAttach $False

There won’t be any output, since you are piping the results into the Set-VirtualDisk command which will modify the IsManualAttach property to false.

Voila!

My Imported StorageSpace will now re-attach my drives correctly, even on restart!

Share on Social Media
twitter facebook linkedin email

2 thoughts on “Re-Attach Virtual Disks automatically from StoragePools”

  1. karl says:
    February 13, 2014 at 10:20

    Thank you very much. It worked like a charm.
    I was thinking my disks are defect but only this small setting was wrong.

  2. Eugen says:
    March 20, 2015 at 12:12

    Thanks!

    If I may impose on you further, I have this situation:

    A micro ITX home server with 6 sata ports, all filled with one 120GB Intel boot ssd and five 3TB Seagate drives. One of the hard drives needs replacing, it developed bad sectors but it still works.

    So, I have a 13.6TB storage pool and on it I have two thin provisioned, parity virtual disks, one 2TB (758GB allocated, 1.011TB used) and another 8TB (3.46TB allocated, 4.62TB used).

    My problem is this, when I try to remove one of the 3TB drives it tells me to add another before I take this one out. Obviously I can’t do that because all the SATA ports are filled and I don’t want to buy another one, I want to send this one to get replaced under warranty.

    By my math, the storage pool has more than enough free space to take out one drive and redistribute the data to the other drives, but it doesn’t wan to do that for some reason.

    All I can think is Windows counts all 10TB as being full, never mind that the drives are thin provisioned.

    I also can’t decrease the 8TB virtual disk size.

    So, I’m left scratching my head .. 🙁

    Thanks for reading!

Comments are closed.

Follow me on Social Media
twitter facebook youtube linkedin

Recent Posts

  • Moved over to Dreamhost
  • Microsoft Azure HPC goodness
  • Whats new in Azure VM Images
  • Whats New in Azure Managed Disks
  • What up with Azure File Sync

Recent Comments

  1. Farhan Sattar on New Year, New Responsibilities
  2. Frederi on Tuesdays with Corey: Seasons Greetings and Until Next Year!
  3. Leon Han on HowTo: Bootable USB Stick for OS Install
  4. Frederi on Tuesdays with Corey: Seasons Greetings and Until Next Year!
  5. Rick Claus [rclaus@MSFT] on Tuesdays with Corey: Seasons Greetings and Until Next Year!

Archives

  • January 2023
  • March 2019
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • March 2014
  • February 2014
  • December 2013
  • October 2013
  • August 2013
  • July 2013
  • March 2013
  • February 2013
  • December 2012
  • November 2012
  • September 2012
  • August 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • June 2011
  • May 2011

Categories

  • Azure
  • Azure 4 ServerHuggers
  • Azure IT Pro News Roundup
  • CH9 Videos
  • CloudOpsAdvocacy
  • Comments
  • Community
  • Debunking Azure Myths
  • Events
  • Helpful Tech
  • How To
  • interviews
  • Microsoft
  • Networking
  • PatchAndSwitch
  • Personal
  • Presentations
  • Security
  • Server
  • TechEd
  • Troubleshooting
  • Tuesdays with Corey
  • Uncategorized
  • Windows 8
  • Windows Server 8
  • Workarounds

©2023 Regular IT guy