Resizing an EC2 Instance Volume

Diaster. You login and the first thing you see is that you only have 11.1% of space left

System load:  0.0               Processes:           68
  Usage of /:   89.9% of 7.87GB   Users logged in:     0
  Memory usage: 8%                IP address for eth0: 10.220.117.134
  Swap usage:   0%

  => / is using 89.9% of 7.87GB

  $: sudo resize2fs /dev/xvda1
     resize2fs 1.41.14 (22-Dec-2010)
     Filesystem at /dev/xvda1 is mounted on /; on-line resizing required
     old desc_blocks = 1, new_desc_blocks = 4
     Performing an on-line resize of /dev/xvda1 to 13107200 (4k) blocks.

  $: df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/xvda1             50G  7.1G   40G  16% /
    none                  293M  108K  293M   1% /dev
    none                  298M     0  298M   0% /dev/shm
    none                  298M   48K  298M   1% /var/run
    none                  298M     0  298M   0% /var/lock

Leave a Reply

Your email address will not be published. Required fields are marked *