Shrink EXT4 Volume with LVM Online – How to Reduce LVM Size on Linux

ext4hard drivelinuxlvm

Today I tried this on my machine with OpenSUSE 12.3 (kernel 3.7):

# resize2fs /dev/mapper/system-srv 2G
resize2fs 1.42.6 (21-Sep-2012)
Filesystem at /dev/mapper/system-srv is mounted on /srv; on-line resizing required
resize2fs: On-line shrinking not supported

/dev/mapper/system-srv is an EXT4 volume.

Is it really unsupported or I am missing something?

Best Answer

As the message said, you can only grow an ext4 filesystem on-line. If you want to shrink it, you will need to unmount it first.

According to the ext4 filesystem maintainer, Ted Ts'o:

Sorry, on-line shrinking is not supported.