How to change CentOS partition to LVM?

I have CentOS installed in a virtual machine, but its partition is in old-style, now, I need to change it to LVM. Is it possible? And how to do that? I don't want to reinstall the system.

The current partition is as follows: enter image description here


Solution 1:

No you cannot do this without reinstalling (or at least backing up and restoring).

LVM and partitions are two different concepts, not "styles" that can be changed into one another.

LVM is a layer on top of the block devices. So when you create a LVM physical volume it will allocate all that space on the drive/partition for LVM usage and thus will overwrite/ignore anything that's already there. You can change the partition type to Linux LVM which will be needed when you reinstall with LVM but it will not make the system use LVM.