I'm trying to reduce the size of a partition in a Centos 10 system. I created a bootable thumb drive with Gparted, but it showed no space available to reduce the partition.
So I tried resizing the largest filesystem from 1.8 to 1.7 GB using the resize2fs command, and that worked.
However, GPartd still shows the same partition size, and I'm still unable to reduce it.
According to GParted, the partition name is:
/dev/md126p2. The filesystem is lvm2_pv.
The mount point is vg_contos6svr.
The other partition name is /dev/md126p1.
The df -h command shows /dev/md126p1, but not /dev/md126p2.
The file system I reduced is named: /dev/mapper/vg_contos6svr_lv_mysql
and it's mounted on /var/lib/mysql.
I need to fit the entire image into a 1848.1TB drive (actually two drives as it's a RAID 0 as set up in the BIOS).
GParted says /dev/md126p2 is 1.86 TB. So I just need to have the partition size reflect the file system change.
How do I do that? I'm not clear if it's do-able without destroying the image, but it would be great if possible.