[CentOS] Expand XFS filesystem on CentOS Linux release 8.2.2004 (Core)

Fri Mar 12 21:17:02 UTC 2021
Gordon Messmer <gordon.messmer at gmail.com>

On 3/12/21 4:45 AM, Kaushal Shriyan wrote:
> Is there a way to expand xfs filesystem /dev/nvme0n1p2 which is 7.8G and
> occupy the remaining free disk space of 60GB?

Can you set up an identical EC2 instance to test the process?  I 
definitely wouldn't do this on a system with data that you need, but you 
*might* be able to:

* create a new 1M partition at the end of the drive (not BIOS boot type)
* reboot
* use 'dd' to copy the content of nvme0n1p3 to nvme0n1p4
* delete the third partition and change the fourth to BIOS boot type.
* resize the second partition
* grub-install /dev/nvme0n1
* reboot
* xfs_growfs