Thursday, 2 November 2017

Single EC2 Instance Part 10 - Expanding the Backup Server's Data Volume

Client bought more space for the backup server. We now need to expand the volume / disk that is storing the backups.

Click the EC2 instance that is the backup server.
Click the non-root "Block device" (/dev/sdf in this demo).
Click the "EBS ID".
Right click the volume displayed (it should show the "CPM... Data" volume).
Click "Modify Volume".
Specify the new size. (In the demo, we are expanding from 5 to 6 GB.)
Click "Modify".
Click "Yes".
Click "Close".
Volume expanding in progress...
Volume expanding completed.
We now need to SSH into the backup server to grow the filesystem.
The username to use for SSH login is "cpmuser".
In this demo, we are using PuTTY as SSH client.
Use the correct private key.
(See Part 7, at the "key pair" stage, if this part seems unclear.)
The IP address is the public IP address of the backup server.
Use "lsblk" to see which device is "/cpmdata" mounted on. Notice that it is the new size.
Use "df -h" to see the size of the filesystem. Notice that it is still old size. In this demo, the device is "/dev/xvdf".
Use "sudo resize2fs device" to expand the filesystem.
Use "df -h" again to check. It should show the new size.

Single EC2 Instance - Table of Contents