LVM Based Storage

Create Storage

This example creates an LVM logical volume called new_logical_volume that consists of the disks at /dev/sda1, /dev/sdb1, and /dev/sdc1.
Step 1: Creating the Physical Volumes To use disks in a volume group, you label them as LVM physical volumes.

Warning :This command destroys any data on /dev/sda1, /dev/sdb1, and /dev/sdc1.
root> pvcreate /dev/sda1 /dev/sdb1 /dev/sdc1
Physical volume "/dev/sda1" successfully created
Physical volume "/dev/sdb1" successfully created
Physical volume "/dev/sdc1" successfully created
Step 2: Creating the Volume Group The following command creates the volume group new_vol_group.
root> vgcreate new_vol_group /dev/sda1 /dev/sdb1 /dev/sdc1
Volume group "new_vol_group" successfully created
You can use the vgs command to display the attributes of the new volume group.
root> vgs
VG #PV #LV #SN Attr VSize VFree
new_vol_group 3 0 0 wz--n- 51.45G 51.45G
Note: The VFree size shown in the vgs command will be used for creating VMs, so please make sure the size is always greater than zero.
داخل ویرچالیزور این موارد رو زده ولی اولین دستور pvcreate /dev/sda1 /dev/sda2 /dev/sda3 میزنم خروجی زیر رو میده



Can't open /dev/sda1 exclusively. Mounted filesystem?
Can't open /dev/sda2 exclusively. Mounted filesystem?
Can't open /dev/sda3 exclusively. Mounted filesystem?

ممنون میشم راهنمائی کنید