Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add instance storage to an existing Windows EC2 instance?

Tags:

amazon-ec2

I have a Windows 2008 EC2 instance to which I have done some customizing on the EBS boot drive.

I started the instance as m1.small (or m1.large) and the instance storage does not appear as an additional drive.

I've read that the -b switch in the ec2-run-instances command allows you to create mappings for the ephymeral instance storage. The ec2-run-instances command creates a new instance, however, in my case, the instance already exists and therefore I start it as ec2-start-instances, which does not have a -b switch for ephymeral instance storage.

Is there any way I can get to the ephymeral instance storage that comes with an m1.small instance for my existing EBS-booted instance?

UPDATE: It seems that nowadays (Feb 2015) Windows machines mount ephymeral instance storage in the Z: drive.

like image 939
Pep Avatar asked May 18 '12 14:05

Pep


2 Answers

I'm afraid this functionality isn't available (yet) for Amazon EC2, but it's a very good question in fact - the common answer used to refer to the explicated launch time requirement, see e.g. ec2-modify-instance-attribute:

Note

If you want to add ephemeral storage to an Amazon EBS-backed instance, you must add the ephemeral storage at the time you launch the instance. For more information, go to Overriding the AMI's Block Device Mapping in the Amazon Elastic Compute Cloud User Guide, or to Adding A Default Instance Store in the Amazon Elastic Compute Cloud User Guide. [emphasis mine]

That hasn't been that much of an issue in the past, but given the recent introduction of 64-bit ubiquity implies a significant improvement of vertical scaling versatility (see EC2 Updates: New Medium Instance, 64-bit Ubiquity, SSH Client), this is suddenly a topic indeed - your question yields even more questions in turn:

  • What happens for the converse case, i.e. when I start a sufficiently large instance with lots of ephemeral storage and scale it down (and possibly up again) thereafter?
  • In case the initial block device mapping is retained somehow, should we always start with a large instance therefore? (I actually doubt that this is the case though.)

This question can only be addressed by the AWS team I guess, so you may want to file a support request or relay the question to the Amazon Elastic Compute Cloud forum at least.

like image 164
Steffen Opel Avatar answered Oct 20 '22 19:10

Steffen Opel


I think what you're asking (but correct me if I'm wrong) is "how do I add additional storage to an EC2 instance?".

In which case, the answer is:

Select the Volumes panel in the AWS console and create a new volume of the size you want, making sure it's in the same Availability Zone as the instance you want to attach it to. Then select that new Volume, and click 'Attach' - select the instance you want to attach it to, and click OK.

Now log-on to the instance, and in Computer Management select the Disk Management plugin, format the new unassigned partition, and give it whatever drive letter you wish. It will then show up in Explorer as a standard Windows drive.

like image 25
Eight-Bit Guru Avatar answered Oct 20 '22 18:10

Eight-Bit Guru