Automating LVM Partition using Python-Script.

Anupam Anand
Dec 24, 2021

In Linux, Logical Volume Manager (LVM) is a device mapper framework that provides logical volume management for the Linux kernel. Most modern Linux distributions are LVM-aware to the point of being able to have their root file systems on a logical volume.

we have attached external hard disks to the OS.

STEP1:

>>CREATE A SCRIPT IN PYTHON TO AUTOMATE THE LVM PROCESS
HERE’S HOW TO WRITE THE CODE:-

STEP2:

RUNNING THE PYTHON SCRIPT AND FILLING THE REQUIRED DETAILS AS A USER.

STEP3:

CHECKING THE FULL STORAGE USING “df -h” COMMAND TO CONFIRM THR CREATED LVM
HERE’S I HAVE CREATED A LVM OF 4GB STORAGE.

--

--