Extending a Linux File System IN amazon EC2

1- expand the volume from amazon  ec2 Volumes dashboard

2- Expand the modified partition using growpart

sudo growpart /dev/xvdf 1

A look at the lsblk output confirms that the partition /dev/xvdf1 now fills the available space on the volume /dev/xvdf

3-  sudo resize2fs /dev/xvdf1




Enable Root login in Amazon EC2

sudo -s

vi /root/.ssh/authorized_keys

delete the lines at the begining of the file that say “COMMAND….” until you get to the words ssh-rsa

vi /etc/ssh/sshd_config

set the variable “PermitRootLogin” to “PermitRootLogin without-password” (without quotes)

now restart ssh service

service sshd restart