Shrink the LVM logical volume that is mounted on /var inside a KVM quest, using ext4 filesystem.
[root@vh01-sc ~]# virsh list
Id Name State
----------------------------------------------------
40 ntp-sc running
[root@vh01-sc ~]# virsh vncdisplay 40
:11
MacBook-Pro:~ arlukin$ ssh root@vh01-sc -L 5900:localhost:5911
reboot
[root@ntp-av ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-root
4.0G 1.3G 2.6G 33% /
tmpfs 4.9G 0 4.9G 0% /dev/shm
/dev/vda1 97M 27M 66M 29% /boot
/dev/mapper/VolGroup00-home
1008M 34M 924M 4% /home
/dev/mapper/VolGroup00-tmp
1008M 34M 924M 4% /tmp
/dev/mapper/VolGroup00-var
94G 39G 50G 44% /var
/dev/mapper/VolGroup00-varlog
4.0G 138M 3.7G 4% /var/log
/dev/mapper/VolGroup00-vartmp
1008M 34M 924M 4% /var/tmp
[root@ntp-av ~]# /var/log
[root@ntp-av ~]# /var/tmp
[root@ntp-av ~]# /var
e2fsck -f /dev/mapper/VolGroup00-var
resize2fs -p /dev/mapper/VolGroup00-var 40G
lvreduce -L 40G /dev/mapper/VolGroup00-var
e2fsck -f /dev/mapper/VolGroup00-var
resize2fs -p /dev/mapper/VolGroup00-var
e2fsck -f /dev/mapper/VolGroup00-var
reboot