Automating LVM Partition using Python-Script.
Task description:
Here I demonstrate the LVM partition using my python script.
π Github link : https://github.com/techy-mihir/LVM-Automation-By-Python-With-Linuxπ
what is lvm?
LVM is a Logical Volume Manager used to provide storage virtualization that allows us more configuration and flexibility than the traditional on-disk partitions.
With LVM, a hard drive or set of hard drives is allocated to one or more physical volumes. LVM physical volumes can be placed on other block devices which might span two or more disks.
Open lvm.py python file
π press 1 :We will show available disk in pc . We will contribute two disk in this LVM .
we will contribute two disk /dev/sdb and /dev/sdc in making LVM.
Before use this two disk in LVM make first as PV ,By press 2 In this python tool
π Press 6: To see all Pv
See two created as Pv
π Press 3: Now Create VG(volume group)
New vg created as myvg name
π Press 4: Now we will create Lv(logical volume) as 4GB storage
So now our 4GB LV created and mount directory is mylv1 show in above image.
π Press 6: Show all LV
our lv size is 4Gb shown in above image as lv size: 4GB
π Press 5: Now if we want to extend size of LV 4GB -> 6Gb
show above image our LV extended to 6GB.
πPress 7: See our new drive is created as mylv1 name. Show below image
Finally , our New LV(/mylv1) as 6GB is created.
Thank you