Automating LVM Using Python Script
Task Objective:- Automating LVM Partition using Python-Script.
In the last Blog, we have seen how we can perform LVM Partionaing in Linux in detail especially for the Hadoop data node But you can follow the partition part
You will get my Python script for LVM here, and In this blog, we will see how we can use this script to automate the manual work of LVM
https://github.com/venkateshpensalwar/ARTH
Following are the ScreenShots of the Live Demo:
This is the LVM Manager Menu you can choose an option according to your need
/dev/sdb
/dev/sdc
we will use /dev/sdb for this demo
Now we have created PV
we will create a Volume group from that Physical volume using option 3
Note: for the keeping short blog, I used only one Physical Volume you can use unlimited just follow the script instructions.
Note: Before mounting you need to format the device
From option 11 we can mount this device to where you want
Conclusion:
So in this way, I have created a python script to automate our manual task and we also successfully created LVM using this Python script
No comments