I also would note that when using an xfs file system it is possible to grow the file system but that it cannot be shrunk. Unlike an ext4 file system that can be both grown and shrunk as needed.
Using LVM it is quite possible to add additional logical volumes in the unallocated space within the existing volume group. There are many commands related to using LVM related to Physical Volumes (PV), Volume Groups (VG), and Logical Volumes (LV). These can be seen by using a command such as ls /usr/bin/lv* for the LVs and similarly use ls /usr/bin/pv* for the PVs and ls /usr/bin/vg* for the VGs.
The command to create that LV file system would be lvcreate. Use the man page for lvcreate (man lvcreate) to see the exact syntax needed. You will need to specify both the VG to use and the size and name of the new LV being created.
Thanks Jeff, I managed to the 30GB and mounted it as /mnt/mydata. However, I followed instructions for setting up PostgresQL as indicated at How to change PostgreSQL's data directory on Linux - DEV Community then moved its data to this mount, in the instructions, It was mentioned “if SELinux is in enforcing mode, temporarily set it to permissive mode (0)” which I did by running
setenforce 0
I was able to start the postgresql service and access the DBs. However, when I revert back to
setenforce 1
reboot the VM, the postgresql service fails to start as it needs to authenticate to be ablle to access the mount. I revert the setenforce to 0 and the service starts.
How this can be fixed while having setenforce = 1? Thanks for your help
Then it looks like postgres is searching in the root of dm-1, and SELinux is denying that.
Sorry, I don’t know the answer, but it doesn’t seem like there’s a problem with what you did for /home/pgdata, because these denials aren’t related to anything in that path.