In this Article, we will discuss about :

Step 2: For this, I created one python Menu which have a list of options:

Configure hdfs-site.xml file and attach directory to the DataNode.

Hadoop Data-Node Configure

Mount LVM into One Directory named as lv2

Step 3: Start Hadoop DataNode and Show the report.

Successfully Attach 10GB LVM and providing Elasticity

Increasing the Size of Partition

Adding 1Gib more..

  • Resizing the Partition for use:

Resizing the Partition

🔅Automating LVM Partition using Python-Script.

Press 1 : for total number of Hard disk

Number of Hard disk

Two Hard disk’s Attached

  • For Creating Logic Volume Press 2

Menu

  • First, Create Physical Volume or create PV for this press 1

/dev/sdb

/dev/sdc

  • But this physical volume is not allocatable for that we need one Volume Group in short LV.

Create Volume Group

Show Physical Volume

  • Now Create one LV partition named mylv1 and size +10GB using script press 3.

lvextend — size <+size> /dev/vg_name/lv_name

Create lv named mylv1

Successfully Created 10GB partition

  • At last Format the partition and mount this partition in one folder.

Format the partition

--

--