Cant Modify or Resize Amazon EBS Volume - amazon-web-services

Cant Modify or Resize Amazon EBS Volume. In us-east-1d N. Virginia. The instance it's connected to is t2.medium CentOS 7.
Any help would be appreciated.

Update: the answer below was correct when written, but was subsequently superceded by this announcement on June 28, 2018:
Starting today, Elastic Volumes extends support to Amazon Elastic Block Store (EBS) magnetic (standard) volume type. You can now dynamically increase capacity or change the type of magnetic (standard) volumes with no downtime or performance impact using a simple API call or a few console clicks.
https://aws.amazon.com/about-aws/whats-new/2018/06/amazon-ebs-extends-elastic-volumes-to-support-ebs-magnetic--standard--volume-type/
The issue that originally triggered this question should no longer occur.
In the screen shot, the volume type shows standard.
That's a previous generation magnetic volume.
The previous generation Magnetic volume type is not supported by the volume modification methods [...]
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/limitations.html
Those can't be resized, so the option is grayed out. Your new instance from the AMI probably has a gp2 SSD volume, which does support resize.

Stop the instance that the EBS volume is attached to.
Then the modify option should be available for use.
If that doesn't work then try detaching the volume.
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html

As #michael-sqlbot says, you are using magnetic "standard" EBS volume, you can convert to ssd "gp2" volume following these steps:
Create snapshot of your EBS volume
Create new PIOPS/General Purpose SSD volume from your EBS
snapshot
Detaching existing attached magnetic volume from the
instance
Attach new PIOPS/General Purpose SSD volume
More info: https://n2ws.com/blog/how-to-guides/how-to-change-your-ebs-volume-type

Related

Amazon EC2 ebs vs gp2 ami

It's probably a silly question, but I can't understand the difference between these 2 amazon linux 2 amis:
ami-7105540e amzn2-ami-hvm-2.0.20180622.1-x86_64-ebs
ami-b70554c8 amzn2-ami-hvm-2.0.20180622.1-x86_64-gp2
Judging by this article, isn't gp2 just another ebs instance type?
The question isn't silly at all. In fact AWS's lack of documentation explaining the actual difference between the two is a bit surprising
TLDR;
If you're planning on switching to a faster SSD root volume at some point in the future but want to use Magnetic for now it would be better to use the gp2 version of the AMI and then change the root volume to SSD sometime later
Some more Explanation
ami-b70554c8 amzn2-ami-hvm-2.0.20180622.1-x86_64-gp2 - The recommended root volume type is General Purpose SSD (gp2)
ami-7105540e amzn2-ami-hvm-2.0.20180622.1-x86_64-ebs - The recommended root volume type is Magnetic
However this isn't set in stone so you can still interchange between them (I've used the gp2 version with a Magnetic storage in the past without any issues)
I couldn't find any official documentation as to the actual difference between the two AMI versions but the gp2 version most likely has SSD related optimizations added already to the OS
So if you envision switching to SSD at some point in future but want to start with a Magnetic volume it might be better to just use the gp2 optimized AMI right from the start. It probably has some optimizations not relevant to Magnetic volumes but it might be more future proof in case you want to have a faster root volume later
The took the AMI in two types of Volumes.
amzn2-ami-hvm-2.0.20180622.1-x86_64-ebs - ami-7105540e. This has Magnetic Volume type for its root volume.
ami-b70554c8 amzn2-ami-hvm-2.0.20180622.1-x86_64-gp2. This has SSD Volume type for its root volume.
How can we identify this?
Go to EC2.
Launch Instance
Select the mentioned AMI
Select any instance Type.
Choose the VPC, subnet and etc.
Next it'll show the Boot Disk size, there you can see its in SSD or Magnetic.
To learn about Volume tyes: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html

AWS change EBS root volume on data collection system

I have the following use case:
I have an EC2 instance running with an 1000GB io1 SSD EBS root volume attached
It is used for a data collection service which accumulates data every minute
I like to change the volume for a cheaper storage system (as the specs of the process are not IOPS intensive)
I've read through the AWS documentation and found the following articles:
https://aws.amazon.com/about-aws/whats-new/2017/02/amazon-elastic-block-store-amazon-ebs-enables-live-volume-modifications-with-elastic-volumes/
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#console-modify
Which indicate that (from february 2017) for Current Generation Instances a volume type change is possible on the fly in the console without stopping the instance. However, when I go to my console I can only choose between io1 (current) or gp2 (also SSD), I'd like to choose sc1 (cold storage) for this instance. The video clearly shows this option (go from io1 to sc1).
Am I missing something? Is there a restriction to go from SSD to HDD?
(im in Asia Sydney region).
Alternatively, if the option is not possible and i have the requirement that data collection continues, it seems that my only option is:
re-create a similar instance with the data collection scripts deployed with an EBS sc1 volume as root attached
get the data collection running (now collecting double)
stop the old instance and take a snapshot of the io1 EBS volume
create a EBS sc1 volume with the snapshot
attach the EBS sc1 volume to the new instance (as additional volume, not root)
Would this be the right way to do so? (if I can't change the volume type to sc1 while it's running)
tldr;
The 2 main reasons why amazon will not propose sc1/st1 type when editing the EBS volumes are:
the current volume is used as root device of the ec2 instance
the current storage is less than 500 Gb
I guess the volume you want to change is used as root device of the instance; in this case you cannot have boot volume of magnetic type st1 or sc1.
Note also the sc1 volume must be at least 500 Gb
You can read more about EBS Volume Types
Unfortunately, you cannot change the root device of a running instance, you can do that while the instance is stopped.
so you can follow your steps proposed but you can make the change of the EBS after it will be detached from the first ec2 instance
re-create a similar instance with the data collection scripts deployed with an EBS sc1 volume as root attached (You cannot have sc1/st1 drive as boot volume; if you want magnetic storage you need to select standard Magnetic storage; but ideally you should have a low volume ssd drive as boot volume and the large magnetic drive as additional ebs volume)
get the data collection running (now collecting double)
stop the old instance and detach the EBS volume
make the modification of the EBS volume (type/storage)
attach the EBS sc1 volume to the new instance (as additional volume, not root)

Where OS and its settings are stored in EC2 instance

Using ec2 Windows instance with Instance storage (let's say 32GB SSD) - where OS and its settings are stored? Like Program Files, User profiles. Are they all stored on Instance Storage? As far as I understood from other topics Instance storage is not-persistent and doesn't survive shutdowns/terminations. Does that mean I will lose everything under C: drive if I turn it off?
Can I use EBS storage as a default storage for OS (C drive)? Can I map multiple EBS storages to one Windows storage?
If above is true, then I will be charged for the capacity used by OS on EBS instance? It would be around 20GB I believe. Is that correct?
I am quite new in aws, and before paying for such instances or EBS I would like to know how this technical and billing model is working.
Thank you!
The Storage for the Root device is dependent on the AMI (EBS-Backed or Instance Store-Backed) used to launch the instance.
As far as I understood from other topics Instance storage is
not-persistent and doesn't survive shutdowns/terminations.
If the Root storage device is Instance Store, Stopping (shutdown) the instance is not possible. On termination, Both the storage and Instance does not survive. The Instance does not survive once terminated even if the AMI is EBS-Backed, but you can persist the Root Volume by setting the DeleteOnTermination flag set to False.
Does that mean I will lose everything under C: drive if I turn it off?
You cannot turn off (shutdown) an Instance Store-backed instance.
Can I use EBS storage as a default storage for OS (C drive)?
Yes, Choose an EBS backed Windows AMI.
Can I map multiple EBS storages to one Windows storage?
Yes, multiple EBS Volumes can be attached to one EC2 Windows Instance.
If above is true, then I will be charged for the capacity used by OS
on EBS instance?
You will be charged for the total size of the EBS volumes attached to the instance including the Root Device.
It would be around 20GB I believe. Is that correct?
The EBS Volume Size is adjustable. The upper Size limit is 16TiB.
Read Storage for Root Device and Ec2 Root Device Volume
Please spend more time on the AWS documentation, I don't think here is enough to cover all your question.
Only for specify EC2 instance come with attached SSD storage AKA instance storage. Bare in mind that, this instance storage doesn't come with Snapshot capabilities, so you must backup the file yourself. This is mean for people who need fastest disk access to process their data.
Only EBS allow you do multiple snapshot.
You can always create an AMI image for your instance after complete the deployment. AMI image is store inside EBS, so you will not lost the initial instance if you do this, so for new instance, you just trigger load it from AMI.
If you "Terminate" an instance, it will delete the virtual image. There is no way to recover it even with EBS, unless you make a snapshot. However, attached EBS storage will not be deleted.
EBS is calculate by Per GB and give you 1GB x 3 IOPS, with base 100 IOPS given. This is not enough if anyone want to carry out disk I/O intensive task.

Launching with snapshot based volume fails

I am trying to launch an instance, and I'm adding an EBS volume on top of the root volume.
In the extra EBS volume, I'm specifying a snapshot I created.
When I click "Launch", I immediately get the following error:
snapshotId can only be modified on EBS devices
Can you explain the problem please?
Ran into the same issue while mounting EBS volume to /dev/sdc on an instance (c3.2xlarge) using HVM image.
The solution which worked for me was to use an available AWS recommended device name e.g. /dev/sdf. AWS recommended device name for attaching EBS volume is /dev/sd[f-p]
For Linux/Unix instance recommended device names are /dev/sd[f-p]
Source: AWS Block Device Naming on Linux Instances
I had the same issue, described it here Amazon Launch Template - Updated AMI .
tl;dr
You need to keep AMI and volume's sizes the same. I had 15 GB AMI and 8 GB volume.
Moving to a bigger instance type solved the problem.
Error Description is not correct, however Maxim Kogan is correct, Moving to larger instance solves the problem.
It appears, that the storage capacity of T1 instance is very little.

Extending the EBS Volume in AWS

Currently i have created EBS Backed(30GB) EC2 Instance, data in EBS has reached to almost maximum capacity.
What would be best practice to increase the size of EBS volume with high availability
a) Extend the existing EBS volume by taking snapshot
b) Attach new EBS Volume
In case we extend the EBS volume we have to take snapshot ,then stop instance and recreate ebs volume with this snapshot.
Will EC2 Instance boot from newly created EBS volume.
Ideal Way of doing this !
Yes precisely you are thinking in the right direction.
You could automate it with multiple sequential lambdas or bash would be also an ideal solution to your query.
How much should space should we increase?
Above will depend on your EBS storage filling rate. Make a wise choice accordingly.