Now guys we have to create a python script to create a LVM volume.
Before continuing to this blog refer to this blog:
Creating LVM volumes in RHEL 8.
Hello Readers, In today’s blog I am going to show you how you can create LVM volumes.
This blog will tell you all about LVM, How to create LVM manually, how to extend the size of the same etc.
Step 1: Open a text editor and write a python code.
Refer to this link for complete code :
Contribute to PythonBYabhi/lvmmenu development by creating an account on GitHub.
Now run the script in the console.
Now, As you can see that our lvm volume has been reduced to 5 GB.
Similarly use this menu to create or delete LVM partitions.
This is how a LVM partition creation can be automated using Python script.
Thanks for reading….