How to resolve the issue with the disk space of EC2 Linux machine?
I probably face a basic issue.
I created a Linux EC2 machine with only 8 Gb of disk space.
Output of 'df' command:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda1 8065444 5786008 2263052 72% /
Tried to go to AWS console to increase the attached volume.
In the Description tab, I see:
Root device type: ebs
Root device: /dev/sda1
Block device: /dev/sda1
Clicking on '/dev/sda1' volume ID, I was able to increase its size to 24 GiB.
However, when logging in via SSH, I still see only 8 Gb via 'df'.
Tried to reboot the machine, no change.
I noticed /dev/sda1 and /dev/xvda1 are not the same. But I have no idea how to apply the change to my disk.
Thanks for any hint.
The changes that you have made on the console will reflect only at the block level. You can run the command "lsblk" to see the new size on the instance that you have configured on the console.
lsblk -> This command lists the information about all available or the specified block devices
After you increase the size of an EBS volume, you must use file system–specific commands to extend the file system to the larger size.
The steps to extend your filesystem is well documented on this link below:
 Extending a Linux file system after resizing a volume - Identifying the file system for a volume - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html#identify-linux-file-system
Moving on, there is no difference between sda1 and xvda1, they are exactly same. When you run your EC2 instance on a Xen hypervisor the xvd* are simply the Xen disk storage devices, therefore they appear instead of sda, etc.
Thanks a lot.
I was able to solve the problem, using your advice and the article you mentioned.
[errno 28] no space left on diskasked a month ago
How to resolve the issue with the disk space of EC2 Linux machine?asked 2 years ago
What does "provisioned" mean for EBS pricing?asked 3 years ago
Change platform of EC2 instanceasked 2 months ago
Apache and OpenSSL running on its EC2 instances bundled with RedHat Linux 8 are outdated, how to best resolve thisasked 5 months ago
linux partition on Lightsailasked 24 days ago
How do I know the space (in GB) used by a "Snapshot"?asked 2 years ago
Redshift recommended free space percentageAccepted Answerasked 4 years ago
Workdocs - Space in Drive C - WindowsAccepted Answerasked 4 months ago
How to migrate the specific Linux partition rather than the entire diskAccepted Answerasked 24 days ago