Is it possible to use free space of a partition mounted on /
as volume group?
I mean creating VG on that free space, does it cause any problem?
If by mounted on /
you mean, that the disk space is formatted with a file system, then no, you cannot.
If that is the case, you cannot use the 489.8 GB as disk for your volume group.
Then I can use the 399.8 GB to create a PV in LVM and add that PV to a VG.
EDIT: Well, actually you could
I just came to think of something after I posted the answer. I was wondering if you could use loop interfaces with LVM. And it turns out you can. I am right now booting up a test box to play a little with that. I will edit this to be the results after I'm done.
This is basically how I did:
dd if=/dev/zero of=sflvm01.img bs=100 count=2M
dd if=/dev/zero of=sflvm02.img bs=100 count=2M
losetup /dev/loop0 sflvm01.img
losetup /dev/loop1 sflvm02.img
pvcreate /dev/loop0
pvcreate /dev/loop1
vgcreate test01 /dev/loop0 /dev/loop1
lvcreate -n loopdisk01 -L 300M test01
mkfs.xfs /dev/test01/loopdisk01
mkdir /mnt/428830 ; mount /dev/test01/loopdisk01 /mnt/428830
And I ended up with
/dev/mapper/test01-loopdisk01
296M 16M 281M 6% /mnt/428830
So, technically yes. You can do that. I would still advice you not to, though. I use LVM for all my disk.
I cannot set up the loop interfaces until my LVM has started - but when LVM starts, it cannot find the loop devices. So, I would have to do it manually at all times.