How to extend the volume size on ec2 instance aws

    Posted in EC2-Hosting, Linux Servers on Oct 30, 2018

    1. Confirm the kernel. ~]# uname -r

    2.6.32-431.29.2.el6.x86_64

    1. Confirm the initial allocated size

    ]# df -h Filesystem Size Used Avail Use% Mounted on

    /dev/xvda1 7.9G 797M 6.7G 11% /

    tmpfs 498M 0 498M 0% /dev/shm

    lsblk

    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202:0 0 15G 0 disk └─xvda1 202:1 0 8G 0 part /

    1. Install EPEL6 Repo ~]# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm ~]# rpm -ivh epel-release-6-8.noarch.rpm

    2. Install the dracut & cloud-utils growpart modules-growroot ~]# yum install -y dracut-modules-growroot cloud-utils-growpart

    3. The initrd ...

    [Read more...]

    How to recover key file for aws instance

    Posted in EC2-Hosting on Jun 05, 2018

    If you lose the private key for an EBS-backed instance, you can regain access to your instance. You must stop the instance, detach its root volume and attach it to another instance as a data volume, modify the authorized_keys file, move the volume back to the original instance, and restart the instance. For more information about launching, connecting to, and stopping instances, see Instance Lifecycle.

    This procedure isn't supported for instance store-backed instances. To determine the root device type of your instance, open the Amazon EC2 console, choose Instances, select the instance, and ch...

    [Read more...]