I am currently doing some Virtualisation lab works in which I need to run Virtual Machines on Xen hypervisor.
I need to create Logical Volumes on Volume Groups.
I can create a new Volume Group using the command
"vgcreate vgpool /dev/sda1"
While executing this, I am getting error saying that the partition is already mounted. However "/sda1" being my root partition, I cannot unmount it. I can create volume groups on partitions other than the root partition.
My questions are 1) Is there a way, I can add my root partition to a Volume Group? 2) If not, how can I create logical volumes inside the root partitions, using commands like below? (I cannot do this now since I dont know what should I substitute in place of the VolumeGroupName)
"lvcreate -L 3G -n LogicalVolumeName VolumeGroupName"
/dev/sda1 is a one of your partitions, which equals one physical volume.
You can boot to LiveCD and create the volumegroup there, but if you do so you will overwrite all old data on that partition when you create new logical volumes and filesystems on top of that.