Increase EC2 Volume without Changing Public IP

688 views Asked by At

My Instance Disc Space is about to fill up .

1) If I increase the volume it requires stop/start of instance . If I Stop/Start the instance . My Public IP will change .

2.) I don't have Elastic IP applied to it .If i associate a new Elastic IP . My Public IP will change to the Elastic IP.

So basically I want to increase My Disc Space Without changing my Public IP of the Instance.

2

There are 2 answers

4
E.J. Brennan On

Easiest thing to do is to add a second/new EBS volume to your existing/running EC2 instance, then you can either move some of the stuff that does not need to be on the primary volume to the second volume, or else if possible redirect the new data coming in to the newly added volume.

Not knowing what is filling up your disk, I don't know which is a better option, or if either is an option for you.

EDIT: In response to comment then I would still recommend that you add a new volume to the server, and then move your MongoDB database to that volume.

Changing MongoDB data store directory

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-add-volume-to-instance.html

0
X-Men On

Now you have an option to change the volume of your Instance on the fly.With Elastic Volumes (EBS), you can dynamically modify the size, performance, and volume type of your Amazon EBS volumes without detaching them.

[1] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/requesting-ebs-volume-modifications.html#modify-ebs-volume

Once you do that make sure to increase the volume from within the OS, using diskmgmt.msc (Windows)

[2] https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/recognize-expanded-volume-windows.html