Automating the python LVM Using Python Script
I already have two disks added in my VM.
Step 1: - Create the Physical Volume with the disks you have created.
We have created two physical volumes as shown below.
Step 2: - Create the Volume Group.
Step 3: - Create the Logical Volume from the Volume Group.
Step 4: - Format LV & mount it to the any folder you want.
You can see that we mounted it in the f1 folder.
Extending the Size of the Partition: -
Now, format the extra part which we have added to the partion.
As we can see we have extended the size of the LV.
Python script for this automation is here...!
Thank you.