Skip to content

Increasing an AWS EC2 Server''s Disk Space

To increase an AWS EC2 server’s disk space, you need to modify the size of the EBS (Elastic Block Store) volume attached to it. Here are the general steps:

  1. Snapshot: Before you begin, it’s recommended to take a snapshot of your volume as a backup. To do this, navigate to the EC2 Dashboard and select “Volumes” under “Elastic Block Store”. Choose the volume you want to resize, then from the “Actions” menu, select “Create Snapshot”.

  2. Modify the EBS volume: After the snapshot is complete, you can modify the volume. From the same “Volumes” page, choose your volume, then from the “Actions” menu, select “Modify Volume”. In the dialog box, type the new size of your volume, then choose “Modify”.

  3. Confirm the modification: A window will pop up to confirm the modification. Read the notice, then choose “Yes”.

  4. Extend the volume’s file system: At this point, the EBS volume itself has been resized, but you need to extend the file system on the volume to take advantage of the increased space. The process to do this varies depending on the operating system of your instance.

    For Linux instances, you can use the resize2fs or xfs_growfs commands. The specific command depends on your file system:

    • For ext2, ext3, and ext4 file systems, use resize2fs /dev/xyz (replace /dev/xyz with the specific name of your device)

    • For XFS file system, use xfs_growfs /mount_point (replace /mount_point with the mount point directory path for your volume)

    For Windows instances, you can use the Disk Management utility or the Extend-Volume PowerShell cmdlet.

Please note, the specifics may vary slightly based on your AWS console’s version, your instance’s operating system, or other factors. Always refer to the official AWS documentation for the most accurate information.