Logical Volume Manager is a Linux tool for managing your partition. LVM allows you to have the ability to play around with partition size and/or combine multiple hard disk to create partition across all the combined hard disk. The LVM-HOWTO explains its function and how you could benefit from it.
Resizing swap partition is a little bit different but a lot easier. Since we are not concern over the swap partition’s content and resize2fs doesn’t support swap partition; we can safely re-size the logical volume and re-format the partition to update its partition size. In the example below, PART 1 shrinks the swap partition from 8GB to 4GB and PART 2 increases the partition back to 8GB.