NOTE: if your drive has become too full to even navigate, reboot - this generally clears temp files enough to let you do the following tasks. REBOOT BEFORE CHANGING THE VOLUME SIZE!

NOTE: To find the largest files on Ubuntu, in order to delete temp files and free up space in lieu of increasing the drive size, use the following command (this can take a while to run, as it is searching the entire drive!):

sudo du -aBm / 2>/dev/null | sort -nr | head -n 10

INCREASING THE DRIVE SIZE - AWS CONSOLE STEPS + BITVISE TERMINAL FOLLOWUP STEPS:

Access the AWS Console by going to

AWS Management Console

There are different AWS accounts for different clients - MOST of our client servers are in our “primary” account which is tied to [email protected]. See the server inventory workbook for which account goes with which client and for login credentials.

With Ubuntu 20.04, increasing the size of an EC2 volume through the AWS interface does NOT automatically increase the size of the disk. Additional steps are necessary, run at the command line.

START BY increasing the size of the instance volume through the AWS EC2 console - be ready to do the followup terminal steps right away! The AWS volume must be in “optimizing mode” still when the followup terminal steps are done.:

Untitled

After resizing the volume in AWS, connect to the server with BitVise and in the “black box” console, complete the following steps:

1 - Run the “df” command to see the existing size of the disk. For lre servers this is usually the volume called “nvme0n1np1”

$ sudo df -h Filesystem Size Used Avail Use% Mounted on udev 463M 0 463M 0% /dev tmpfs 96M 752K 95M 1% /run

**/dev/nvme0n1p1 8.7G 8.0G 674M 93% /** tmpfs 477M 0 477M 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 477M 0 477M 0% /sys/fs/cgroup /dev/loop0 27M 27M 0 100% /snap/amazon-ssm-agent/5163 /dev/loop1 56M 56M 0 100% /snap/core18/2409 /dev/loop3 112M 112M 0 100% /snap/core/13250 /dev/loop2 114M 114M 0 100% /snap/core/13308 /dev/loop4 56M 56M 0 100% /snap/core18/2344 /dev/loop5 26M 26M 0 100% /snap/amazon-ssm-agent/5656 tmpfs 96M 0 96M 0% /run/user/1000

2 - Run the “lsblk” command to verify the name of the block on which that volume lives

$ sudo lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT …

nvme0n1 259:0 0 10G 0 disk └─nvme0n1p1 259:1 0 9G 0 part /

3 - Run the “growpart” command to grow the volume up to the size of the block: