Integrating LVM with Hadoop and providing Elasticity to DataNode Storage.


First, we have to create a LVM then mount it to the folder in the “hdfs-site.xml” file of Hadoop.

Step -1


~ pvcreate /dev/(disk1 name)

~ pvcreate /dev/(disk2 name)

Step -2

Cmd:- vgcreate (name of vg) /dev/(disk2 name) /dev/(disk2 name)

Step -3

Cmd:- lvcreate --size (size in GB) --name (name of lv) (name of vg)

Step -4

Cmd:- mkfs.ext4 /dev/(vg name)/(lv name)

Step -5

Cmd:- mount /dev/(vg name)/(lv name) /(hdfs file folder name)

Step -6

Cmd:- lvextend --size (size you want to extend) /dev/(vg name) /(lv name)

Finally after following this few simple steps we can achieve elasticity in our Hadoop Cluster.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store