I am trying to increase the swap space available to my server from 4GB to 16GB, however at present XFS + something is making this impossible.
I have a single SSD hosting the OS (CentOS 7), with a boot partition and a LVM2 partition, the defaults of the installation. Inside the LVM2 partition are three virtual partitions,
swap, consuming the entire LVM2 partition. Again by the defaults of the installation, these are in the XFS filesystem type.
My simple want was to shrink the under-utilised
home partition, making space for the
swap partition. Having now discovered that shrinking XFS partitions is impossible, I am down the rabbit hole of backing up the home drive deleting the partition and reinstating it in smaller size with a recover from the backup.
The problem now is I cannot seem to free the home directory or the partition. Having dropped out of the GUI, logged out and back in as root at the terminal, initially I could not unmount the home directory. Something was in use though
fuser showed nothing open on it.
I issued a
umount -f home
and this appears to have worked in unmounting home. I can now freely mount and unmount home without the
-f callout, which seems suspicious. However now trying
the message returned is
Logical volume centos/home in use.
I have looked at many questions and answers here and it is none of the following:
- NFS service
- Open files
- Open files using the major,minor designation
- the Active flag (have tried
lvchange -an -v /dev/centos/home, it also claimed the volume was in use)
Nothing I can find seems to give a hint as to what is using
home. If I could get a solution that was not dependent on rebooting the machine, that would be ideal.