I have CentOS 9 installed on a system here that used an out of the box partition config on a 1TB drive. It created an LVM partition scheme where it auto allocated like 70 GB for /root partition as XFS, 8 GB for swap, and the remaining space for /home as XFS. I now have a need to create a new partition to add to the volume group, but first I need to shrink the space being used for /home.
I realized XFS cannot be shrunk, so I backup /home and tried to format the partition as EXT4, but I constantly get the following error:
/dev/vg/home is apparently in use by the system; will not make a filesystem here!
I have it unmounted so how is it in use?
mount | grep /dev/vg/home
returns no output.
sudo lsof /dev/vg/home
gives me this error that I don’t understand when trying to check what processes might be using it:
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
Here’s what an lsblk
outputs:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 1T 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 1023G 0 part
├─vg-root 253:0 0 70G 0 lvm /
├─vg-swap 253:1 0 7.9G 0 lvm [SWAP]
└─vg-home 253:2 0 945.1G 0 lvm