EC2 Can't resize volume after increasing size

后端 未结 14 530
青春惊慌失措
青春惊慌失措 2020-11-30 16:30

I have followed the steps for resizing an EC2 volume

  1. Stopped the instance
  2. Took a snapshot of the current volume
  3. Created a new volume out of t
14条回答
  •  渐次进展
    2020-11-30 17:15

    [SOLVED]

    This is what it had to be done

    1. Stop the instance
    2. Create a snapshot from the volume
    3. Create a new volume based on the snapshot increasing the size
    4. Check and remember the current's volume mount point (i.e. /dev/sda1)
    5. Detach current volume
    6. Attach the recently created volume to the instance, setting the exact mount point
    7. Restart the instance
    8. Access via SSH to the instance and run fdisk /dev/xvde
    9. Hit p to show current partitions
    10. Hit d to delete current partitions (if there are more than one, you have to delete one at a time) NOTE: Don't worry data is not lost
    11. Hit n to create a new partition
    12. Hit p to set it as primary
    13. Hit 1 to set the first cylinder
    14. Set the desired new space (if empty the whole space is reserved)
    15. Hit a to make it bootable
    16. Hit 1 and w to write changes
    17. Reboot instance
    18. Log via SSH and run resize2fs /dev/xvde1
    19. Finally check the new space running df -h

    This is it

    Good luck!

提交回复
热议问题