Shrinking volume from 10G to 9G:
While online enlarging is no problem, you have to umount for shrinking!
Code:
# umount /dev/vg_blah/lv_blah
Perform a check of the filesystem...
Code:
# e2fsck -f /dev/vg_blah/lv_blah
Resize the filesystem first.
Code:
# resize2fs /dev/vg_blah/lv_blah 9G
Then reduce the size of the logical volume.
Code:
# lvreduce -L -1G /dev/vg_blah/lv_blah
After that you can shrink down the volume group if desired.
Code:
# vgreduce vg_blah /dev/sdxy
Warning: It is crucial that you use the exact amount of space. If you reduce volume more than the filesytem you truncate the logical volume and you risk data loss!
!!! I WOULD NEVER SHRINK A FILESYSTEM WITHOUT A BACKUP !!!