Pages

Sunday, February 15, 2015

Resize an Amazon EBS Volume Cent OS with CPanel



  1. Create a snapshot of the volume you want to resize.
  2. Create a new bigger volume from the snapshot.
  3. power off (Stop) the Instance.
  4. Check the old volumes attachment information if you are not familiar with this (You will need to specify this on device: /dev/sda1).
  5. Detach the old volume.
  6. Attach the new bigger volume.
  7. Power on (Start) the instance.
  8. Go to WHM and log in as root
  9. Check if your servers ip has changed (it most definitely will) (IP Functions> Show IP Address Usage) copy the ip that will have your servers name.
  10. Go to (Server Configuration>Basic cPanel & WHM Setup).
  11. Go to Basic config change the ip address to the servers shared ip address that you copied above.
  12. Go to your WHM backend (Resellers>Manage resellers main/shared IP) and change all resellers ips to the servers main shared ip.
  13. Go to (Account Information>List Accounts) Edit the ips of all the accounts listed there to your servers ip (you copied it earlier).
  14. Ping your elastic IP (your Security Group should allow: ICMP from 0.0.0.0/0)-Not a requirement for this tutorial it just helps you see if the server is up.
  15. You now need to restart the server for the ip changes to take effect. (System Reboot>Graceful Server Reboot).
  16. When the server comes back up you will be able to see it pinging.
  17. You can now access your websites again and you have managed to attach a bigger EBS volume however the additional space is not being recognized.
  18. To check space (From SSH- run: #df -h) (From WHM: Server Status>Server Information)
  19. To resize the volume (connect via SSH and run:#resize2fs /dev/sda1) you will see something like this (Performing an on-line resize of /dev/sda1 to 131072000 (4k) blocks.)
  20. When it completes it will display (The filesystem on /dev/sda1 is now 131072000 blocks long.)
  21. If you now check from SSH or CPanel (see step 17) you will see that now all the volumes space is available

    No comments:

    Post a Comment

    Note: Only a member of this blog may post a comment.