Increase disk space on Linux EC2

You can attach an EBS volume as another device (ex. /dev/sdf) to an instance for more disk space. Once you have a mount point set in Linux OS, you can copy your website files there and point the web service config to point to that directory for the website.

As another option, you can expand the existing root EBS volume for an EBS-backed instance. Please perform the following steps.

  • Stop the instance.
  • Create a snapshot of the root EBS volume.
  • Create an EBS volume from that snapshot with the new desired size. (Please ensure it is in the same AZ as the instance)
  • Detach the root EBS volume and attach the newly created EBS volume to /dev/sda1 on the instance.
  • Start the instance and then login.
  • Enter ‘df -h’ to see the current size of the root volume.
  • Enter ‘sudo resize2fs /dev/sda1’ to get the rest of the expanded disk.
  • Enter ‘df -h’ again to see the new size of the root volume.

Leave a Reply

google.com, pub-3772983857049267, DIRECT, f08c47fec0942fa0
%d bloggers like this: