Sunday, February 15, 2015
Resize an Amazon EBS Volume Cent OS with CPanel
- Create a snapshot of the volume you want to resize.
- Create a new bigger volume from the snapshot.
- power off (Stop) the Instance.
- Check the old volumes attachment information if you are not familiar with this (You will need to specify this on device: /dev/sda1).
- Detach the old volume.
- Attach the new bigger volume.
- Power on (Start) the instance.
- Go to WHM and log in as root
- 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.
- Go to (Server Configuration>Basic cPanel & WHM Setup).
- Go to Basic config change the ip address to the servers shared ip address that you copied above.
- Go to your WHM backend (Resellers>Manage resellers main/shared IP) and change all resellers ips to the servers main shared ip.
- Go to (Account Information>List Accounts) Edit the ips of all the accounts listed there to your servers ip (you copied it earlier).
- 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.
- You now need to restart the server for the ip changes to take effect. (System Reboot>Graceful Server Reboot).
- When the server comes back up you will be able to see it pinging.
- 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.
- To check space (From SSH- run: #df -h) (From WHM: Server Status>Server Information)
- 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.)
- When it completes it will display (The filesystem on /dev/sda1 is now 131072000 blocks long.)
- If you now check from SSH or CPanel (see step 17) you will see that now all the volumes space is available
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.