Hello Guys,
I have some questions regarding LVM.
I am partitioning my disk and I am planning to use LVM.
I have created 3 partitions of 5GB each (this is just for testing):
/dev/sda1 5G LVM -> swap
/dev/sda2 5G LVM -> home
/dev/sda3 5G LVM -> root
Physical Volume (PV)
# pvcreate /dev/sda1 /dev/sda2 /dev/sda3
Volume Group (VG)
# vgcreate myVirtualGroup /dev/sda1 /dev/sda2 /dev/sda3
Logical Volume (LV)
# lvcreate -n swap -L 5G myVritualGroup
# lvcreate -n home -L 5G myVritualGroup
# lvcreate -n root -L 5G myVirtualGroup
Code:
||========================================================||
Logical Volumes (LV) root (/) swap (swap) home (/home)
-------------------------------
Volume Group (VG) myVritualGroup
-------------------------------
Physical Volumes (PV) /dev/sda1 /dev/sda2 /dev/sda3
||========================================================||
My questions are:
- Should I create a Volume Group (VG) for each Physical Volume (PV)? or it's recommended to have all PVs in just one VG.
- Is it recommended to use LVM? I guess yes, right?
Any other recommendation will be highly appreciated!