2

Awhile ago, I answered a question on StackOverflow: (How to) remotely extend a partition using WMI. On my r5d instances I upgraded to in January, this script stopped working. Recently I tracked down the root cause to the fact the PowerShell Get-Disk cmdlet in the Storage module does not actually return EC2 disks (at least for my r5d instances).

This is BIZARRE, and I have no idea if the vendor to blame is Microsoft for writing awful PowerShell cmdlets, or AWS for writing horrible EC2 device block mapping. For one, if you see the screenshot below, the Windows GUI Disk Management utility recognizes my recently resized EC2 Disk as Disk 1 (D: drive in below photo). However, Get-Disk does not - and never has on my new r5d instance.

In researching this further, Amazon Web Services documentation has some laughably complex script for Mapping Disks to Volumes on Your Windows Instances - Amazon Elastic Compute Cloud. - I can't even run this script without setting up Initialize-AWSDefaults using an AWS account with IAM role for this machine, despite being able to remote into the box and see Disk 1. I haven't even tried this, and frankly don't want to, because it seriously complicated my fairly elegant solution to the aforementioned StackOverflow question: How to remotely extend a partition using WMI.

Separate to all this, it seems like the problem is PROBABLY on the Amazon side, since, despite modifying the volume and it presenting as having 200 GB unallocated, issuing an "Extend Volume" command through the point-and-click Disk Management GUI raises the "There is not enough space available on the disk(s) to complete this operation" non-sense. In reading AWS documentation, I can't find anywhere where I can poll to know when it is safe to actually point-and-click to "Extend Volume".

I'm hoping I'm not the only intrepid soul trying to automate Windows Server deployments on AWS, and if my kindred spirit is out there, please answer - and let me buy you a beer.

Disk Management utility after Modify Volume to Add Storage

1

0

You must log in to answer this question.

Browse other questions tagged .