Friday, September 8, 2017

Increase the Size of an AWS EBS Cloud Volume Attached to a Linux Machine

  1. Stop the instance
  2. Make a snapshot of the volume that we want to increase
  3. Write down the attachment information
    Attachment information: i-f0cacda3 (PROD):/dev/sdf1 (attached)
    
  4. Detach the volume
  5. Create a new volume with larger size, pick the same zone, pick the snapshot that we create in Step #2
  6. Attach the new volume to the instance with the same attachment information (see Step #3)
  7. Start the instance
  8. ssh into the instance as usual
  9. df -h should still show the old size even we are using a larger volume
  10. Run resize2fs /dev/sdf1 to increase the size to match the larger volume
  11. Reboot (optional)

No comments:

Post a Comment