How to move disk space from LVM partition to another

Default LVM partitioning in Linux may not be optimal for some tasks. For example, root partition can be too small and filled up after some time while home partition is large and almost unused. In this case one obviously would want to transfer some amount of space from /home to / partitions.

Consider the following example:

Running fdisk -l:

And:

How to move the disk space used for /dev/mapper/centos-home to /dev/mapper/centos-root?

Here is how.

First of all unmount the /home partition with:

Reduce the logical volume:

Mount back your home partition as you’re done with it:

Then extend your root volume:

-t is a test mode. remove -t if results are ok.

Want me to do this for you? Drop me a line: itgalaxyzzz {at} gmail [dot] com