Automating LVM Partition using Python-Script

Manav Misra
Mar 30, 2021

--

Task 7.1 C : Elasticity Task

C. Automating LVM Partition using Python-Script

Here for doing this first I have attached a volume(Hard Disk) of 10GiB to the VM

Now In this VM, I have python3 installed

python3 --version

Then using any editor start writing the python code.

vim lvm-automation.py

You can download the code from my GitHub account; link:
https://github.com/manavmisra2/LVM-automation-python/commits?author=manavmisra2

Run the code:

python3 lvm-automation.py

Press 1:

Press 2:

Press 3:

Press 4:

Press 5:

Press 6:

Press 7:

Press 8:

Press 9:

you can check df -l

Press 10:

If you will check it will be unmounted

Press 11:

That’s all

Thank-you!!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response