Issue
I am experiencing an issue with disk usage data display in the AWS console. I joined the service approximately a month ago and have been actively using the free tier of the EC2 service with Ubuntu installed. Throughout this period, I have been closely monitoring metrics and resource usage statistics.
However, recently I noticed a discrepancy in the displayed data. When I run the command df -Th on my EC2 server, it shows that only 5.1 gigabytes of disk space is being used. Meanwhile, in the AWS console, disk usage data is nearly three times higher, amounting to 12 gigabytes.
On my server, I have only installed Python versions 3.10 and 3.11, along with a local MongoDB Server Community database. I am certain that I have not used 12 gigabytes of disk space.
I would like to know if anyone else has encountered a similar issue and, if so, how it can be resolved. Unfortunately, I cannot reach out to AWS technical support as their services are only available to paying customers.
I would appreciate any help and advice regarding this situation. Thank you!
Solution
When an Amazon EBS volume is created, a size is specified. This is the size of the virtual disk and you are charged for that complete size.
The operating system running on the EC2 instance is responsible for managing how data is stored on a block storage device (Amazon EBS volume). AWS cannot 'see into' the instance so it has no knowledge of how much of the disk is 'used'.
Therefore, AWS will say that the disk is the complete (maximum) size of the disk, while the operating system will show how much of that space is 'used'. They will not match, since they are reporting different information.
Also, please note that EBS volumes are charged "per GB-month". So, a 10 GB disk for a full month would be 10 GB-months. A 20 GB disk for half a month would also be 10 GB-months.
Answered By - John Rotenstein Answer Checked By - Katrina (WPSolving Volunteer)