PROVINDING ELASTICITY TO HADOOP CLUSTER USING LINUX LVM

PROVINDING ELASTICITY TO HADOOP CLUSTER USING LINUX LVM

Logical Volume Manager

LVM for short.. Is a Device Mapper that acts as a Logical Volume manager for a Linux system. Most modern Linux distros are LVM-ready to the point that they are able to have their root file-systems on a LV.

No alt text provided for this image



Ways of Managing LVM:

There are 3 concepts that LVM manages:

1?? Physical Volume: A physical volume is a collection of disk partitions used to store all server data.

2?? Volume Groups: is a collection of physical volumes of varying sizes and types.

3?? Logical Volumes: are groups of information located on physical volumes.

Task Objective:

?? Integrating LVM with Hadoop and providing Elasticity to DataNode Storage

Procedure:

1] Setup:

This can go two ways:

i) Using local systems

ii)Using remote Instances

I’ve launched 2 Instances for my Hadoop Cluster , One NameNode and DataNode on RHEL8.

2] Create volumes with the size of your choice and then attach them to your DataNode:

No alt text provided for this image




fdisk -l
No alt text provided for this image


3] Creating a Logical Volume From a Volume Group which consists of Physical Volumes

Next, we create a Physical Volume from the disk we just attached using:

pvcreate <disk_name>
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Now we can create a Volume Group using that Physical Volume we just made:

vgcreate <vg_name> <disk_name1> <disk_name2> ….....<disk_nameN>
No alt text provided for this image

This is a DEMO vg

To see more details we can use:

vgdisplay <vg_name>
No alt text provided for this image


Now , we can create a Logical Volume from the existing VG:

lvcreate --size <size> --name <lv_name> <vg_name>
No alt text provided for this image


4] Making it a Dynamic Partition:

mkds.ext4 /dev/<vg_name>/<lv_name>
          [or]
mkds.ext4 <partition_name>


5] Mounting the partition to our Hadoop Cluster

mount /dev/<vg_name>/<lv_name> /<DN_folder>
                   [or]
mount /<partition_name> /<DN_folder>
No alt text provided for this image


This consists of the steps 4 , 5

With this.. we can check whether the DN has been reduced in size :

No alt text provided for this image


6] Expanding the L V capacity:

LVM’s biggest advantage is the fact that both logical and physical volumes can be resized without any restarts..


Now we add another Volume ( in my case, I went with a whopping 5 gigz of expansion…..)


Next , we extend the Volume Group using:

vgextend <vg_name> <disk_name>
No alt text provided for this image
No alt text provided for this image


Now we can add that to the LV using:

lvextend --size <size> <partition_name>
No alt text provided for this image


Now we’ve extended the storage capacity of our New partition , all that’s left is to format it:

resize2fs <partition_name>


Now , if we go back to our NameNode . We may notice the increase in storage capacity:

No alt text provided for this image


In conclusion..

Integrating LVM with Hadoop Clusters

THANK YOU......

要查看或添加评论,请登录

Robin Kumar的更多文章

  • Docker+HTTPD+Python

    Docker+HTTPD+Python

    This Blog is about: Installing and Setting up Docker Running a Docker Container with Exposed Port Setting up httpd…

  • Create a setup that would ping Google but not Facebook from same system

    Create a setup that would ping Google but not Facebook from same system

    Content of this Blog Basic Concepts Setup Procedure Basic Concepts Before understanding procedure required for the…

  • Expanding and reducing the capacity of Static Partitions

    Expanding and reducing the capacity of Static Partitions

    What is a static partition? Static(Fixed) Partitioning: ->According to geek for geeks This is the oldest and simplest…

  • Automating processes using Python

    Automating processes using Python

    What is Automation? It is the use of technology to accomplish a task with as little human interaction as possible.In…

  • Case Study: How Nokiya Using Kubernetes ?

    Case Study: How Nokiya Using Kubernetes ?

    What is Kubernetes? Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and…

  • Case Study Of Netflix

    Case Study Of Netflix

    Four Reasons They Choose Amazon’s Cloud as Our Computing Platform One year ago, none of Netflix’s customer traffic was…

  • BIG DATA

    BIG DATA

    What is BIG DATA? Introduction, Types, Characteristics & Example In order to understand 'Big Data', you first need to…

  • Mlops_task1: integration of | Jenkins | Docker | Github |

    Mlops_task1: integration of | Jenkins | Docker | Github |

    Job_1 If Developer push to dev branch then Jenkins will fetch from dev and deploy on the dev-docker environment. Job_2…

社区洞察

其他会员也浏览了