Setting a Linux Server on Amazon AWS (Part 2) - Storage
This week, let's look at how you can add additional storage to an Amazon EC2 Linux instance.
As usual, this article is for user's that already Linux System Administration.
Click on the slides below to continue.
AWS Volumes
After you login to the AWS Console. Click EC2. Then click on Volumes.
Click "Create Volume"
Select the Disk Type.
Success Confirmation. If you did things correctly.
The new volume should be accessible now under the volumes overview screen.
To attach the volume to a container, right-click on it and select "Attach"
Select the container that you want to attach to.
Select the device id that you want the drive to be attached as. You will now be able to see the device in the /dev directory.
Previous
Next
If you mess up an AWS EC2 Linux system...
If you make a mistake with some critical configuration settings, (e.g. you mess up /etc/fstab or /etc/passwd) the system will no longer boot correctly. In this case, detaching the EC2 instance's root (/) filesystem and re-attaching it to another running EC2 system (under a different mount point like /mnt) is
the KEY to getting this working again.
Note that under Amazon AWS, there is no console or single user mode boot. In this case, you will need to start up another EC2 instance to fix the previous one.
Similarly, if you LOSE the SSH key associated with the "ec2-user" you will not be able to get it back from AWS. In order to resolve this, you will need to once again mount the root FS on another running instance again, and then edit the
/home/ec2-user/.ssh/authorized_keys file.