Automating LVM(Logical Volume Management) partition using python script.

Mangesh Ghorpade
3 min readNov 24, 2020

What is Automation?

If a developer has to repeat a job more than once, then instead of coding the same thing or doing the same process multiple times, they make a small piece of software or a bot that does the job for them. That’s Automation.

What is Python Automation?

Python is an easy-to-learn programming language that allows organizations to script custom automation and reap the time-savings

What is LVM ?

LVM is a tool for logical volume management which includes allocating disks, striping, mirroring and resizing logical volumes.

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. LVM provides features like the ability to add disk space to a logical volume and its filesystem. LVM helps to provide the Elasticity to the storage Device.

What is Elasticity ?

Elasticity is the concept which we can use to increase or decrease the volume of Hadoop Data Node. Hadoop data nodes shared storage can’t be static so LVM is used to make it dynamic.

Practical:-

LVM Menu
Disk Information
Physical volume created
Volume group created
Logical volume created
Logical volume resized
Disk Information
Exit Menu

Here is the link for Python code:-

In this way, Task is Completed Successfully !!

!! Thank You for Reading !!

--

--