As we know all cloud providers provide us functionality to increase disk space at any time. Yesterday there was a requirement from client. Where he wants to increase disk space. I have increased disk space from AWS side and I was able to see that disk space changes on server via cli command lsblk. As usual we have to extend a Linux file system after resizing a volume with below command
sudo growpart /dev/xvda 1
But when I hit command there was output like below:
NOCHANGE: partition 1 could only be grown by -6190792671 [fudge=2048]
And when I hit
resize2fs /dev/xvda1
The output was like
resize2fs 1.44.1 (24-Mar-2018)
The filesystem is already 7864059 (4k) blocks long. Nothing to do!
So after doing some google search I found that cloud-guest-utils package was missing from server.
So I just install package.
apt install cloud-guest-utils
Then
sudo growpart /dev/xvda 1
resize2fs /dev/xvda1
After that I was able to extend volume on server