How to reduce the LVM Size in RHEL/Centos 7 ?

Hi All,

I have one logical volume with size as 900G and it is mounted as xfs file system.
Now I want to reduce this partition to 500G.

So I followed the below steps.

  1. unmount the mount point /home
  2. Reduced the volume using the command
    [quote]
    lvreduce -L 500G /dev/rhel/home
    [/quote]
  3. Now I remounted the partition.

But the problem is still my mount point says 900G as /home size. What i am missing here.

Thanks
Kalai

The problem is the filesystem - it can not be shrunk:
XFS FAQ - XFS.org

Would it be possible on RHEL 7 with the -r flag of lvreduce? I've used this lots on RHEL 6, though never with XFS

You probably have a filesystem that thinks it is larger than the LV it is on and will get IO errors if you try to write beyond the LV. The above should work on the filesystem information so that it matches the logical volume.

I hope that this helps,
Robin

I seem to recall, when faced with a similar situation, that I had to start fresh.

backup the data
remove logical volume (which removes the data)
rebuild (to new size) the logical volume
restore the data